From 7eaa7670a7f75051205110611febe888f43eddae Mon Sep 17 00:00:00 2001 From: Hector Palacios Date: Mon, 26 Oct 2020 11:23:41 +0100 Subject: [PATCH 01/57] change recipes to build from 'master' branches Signed-off-by: Hector Palacios --- meta-digi-arm/recipes-bsp/u-boot/u-boot-dey_2017.03.bb | 2 +- meta-digi-arm/recipes-bsp/u-boot/u-boot-dey_2018.03.bb | 2 +- meta-digi-arm/recipes-bsp/u-boot/u-boot-dey_2020.04.bb | 2 +- .../recipes-digi/trustfence/trustfence-sign-tools_git.bb | 2 +- .../kernel-module-qualcomm/kernel-module-qualcomm.bb | 2 +- meta-digi-arm/recipes-kernel/linux/linux-dey-src.inc | 2 +- meta-digi-dey/recipes-digi/dey-examples/dey-examples-src.inc | 2 +- meta-digi-dey/recipes-digi/libdigiapix/libdigiapix_git.bb | 2 +- 8 files changed, 8 insertions(+), 8 deletions(-) diff --git a/meta-digi-arm/recipes-bsp/u-boot/u-boot-dey_2017.03.bb b/meta-digi-arm/recipes-bsp/u-boot/u-boot-dey_2017.03.bb index 243ff2143..6f0e03268 100644 --- a/meta-digi-arm/recipes-bsp/u-boot/u-boot-dey_2017.03.bb +++ b/meta-digi-arm/recipes-bsp/u-boot/u-boot-dey_2017.03.bb @@ -2,7 +2,7 @@ require digi-u-boot.inc -SRCBRANCH = "v2017.03/maint" +SRCBRANCH = "v2017.03/master" SRCREV = "${AUTOREV}" COMPATIBLE_MACHINE = "(ccimx6$|ccimx6ul|ccimx8x)" diff --git a/meta-digi-arm/recipes-bsp/u-boot/u-boot-dey_2018.03.bb b/meta-digi-arm/recipes-bsp/u-boot/u-boot-dey_2018.03.bb index dd3b5a540..efe133157 100644 --- a/meta-digi-arm/recipes-bsp/u-boot/u-boot-dey_2018.03.bb +++ b/meta-digi-arm/recipes-bsp/u-boot/u-boot-dey_2018.03.bb @@ -2,7 +2,7 @@ require digi-u-boot.inc -SRCBRANCH = "v2018.03/maint" +SRCBRANCH = "v2018.03/master" SRCREV = "${AUTOREV}" COMPATIBLE_MACHINE = "(ccimx8x|ccimx8m)" diff --git a/meta-digi-arm/recipes-bsp/u-boot/u-boot-dey_2020.04.bb b/meta-digi-arm/recipes-bsp/u-boot/u-boot-dey_2020.04.bb index ef49e0c04..1d522300e 100644 --- a/meta-digi-arm/recipes-bsp/u-boot/u-boot-dey_2020.04.bb +++ b/meta-digi-arm/recipes-bsp/u-boot/u-boot-dey_2020.04.bb @@ -5,7 +5,7 @@ LIC_FILES_CHKSUM = "file://Licenses/README;md5=30503fd321432fc713238f582193b78e" DEPENDS += "flex-native bison-native" -SRCBRANCH = "v2020.04/maint" +SRCBRANCH = "v2020.04/master" SRCREV = "${AUTOREV}" COMPATIBLE_MACHINE = "(ccimx8x)" diff --git a/meta-digi-arm/recipes-digi/trustfence/trustfence-sign-tools_git.bb b/meta-digi-arm/recipes-digi/trustfence/trustfence-sign-tools_git.bb index de5c09fad..fd9cb5642 100644 --- a/meta-digi-arm/recipes-digi/trustfence/trustfence-sign-tools_git.bb +++ b/meta-digi-arm/recipes-digi/trustfence/trustfence-sign-tools_git.bb @@ -6,7 +6,7 @@ LIC_FILES_CHKSUM = "file://${COMMON_LICENSE_DIR}/GPL-2.0;md5=801f80980d171dd6425 DEPENDS = "trustfence-cst coreutils util-linux" DEPENDS += "${@oe.utils.conditional('TRUSTFENCE_SIGN_MODE', 'AHAB', 'imx-mkimage', '', d)}" -SRCBRANCH = "v2020.04/maint" +SRCBRANCH = "v2020.04/master" 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 4437359c9..73d8df971 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 @@ -8,7 +8,7 @@ LIC_FILES_CHKSUM = "file://${COMMON_LICENSE_DIR}/ISC;md5=f3b90e78ea0cffb20bf5cca # Reference Qualcomm tag/version PV = "v4.0.11.213X" -SRCBRANCH = "qca65X4/dey-3.0/maint" +SRCBRANCH = "qca65X4/master" SRCREV = "${AUTOREV}" QCOM_GIT_URI = "${@oe.utils.conditional('DIGI_INTERNAL_GIT', '1' , '${DIGI_MTK_GIT}linux/qcacld-2.0.git;protocol=ssh', '${DIGI_GITHUB_GIT}/qcacld-2.0.git;protocol=https', d)}" diff --git a/meta-digi-arm/recipes-kernel/linux/linux-dey-src.inc b/meta-digi-arm/recipes-kernel/linux/linux-dey-src.inc index 0774cb146..e857daf17 100644 --- a/meta-digi-arm/recipes-kernel/linux/linux-dey-src.inc +++ b/meta-digi-arm/recipes-kernel/linux/linux-dey-src.inc @@ -4,7 +4,7 @@ LICENSE = "GPLv2" LIC_FILES_CHKSUM = "file://COPYING;md5=bbea815ee2795b2f4230826c0c6b8814" LOCALVERSION = "-dey" -SRCBRANCH = "v5.4/dey-3.0/maint" +SRCBRANCH = "v5.4.24/master" SRCREV = "${AUTOREV}" # Select internal or Github Linux repo diff --git a/meta-digi-dey/recipes-digi/dey-examples/dey-examples-src.inc b/meta-digi-dey/recipes-digi/dey-examples/dey-examples-src.inc index 4e66757e4..f155541ce 100644 --- a/meta-digi-dey/recipes-digi/dey-examples/dey-examples-src.inc +++ b/meta-digi-dey/recipes-digi/dey-examples/dey-examples-src.inc @@ -1,6 +1,6 @@ # Copyright (C) 2019,2020, Digi International Inc. -SRCBRANCH = "dey-3.0/maint" +SRCBRANCH = "master" SRCREV = "${AUTOREV}" DEY_EXAMPLES_STASH = "${DIGI_MTK_GIT}dey/dey-examples.git;protocol=ssh" diff --git a/meta-digi-dey/recipes-digi/libdigiapix/libdigiapix_git.bb b/meta-digi-dey/recipes-digi/libdigiapix/libdigiapix_git.bb index 9d977bb28..f796b04c8 100644 --- a/meta-digi-dey/recipes-digi/libdigiapix/libdigiapix_git.bb +++ b/meta-digi-dey/recipes-digi/libdigiapix/libdigiapix_git.bb @@ -8,7 +8,7 @@ LIC_FILES_CHKSUM = "file://${COMMON_LICENSE_DIR}/ISC;md5=f3b90e78ea0cffb20bf5cca DEPENDS = "libsoc libsocketcan libgpiod" -SRCBRANCH ?= "dey-3.0/maint" +SRCBRANCH ?= "master" SRCREV = "${AUTOREV}" LIBDIGIAPIX_URI_STASH = "${DIGI_MTK_GIT}dey/libdigiapix.git;protocol=ssh" From b8a6fe6ea08e747324e6a13974c54932798ecf1e Mon Sep 17 00:00:00 2001 From: Hector Palacios Date: Mon, 26 Oct 2020 11:24:06 +0100 Subject: [PATCH 02/57] dey.conf: bump DEY version to -r3 Signed-off-by: Hector Palacios --- meta-digi-dey/conf/distro/dey.conf | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/meta-digi-dey/conf/distro/dey.conf b/meta-digi-dey/conf/distro/dey.conf index d46f9a346..d42c93df6 100644 --- a/meta-digi-dey/conf/distro/dey.conf +++ b/meta-digi-dey/conf/distro/dey.conf @@ -1,6 +1,6 @@ DISTRO = "dey" DISTRO_NAME = "Digi Embedded Yocto" -DISTRO_VERSION = "3.0-r2" +DISTRO_VERSION = "3.0-r3" DISTRO_CODENAME = "zeus" SDK_VENDOR = "-deysdk" SDK_VERSION := "${@d.getVar('DISTRO_VERSION')}" From a759099d53b292b54f30d285a97d719f71ab0e7d Mon Sep 17 00:00:00 2001 From: Hector Bujanda Date: Wed, 28 Oct 2020 01:05:42 +0100 Subject: [PATCH 03/57] recipes-bsp: firmware-imx: Update recipes to new BSP release imx_5.4.47_2.2.0 Includes: firmware-imx: Drop BASH dependency [YOCIMX-4613] Signed-off-by: Hector Bujanda --- meta-digi-arm/recipes-bsp/firmware-imx/files/epdc | 2 +- meta-digi-arm/recipes-bsp/firmware-imx/files/hdmi | 2 +- meta-digi-arm/recipes-bsp/firmware-imx/files/regulatory | 2 +- meta-digi-arm/recipes-bsp/firmware-imx/files/sdma | 2 +- .../{firmware-imx-8.8.inc => firmware-imx-8.9.inc} | 6 +++--- .../{firmware-imx-8_8.8.bb => firmware-imx-8_8.9.bb} | 0 .../{firmware-imx-8m_8.8.bb => firmware-imx-8m_8.9.bb} | 0 .../{firmware-imx_8.8.bb => firmware-imx_8.9.bb} | 5 ----- 8 files changed, 7 insertions(+), 12 deletions(-) rename meta-digi-arm/recipes-bsp/firmware-imx/{firmware-imx-8.8.inc => firmware-imx-8.9.inc} (58%) rename meta-digi-arm/recipes-bsp/firmware-imx/{firmware-imx-8_8.8.bb => firmware-imx-8_8.9.bb} (100%) rename meta-digi-arm/recipes-bsp/firmware-imx/{firmware-imx-8m_8.8.bb => firmware-imx-8m_8.9.bb} (100%) rename meta-digi-arm/recipes-bsp/firmware-imx/{firmware-imx_8.8.bb => firmware-imx_8.9.bb} (97%) diff --git a/meta-digi-arm/recipes-bsp/firmware-imx/files/epdc b/meta-digi-arm/recipes-bsp/firmware-imx/files/epdc index e06f8d77b..8b4f80ffe 100644 --- a/meta-digi-arm/recipes-bsp/firmware-imx/files/epdc +++ b/meta-digi-arm/recipes-bsp/firmware-imx/files/epdc @@ -1,4 +1,4 @@ -#!/bin/bash +#!/bin/sh # # firmware loader script diff --git a/meta-digi-arm/recipes-bsp/firmware-imx/files/hdmi b/meta-digi-arm/recipes-bsp/firmware-imx/files/hdmi index f5562c805..5bf276314 100644 --- a/meta-digi-arm/recipes-bsp/firmware-imx/files/hdmi +++ b/meta-digi-arm/recipes-bsp/firmware-imx/files/hdmi @@ -1,4 +1,4 @@ -#!/bin/bash +#!/bin/sh # # firmware loader script diff --git a/meta-digi-arm/recipes-bsp/firmware-imx/files/regulatory b/meta-digi-arm/recipes-bsp/firmware-imx/files/regulatory index e548df29e..db65d661c 100644 --- a/meta-digi-arm/recipes-bsp/firmware-imx/files/regulatory +++ b/meta-digi-arm/recipes-bsp/firmware-imx/files/regulatory @@ -1,4 +1,4 @@ -#!/bin/bash +#!/bin/sh # # firmware loader script diff --git a/meta-digi-arm/recipes-bsp/firmware-imx/files/sdma b/meta-digi-arm/recipes-bsp/firmware-imx/files/sdma index 0defd413c..fb0a76964 100644 --- a/meta-digi-arm/recipes-bsp/firmware-imx/files/sdma +++ b/meta-digi-arm/recipes-bsp/firmware-imx/files/sdma @@ -1,4 +1,4 @@ -#!/bin/bash +#!/bin/sh # # firmware loader script diff --git a/meta-digi-arm/recipes-bsp/firmware-imx/firmware-imx-8.8.inc b/meta-digi-arm/recipes-bsp/firmware-imx/firmware-imx-8.9.inc similarity index 58% rename from meta-digi-arm/recipes-bsp/firmware-imx/firmware-imx-8.8.inc rename to meta-digi-arm/recipes-bsp/firmware-imx/firmware-imx-8.9.inc index 148311918..8a132f373 100644 --- a/meta-digi-arm/recipes-bsp/firmware-imx/firmware-imx-8.8.inc +++ b/meta-digi-arm/recipes-bsp/firmware-imx/firmware-imx-8.9.inc @@ -3,14 +3,14 @@ # Copyright (C) 2018 O.S. Systems Software LTDA. SECTION = "base" LICENSE = "Proprietary" -LIC_FILES_CHKSUM = "file://COPYING;md5=228c72f2a91452b8a03c4cab30f30ef9" +LIC_FILES_CHKSUM = "file://COPYING;md5=983e4c77621568488dd902b27e0c2143" SRC_URI = " \ ${FSL_MIRROR}/firmware-imx-${PV}.bin;fsl-eula=true \ " -SRC_URI[md5sum] = "eabb27d28bba375a9f14d6306c07af5f" -SRC_URI[sha256sum] = "5ca1f8b6e6b191594d17ac7b51c38cdbc2ff808d15568ab4b0bbeb5dc6c621f6" +SRC_URI[md5sum] = "7b36242be60a882f9b5f74bb6e2c6aa1" +SRC_URI[sha256sum] = "a72f70fd2ecaa58800bb88ed672fddc322ab9843ee7777eb89b82016b0aa3614" S = "${WORKDIR}/firmware-imx-${PV}" diff --git a/meta-digi-arm/recipes-bsp/firmware-imx/firmware-imx-8_8.8.bb b/meta-digi-arm/recipes-bsp/firmware-imx/firmware-imx-8_8.9.bb similarity index 100% rename from meta-digi-arm/recipes-bsp/firmware-imx/firmware-imx-8_8.8.bb rename to meta-digi-arm/recipes-bsp/firmware-imx/firmware-imx-8_8.9.bb diff --git a/meta-digi-arm/recipes-bsp/firmware-imx/firmware-imx-8m_8.8.bb b/meta-digi-arm/recipes-bsp/firmware-imx/firmware-imx-8m_8.9.bb similarity index 100% rename from meta-digi-arm/recipes-bsp/firmware-imx/firmware-imx-8m_8.8.bb rename to meta-digi-arm/recipes-bsp/firmware-imx/firmware-imx-8m_8.9.bb diff --git a/meta-digi-arm/recipes-bsp/firmware-imx/firmware-imx_8.8.bb b/meta-digi-arm/recipes-bsp/firmware-imx/firmware-imx_8.9.bb similarity index 97% rename from meta-digi-arm/recipes-bsp/firmware-imx/firmware-imx_8.8.bb rename to meta-digi-arm/recipes-bsp/firmware-imx/firmware-imx_8.9.bb index 6857f9caf..7c163241f 100644 --- a/meta-digi-arm/recipes-bsp/firmware-imx/firmware-imx_8.8.bb +++ b/meta-digi-arm/recipes-bsp/firmware-imx/firmware-imx_8.9.bb @@ -107,11 +107,6 @@ PACKAGES_DYNAMIC = "${PN}-vpu-* ${PN}-sdma-*" PACKAGES =+ "${PN}-epdc ${PN}-sdma ${PN}-easrc ${PN}-regulatory ${PN}-hdmi ${PN}-xcvr ${PN}-xuvi" -RDEPENDS_${PN}-epdc = "bash" -RDEPENDS_${PN}-sdma = "bash" -RDEPENDS_${PN}-regulatory = "bash" -RDEPENDS_${PN}-hdmi = "bash" - FILES_${PN}-epdc = "${base_libdir}/firmware/imx/epdc/ ${sysconfdir}/epdc ${systemd_system_unitdir}/epdc-firmware.service" FILES_${PN}-scfw = "${base_libdir}/firmware/scfw/" FILES_${PN}-sdma = "${base_libdir}/firmware/imx/sdma ${sysconfdir}/sdma ${systemd_system_unitdir}/sdma-firmware.service" From 7cb54315ee5fd8d93754c6fc5029170ce31a1fb9 Mon Sep 17 00:00:00 2001 From: Hector Bujanda Date: Wed, 28 Oct 2020 01:14:37 +0100 Subject: [PATCH 04/57] recipes-bsp: imx-aft: Update recipes to new BSP release imx_5.4.47_2.2.0 Includes: imx-atf: Unify PLATFORM for i.MX 8DXL boards [YOCIMX-4852] Signed-off-by: Hector Bujanda --- meta-digi-arm/recipes-bsp/imx-atf/imx-atf_2.2.bb | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/meta-digi-arm/recipes-bsp/imx-atf/imx-atf_2.2.bb b/meta-digi-arm/recipes-bsp/imx-atf/imx-atf_2.2.bb index 3867fe927..52ae48dcf 100644 --- a/meta-digi-arm/recipes-bsp/imx-atf/imx-atf_2.2.bb +++ b/meta-digi-arm/recipes-bsp/imx-atf/imx-atf_2.2.bb @@ -7,11 +7,11 @@ LIC_FILES_CHKSUM = "file://${COREBASE}/meta/files/common-licenses/BSD-3-Clause;m PV .= "+git${SRCPV}" -SRCBRANCH = "imx_5.4.24_2.1.0" +SRCBRANCH = "imx_5.4.47_2.2.0" ATF_SRC ?= "git://source.codeaurora.org/external/imx/imx-atf.git;protocol=https" SRC_URI = "${ATF_SRC};branch=${SRCBRANCH} \ " -SRCREV = "b0a00f22b09c13572d3e87902a1069dee34763bd" +SRCREV = "c949a888e909811db191500c51456391dff61284" SRC_URI_append_ccimx8mn = " file://0001-imx8mn-Disable-M7-debug-console.patch" @@ -22,7 +22,7 @@ inherit deploy BOOT_TOOLS = "imx-boot-tools" PLATFORM ?= "INVALID" -PLATFORM_imx8dxlevk = "imx8dxl" +PLATFORM_mx8dxl = "imx8dxl" PLATFORM_mx8dx = "imx8dx" PLATFORM_mx8dxlevk-phantom = "imx8qx" PLATFORM_mx8mm = "imx8mm" From 125debb9c12d670ed8236bcae8f396b31cd5253c Mon Sep 17 00:00:00 2001 From: Hector Bujanda Date: Wed, 28 Oct 2020 01:24:50 +0100 Subject: [PATCH 05/57] recipes-bsp: imx-mkimage: Update recipes to new BSP release imx_5.4.47_2.2.0 Includes: imx-boot_1.0.bb: Update M4 binary name for i.MX 8QM [YOCIMX-4866] 8QM M4 demos unified the binary name. Change name make it more easy for understanding. imx-boot: Update the build option for iMX 8DXL Phantom C0 new boards [YOCIMX-4663] Signed-off-by: Hector Bujanda --- meta-digi-arm/recipes-bsp/imx-mkimage/imx-boot_1.0.bb | 5 +++-- meta-digi-arm/recipes-bsp/imx-mkimage/imx-mkimage_git.inc | 4 ++-- 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/meta-digi-arm/recipes-bsp/imx-mkimage/imx-boot_1.0.bb b/meta-digi-arm/recipes-bsp/imx-mkimage/imx-boot_1.0.bb index 80c443211..ebf2e6a53 100644 --- a/meta-digi-arm/recipes-bsp/imx-mkimage/imx-boot_1.0.bb +++ b/meta-digi-arm/recipes-bsp/imx-mkimage/imx-boot_1.0.bb @@ -95,6 +95,7 @@ SOC_FAMILY_mx8x = "mx8x" REV_OPTION ?= "" REV_OPTION_mx8qxpc0 = "REV=C0" +REV_OPTION_mx8phantomdxl = "REV=C0" compile_mx8m() { bbnote 8MQ/8MM boot binary build @@ -126,9 +127,9 @@ compile_mx8() { cp ${DEPLOY_DIR_IMAGE}/u-boot-spl.bin-${MACHINE}-${UBOOT_CONFIG} \ ${BOOT_STAGING}/u-boot-spl.bin fi - cp ${DEPLOY_DIR_IMAGE}/imx8qm_m4_0_TCM_power_mode_switch_m40.bin \ + cp ${DEPLOY_DIR_IMAGE}/imx8qm_m4_TCM_power_mode_switch_m40.bin \ ${BOOT_STAGING}/m4_image.bin - cp ${DEPLOY_DIR_IMAGE}/imx8qm_m4_1_TCM_power_mode_switch_m41.bin \ + cp ${DEPLOY_DIR_IMAGE}/imx8qm_m4_TCM_power_mode_switch_m41.bin \ ${BOOT_STAGING}/m4_1_image.bin cp ${DEPLOY_DIR_IMAGE}/${SECO_FIRMWARE_NAME} ${BOOT_STAGING} } diff --git a/meta-digi-arm/recipes-bsp/imx-mkimage/imx-mkimage_git.inc b/meta-digi-arm/recipes-bsp/imx-mkimage/imx-mkimage_git.inc index 8e21029dc..2e78eff48 100644 --- a/meta-digi-arm/recipes-bsp/imx-mkimage/imx-mkimage_git.inc +++ b/meta-digi-arm/recipes-bsp/imx-mkimage/imx-mkimage_git.inc @@ -2,10 +2,10 @@ DEPENDS = "zlib openssl" -SRCBRANCH = "imx_5.4.24_2.1.0" +SRCBRANCH = "imx_5.4.47_2.2.0" IMX_MKIMAGE_SRC ?= "git://source.codeaurora.org/external/imx/imx-mkimage.git;protocol=https" SRC_URI = "${IMX_MKIMAGE_SRC};branch=${SRCBRANCH}" -SRCREV = "6745ccdcf15384891639b7ced3aa6ce938682365" +SRCREV = "8da5cd231881df44b5fa21a36820536d86e413db" S = "${WORKDIR}/git" BOOT_TOOLS = "imx-boot-tools" From dab847eee4f22a5282a932b119ffa48f8aab00d0 Mon Sep 17 00:00:00 2001 From: Hector Bujanda Date: Wed, 28 Oct 2020 01:55:38 +0100 Subject: [PATCH 06/57] recipes-bsp: imx-seco: Update recipes to new BSP release imx_5.4.47_2.2.0 Includes: imx-seco-libs: Switch branch to imx_5.4.47_2.2.0 multilib: imx-seco-libs: Fix LIBDIR imx-seco.inc: use c0 for 8dxl phantom with new c0 boards Signed-off-by: Hector Bujanda --- ...001-Makefile-Fix-LIBDIR-for-multilib.patch | 26 +++++++++++++++++++ .../recipes-bsp/imx-seco/imx-seco-libs_git.bb | 8 +++--- .../recipes-bsp/imx-seco/imx-seco.inc | 2 +- .../{imx-seco_3.6.3.bb => imx-seco_3.7.1.bb} | 6 ++--- 4 files changed, 35 insertions(+), 7 deletions(-) create mode 100644 meta-digi-arm/recipes-bsp/imx-seco/0001-Makefile-Fix-LIBDIR-for-multilib.patch rename meta-digi-arm/recipes-bsp/imx-seco/{imx-seco_3.6.3.bb => imx-seco_3.7.1.bb} (70%) diff --git a/meta-digi-arm/recipes-bsp/imx-seco/0001-Makefile-Fix-LIBDIR-for-multilib.patch b/meta-digi-arm/recipes-bsp/imx-seco/0001-Makefile-Fix-LIBDIR-for-multilib.patch new file mode 100644 index 000000000..d1784e255 --- /dev/null +++ b/meta-digi-arm/recipes-bsp/imx-seco/0001-Makefile-Fix-LIBDIR-for-multilib.patch @@ -0,0 +1,26 @@ +From 9e89d173a7fab97c913960344ae01dfa409b6258 Mon Sep 17 00:00:00 2001 +From: Cristinel Panfir +Date: Mon, 27 Jul 2020 18:55:30 +0000 +Subject: [PATCH] Makefile: Fix LIBDIR for multilib + +Signed-off-by: Cristinel Panfir +--- + Makefile | 3 ++- + 1 file changed, 2 insertions(+), 1 deletion(-) + +diff --git a/Makefile b/Makefile +index b16cebf..492d700 100644 +--- a/Makefile ++++ b/Makefile +@@ -4,7 +4,8 @@ all: she_test hsm_test v2x_test she_lib.a seco_nvm_manager.a sm_lib.a + CFLAGS = -O1 -Werror -fPIC + DESTDIR ?= export + BINDIR ?= /usr/bin +-LIBDIR ?= /usr/lib ++base_libdir ?= /lib ++LIBDIR ?= /usr/$(base_libdir) + INCLUDEDIR ?= /usr/include + + ifdef COVERAGE +-- +2.7.4 diff --git a/meta-digi-arm/recipes-bsp/imx-seco/imx-seco-libs_git.bb b/meta-digi-arm/recipes-bsp/imx-seco/imx-seco-libs_git.bb index 0ea18cf5c..eb98afa6a 100644 --- a/meta-digi-arm/recipes-bsp/imx-seco/imx-seco-libs_git.bb +++ b/meta-digi-arm/recipes-bsp/imx-seco/imx-seco-libs_git.bb @@ -8,10 +8,12 @@ LIC_FILES_CHKSUM = "file://EULA.txt;md5=228c72f2a91452b8a03c4cab30f30ef9" DEPENDS = "zlib" -SRCBRANCH = "imx_5.4.24_2.1.0" +SRCBRANCH = "imx_5.4.47_2.2.0" SECO_LIB_SRC ?= "git://github.com/NXP/imx-seco-libs.git;protocol=https" -SRC_URI = "${SECO_LIB_SRC};branch=${SRCBRANCH}" -SRCREV = "a4faaa474e49fa0d3668db466739834fe45a6767" +SRC_URI = "${SECO_LIB_SRC};branch=${SRCBRANCH} \ + file://0001-Makefile-Fix-LIBDIR-for-multilib.patch \ +" +SRCREV = "5932c1e5240eb36c3cddc7bcbdc7abd9bd8b562c" S = "${WORKDIR}/git" diff --git a/meta-digi-arm/recipes-bsp/imx-seco/imx-seco.inc b/meta-digi-arm/recipes-bsp/imx-seco/imx-seco.inc index 4e7f1a665..e40d91ea5 100644 --- a/meta-digi-arm/recipes-bsp/imx-seco/imx-seco.inc +++ b/meta-digi-arm/recipes-bsp/imx-seco/imx-seco.inc @@ -2,7 +2,7 @@ SECO_FIRMWARE_NAME ?= "UNSUPPORTED" SECO_FIRMWARE_NAME_mx8qm = "mx8qmb0-ahab-container.img" SECO_FIRMWARE_NAME_mx8qxp = "mx8qxb0-ahab-container.img" SECO_FIRMWARE_NAME_mx8qxpc0 = "mx8qxc0-ahab-container.img" -SECO_FIRMWARE_NAME_mx8phantomdxl = "mx8qxb0-ahab-container.img" +SECO_FIRMWARE_NAME_mx8phantomdxl = "mx8qxc0-ahab-container.img" SECO_FIRMWARE_NAME_mx8dxl = "mx8dxla0-ahab-container.img" # For the ccimx8x, we generate images for both the B0 and the C0 revisions of diff --git a/meta-digi-arm/recipes-bsp/imx-seco/imx-seco_3.6.3.bb b/meta-digi-arm/recipes-bsp/imx-seco/imx-seco_3.7.1.bb similarity index 70% rename from meta-digi-arm/recipes-bsp/imx-seco/imx-seco_3.6.3.bb rename to meta-digi-arm/recipes-bsp/imx-seco/imx-seco_3.7.1.bb index 51fcd69b2..78bbfc7f1 100644 --- a/meta-digi-arm/recipes-bsp/imx-seco/imx-seco_3.6.3.bb +++ b/meta-digi-arm/recipes-bsp/imx-seco/imx-seco_3.7.1.bb @@ -4,15 +4,15 @@ SUMMARY = "NXP i.MX SECO firmware" DESCRIPTION = "NXP IMX SECO firmware" SECTION = "base" LICENSE = "Proprietary" -LIC_FILES_CHKSUM = "file://COPYING;md5=228c72f2a91452b8a03c4cab30f30ef9" +LIC_FILES_CHKSUM = "file://COPYING;md5=983e4c77621568488dd902b27e0c2143" require imx-seco.inc inherit fsl-eula-unpack deploy SRC_URI = "${FSL_MIRROR}/${BP}.bin;fsl-eula=true" -SRC_URI[md5sum] = "22a47e14e3f2e713b4b1b2b7ff768b11" -SRC_URI[sha256sum] = "52ba07633e0f8707d8c26724b5cd03ef96444c8de1e0e134acac50acacf3e7dd" +SRC_URI[md5sum] = "29d563790bf46629a083ba031a7de46d" +SRC_URI[sha256sum] = "b09f63139df6c4dfef3533570cd60b22eb4c48eed05f314268178e80b8de40fc" do_compile[noexec] = "1" From 6c554dd682116db237adc606ac17419325fcee15 Mon Sep 17 00:00:00 2001 From: Hector Bujanda Date: Wed, 28 Oct 2020 10:01:36 +0100 Subject: [PATCH 07/57] recipes-bsp: imx-vpu: Update recipes to new BSP release imx_5.4.47_2.2.0 Includes: imx-vpu: Fix selected version for 6Q and 6DL [LF-1816] An older version of imx-vpu, from upstream, is being selected for the image instead of the current one. The problem is the override imxvpucnm used for the COMPATIBLE_MACHINE is no longer being used. Update the recipe to use SOC overrides instead. Signed-off-by: Tom Hochstein Signed-off-by: Hector Bujanda --- meta-digi-arm/recipes-bsp/imx-vpu/imx-vpu_5.4.39.3.bb | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/meta-digi-arm/recipes-bsp/imx-vpu/imx-vpu_5.4.39.3.bb b/meta-digi-arm/recipes-bsp/imx-vpu/imx-vpu_5.4.39.3.bb index b7c288bd5..15147cede 100644 --- a/meta-digi-arm/recipes-bsp/imx-vpu/imx-vpu_5.4.39.3.bb +++ b/meta-digi-arm/recipes-bsp/imx-vpu/imx-vpu_5.4.39.3.bb @@ -28,6 +28,4 @@ do_install() { oe_runmake PLATFORM="${PLATFORM}" DEST_DIR="${D}" install } -# Compatible only for i.MX with Chips&Media VPU -COMPATIBLE_MACHINE = "(^$)" -COMPATIBLE_MACHINE_imxvpucnm = "${MACHINE}" +COMPATIBLE_MACHINE = "(mx6q|mx6dl)" From adebdabac98fa33b630605a0f283226e124b7b29 Mon Sep 17 00:00:00 2001 From: Hector Bujanda Date: Wed, 28 Oct 2020 10:37:53 +0100 Subject: [PATCH 08/57] recipes-core: systemd-gpuconfig: Update recipes to new BSP release imx_5.4.47_2.2.0 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Includes: gpuconfig/rc_gpu.S: Update the lib names of libOpenVG [YOCIMX-4888] In imx-gpu-viv 6.4.3, the 2D/3D OpenVG lib names are changed: libOpenVG.2d.so – > libOpenVG.2d.so.1.1.0 libOpenVG.3d.so – > libOpenVG.3d.so.1.1.0 Signed-off-by: Hector Bujanda --- .../recipes-core/systemd/systemd-gpuconfig/gpuconfig | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/meta-digi-dey/recipes-core/systemd/systemd-gpuconfig/gpuconfig b/meta-digi-dey/recipes-core/systemd/systemd-gpuconfig/gpuconfig index 792ab6c7d..9da22000b 100644 --- a/meta-digi-dey/recipes-core/systemd/systemd-gpuconfig/gpuconfig +++ b/meta-digi-dey/recipes-core/systemd/systemd-gpuconfig/gpuconfig @@ -1,8 +1,8 @@ #!/bin/sh CPUREV=$(cat /sys/devices/soc0/soc_id) FILEVG=/usr/lib/libOpenVG.so -FILEVG3D=/usr/lib/libOpenVG.3d.so -FILEVG355=/usr/lib/libOpenVG.2d.so +FILEVG3D=/usr/lib/libOpenVG.3d.so.1.1.0 +FILEVG355=/usr/lib/libOpenVG.2d.so.1.1.0 if [ -e $FILEVG3D ] && [ -e $FILEVG355 ] then if [ -e $FILEVG ] From 508b85947248798cc326e994600b810993444277 Mon Sep 17 00:00:00 2001 From: Hector Bujanda Date: Wed, 28 Oct 2020 11:23:37 +0100 Subject: [PATCH 09/57] recipes-graphics: imx-dpu-g2d: Update recipes to new BSP release imx_5.4.47_2.2.0 Signed-off-by: Hector Bujanda --- .../recipes-graphics/imx-dpu-g2d/imx-dpu-g2d_1.8.7.bb | 8 -------- .../recipes-graphics/imx-dpu-g2d/imx-dpu-g2d_1.8.9.bb | 8 ++++++++ 2 files changed, 8 insertions(+), 8 deletions(-) delete mode 100644 meta-digi-dey/recipes-graphics/imx-dpu-g2d/imx-dpu-g2d_1.8.7.bb create mode 100644 meta-digi-dey/recipes-graphics/imx-dpu-g2d/imx-dpu-g2d_1.8.9.bb diff --git a/meta-digi-dey/recipes-graphics/imx-dpu-g2d/imx-dpu-g2d_1.8.7.bb b/meta-digi-dey/recipes-graphics/imx-dpu-g2d/imx-dpu-g2d_1.8.7.bb deleted file mode 100644 index 24f8a2e0e..000000000 --- a/meta-digi-dey/recipes-graphics/imx-dpu-g2d/imx-dpu-g2d_1.8.7.bb +++ /dev/null @@ -1,8 +0,0 @@ -require recipes-graphics/imx-dpu-g2d/imx-dpu-g2d_1.7.0.bb - -LIC_FILES_CHKSUM = "file://COPYING;md5=228c72f2a91452b8a03c4cab30f30ef9" - -SRC_URI[md5sum] = "2b8fea58c87a724c1d5c023ee8bd551b" -SRC_URI[sha256sum] = "7533e34f447e8b076fa6461ac83806efdd677310094741eef2a67858034730fe" - -RDEPENDS_${PN} += "libopencl-imx" diff --git a/meta-digi-dey/recipes-graphics/imx-dpu-g2d/imx-dpu-g2d_1.8.9.bb b/meta-digi-dey/recipes-graphics/imx-dpu-g2d/imx-dpu-g2d_1.8.9.bb new file mode 100644 index 000000000..b4d4b24bd --- /dev/null +++ b/meta-digi-dey/recipes-graphics/imx-dpu-g2d/imx-dpu-g2d_1.8.9.bb @@ -0,0 +1,8 @@ +require recipes-graphics/imx-dpu-g2d/imx-dpu-g2d_1.7.0.bb + +LIC_FILES_CHKSUM = "file://COPYING;md5=983e4c77621568488dd902b27e0c2143" + +SRC_URI[md5sum] = "e532d99c1116ac8b685cd03aab3f4c75" +SRC_URI[sha256sum] = "c48e2d408be9c4bf2731546bece39216c79856e554fd22f6c3040603a2348c72" + +RDEPENDS_${PN} += "libopencl-imx" From 8487909875e276996c7c2bd84aa3e3e10f0769d4 Mon Sep 17 00:00:00 2001 From: Hector Bujanda Date: Wed, 28 Oct 2020 11:29:51 +0100 Subject: [PATCH 10/57] recipes-graphics: imx-gpu-g2d: Update recipes to new BSP release imx_5.4.47_2.2.0 Signed-off-by: Hector Bujanda --- .../imx-gpu-g2d/imx-gpu-g2d_6.4.0.p2.4.bb | 10 ---------- .../imx-gpu-g2d/imx-gpu-g2d_6.4.3.p0.0.bb | 10 ++++++++++ 2 files changed, 10 insertions(+), 10 deletions(-) delete mode 100644 meta-digi-dey/recipes-graphics/imx-gpu-g2d/imx-gpu-g2d_6.4.0.p2.4.bb create mode 100644 meta-digi-dey/recipes-graphics/imx-gpu-g2d/imx-gpu-g2d_6.4.3.p0.0.bb diff --git a/meta-digi-dey/recipes-graphics/imx-gpu-g2d/imx-gpu-g2d_6.4.0.p2.4.bb b/meta-digi-dey/recipes-graphics/imx-gpu-g2d/imx-gpu-g2d_6.4.0.p2.4.bb deleted file mode 100644 index ff14aab09..000000000 --- a/meta-digi-dey/recipes-graphics/imx-gpu-g2d/imx-gpu-g2d_6.4.0.p2.4.bb +++ /dev/null @@ -1,10 +0,0 @@ -require recipes-graphics/imx-gpu-g2d/imx-gpu-g2d_6.2.4.p4.0.bb - -LIC_FILES_CHKSUM = "file://COPYING;md5=228c72f2a91452b8a03c4cab30f30ef9" - -FSLBIN_NAME_arm = "${PN}-${PV}-${TARGET_ARCH}" - -SRC_URI[aarch64.md5sum] = "88f98e03f3f85c9a768ea5e4ff7475fa" -SRC_URI[aarch64.sha256sum] = "553bbe9ee1caa222fd14b835deb2afedf9ed936b7a13424328df75892286f666" -SRC_URI[arm.md5sum] = "3b12892309d166554c697a87e8084b16" -SRC_URI[arm.sha256sum] = "010bab5780476f26406e16b058514453dc235a0e7f4b995fa03c976d06e5cb96" diff --git a/meta-digi-dey/recipes-graphics/imx-gpu-g2d/imx-gpu-g2d_6.4.3.p0.0.bb b/meta-digi-dey/recipes-graphics/imx-gpu-g2d/imx-gpu-g2d_6.4.3.p0.0.bb new file mode 100644 index 000000000..e1e7ce278 --- /dev/null +++ b/meta-digi-dey/recipes-graphics/imx-gpu-g2d/imx-gpu-g2d_6.4.3.p0.0.bb @@ -0,0 +1,10 @@ +require recipes-graphics/imx-gpu-g2d/imx-gpu-g2d_6.2.4.p4.0.bb + +LIC_FILES_CHKSUM = "file://COPYING;md5=983e4c77621568488dd902b27e0c2143" + +FSLBIN_NAME_arm = "${PN}-${PV}-${TARGET_ARCH}" + +SRC_URI[aarch64.md5sum] = "38d161708c42bb01362b7ba7f91bb6b4" +SRC_URI[aarch64.sha256sum] = "97ee90c81fa0db88e3249cb7df77f17f816ceb9a40355e03f72df99e600d7331" +SRC_URI[arm.md5sum] = "0011979d36205b1a3f03b404d6af4085" +SRC_URI[arm.sha256sum] = "725ad2edd41661713540d5e32509c754cda452acc608955689b8a64977b26ced" From 7f120705a0d583d104b0e7070422eedd2b6f0627 Mon Sep 17 00:00:00 2001 From: Hector Bujanda Date: Wed, 28 Oct 2020 12:12:48 +0100 Subject: [PATCH 11/57] recipes-graphics: wayland: Update recipes to new BSP release imx_5.4.47_2.2.0 Includes: Revert "weston-init: Fix being underrun with superTile format and video playing on i.mx8dxmek [YOCIMX-4227]" The setting has been merged into driver [MGS-5713] This reverts commit bfaf99da16df2b7fd56ec6454406d5a71e90aa9f. Signed-off-by: Hector Bujanda --- meta-digi-dey/recipes-graphics/wayland/weston-init.bbappend | 1 - .../recipes-graphics/wayland/weston-init/mx8dx/weston.config | 2 -- meta-digi-dey/recipes-graphics/wayland/weston_8.0.0.imx.bb | 2 +- 3 files changed, 1 insertion(+), 4 deletions(-) delete mode 100644 meta-digi-dey/recipes-graphics/wayland/weston-init/mx8dx/weston.config diff --git a/meta-digi-dey/recipes-graphics/wayland/weston-init.bbappend b/meta-digi-dey/recipes-graphics/wayland/weston-init.bbappend index 0e885d562..74739dbf6 100644 --- a/meta-digi-dey/recipes-graphics/wayland/weston-init.bbappend +++ b/meta-digi-dey/recipes-graphics/wayland/weston-init.bbappend @@ -7,7 +7,6 @@ SRC_URI += " \ file://profile \ " -SRC_URI_append_mx8dx = "${@bb.utils.contains('DISTRO_FEATURES', 'wayland', ' file://weston.config', '', d)}" # To customize weston.ini, start by setting the desired assignment in weston.ini, # commented out. For example: diff --git a/meta-digi-dey/recipes-graphics/wayland/weston-init/mx8dx/weston.config b/meta-digi-dey/recipes-graphics/wayland/weston-init/mx8dx/weston.config deleted file mode 100644 index 0b6119628..000000000 --- a/meta-digi-dey/recipes-graphics/wayland/weston-init/mx8dx/weston.config +++ /dev/null @@ -1,2 +0,0 @@ -#!/bin/sh -GBM_SET_FORMAT_MOD_LINEAR=1 diff --git a/meta-digi-dey/recipes-graphics/wayland/weston_8.0.0.imx.bb b/meta-digi-dey/recipes-graphics/wayland/weston_8.0.0.imx.bb index 0430c2826..244651044 100644 --- a/meta-digi-dey/recipes-graphics/wayland/weston_8.0.0.imx.bb +++ b/meta-digi-dey/recipes-graphics/wayland/weston_8.0.0.imx.bb @@ -3,7 +3,7 @@ require recipes-graphics/wayland/weston_7.0.0.bb SRC_URI_remove = "https://wayland.freedesktop.org/releases/${BPN}-${PV}.tar.xz" WESTON_SRC ?= "git://source.codeaurora.org/external/imx/weston-imx.git;protocol=https" SRC_URI_prepend = "${WESTON_SRC};branch=weston-imx-8.0 " -SRCREV = "27cde5253235104c45b8ce72963e7ae159134f89" +SRCREV = "f13d40a3a0504a00baf2f28abe83b65dab8b2e10" S = "${WORKDIR}/git" # Disable OpenGL for parts with GPU support for 2D but not 3D From 06755b1e7cf2f120d98694d18568acd455bbf6c7 Mon Sep 17 00:00:00 2001 From: Hector Bujanda Date: Wed, 28 Oct 2020 13:29:56 +0100 Subject: [PATCH 12/57] recipes-kernel: Switch to kernel v5.4.47 Signed-off-by: Hector Bujanda --- meta-digi-arm/recipes-kernel/linux/linux-dey-src.inc | 2 +- meta-digi-arm/recipes-kernel/linux/linux-imx-headers_5.4.bb | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/meta-digi-arm/recipes-kernel/linux/linux-dey-src.inc b/meta-digi-arm/recipes-kernel/linux/linux-dey-src.inc index e857daf17..f6bc0b22b 100644 --- a/meta-digi-arm/recipes-kernel/linux/linux-dey-src.inc +++ b/meta-digi-arm/recipes-kernel/linux/linux-dey-src.inc @@ -4,7 +4,7 @@ LICENSE = "GPLv2" LIC_FILES_CHKSUM = "file://COPYING;md5=bbea815ee2795b2f4230826c0c6b8814" LOCALVERSION = "-dey" -SRCBRANCH = "v5.4.24/master" +SRCBRANCH = "v5.4.47/master" SRCREV = "${AUTOREV}" # Select internal or Github Linux repo diff --git a/meta-digi-arm/recipes-kernel/linux/linux-imx-headers_5.4.bb b/meta-digi-arm/recipes-kernel/linux/linux-imx-headers_5.4.bb index bf3d9eb6e..b944c0467 100644 --- a/meta-digi-arm/recipes-kernel/linux/linux-imx-headers_5.4.bb +++ b/meta-digi-arm/recipes-kernel/linux/linux-imx-headers_5.4.bb @@ -1,4 +1,4 @@ -# Copyright 2017-2018 NXP +# Copyright 2017-2020 NXP # Released under the MIT license (see COPYING.MIT for the terms) SUMMARY = "Installs i.MX-specific kernel headers" From f776a19ac25afc22fc209687494730596b314e9f Mon Sep 17 00:00:00 2001 From: Hector Bujanda Date: Wed, 28 Oct 2020 13:43:05 +0100 Subject: [PATCH 13/57] recipes-multimedia: alsa: Update recipes to new BSP release imx_5.4.47_2.2.0 Includes: imx-alsa-plugins: Switch branch to MM_04.05.06_2008_L5.4.47 Signed-off-by: i.MX Yocto Project Build Signed-off-by: Hector Bujanda --- meta-digi-dey/recipes-multimedia/alsa/imx-alsa-plugins_git.bb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/meta-digi-dey/recipes-multimedia/alsa/imx-alsa-plugins_git.bb b/meta-digi-dey/recipes-multimedia/alsa/imx-alsa-plugins_git.bb index 7bdc5878e..b0aab8d45 100644 --- a/meta-digi-dey/recipes-multimedia/alsa/imx-alsa-plugins_git.bb +++ b/meta-digi-dey/recipes-multimedia/alsa/imx-alsa-plugins_git.bb @@ -18,7 +18,7 @@ LIC_FILES_CHKSUM = "file://COPYING.GPL;md5=94d55d512a9ba36caa9b7df079bae19f" inherit autotools pkgconfig use-imx-headers IMXALSA_SRC ?= "git://source.codeaurora.org/external/imx/imx-alsa-plugins.git;protocol=https" -SRCBRANCH = "MM_04.05.05_2005_L5.4.24" +SRCBRANCH = "MM_04.05.06_2008_L5.4.47" SRC_URI = "${IMXALSA_SRC};branch=${SRCBRANCH}" SRCREV = "cde60d68ab2acee913dbfacb8aabb53d87dd3e38" From acd74f785824634dcc2ac63f3e0e2c690e6f5db9 Mon Sep 17 00:00:00 2001 From: Hector Bujanda Date: Thu, 29 Oct 2020 01:29:37 +0100 Subject: [PATCH 14/57] recipes-multimedia: gstreamer: Update recipes to new BSP release imx_5.4.47_2.2.0 Includes: gstreamer1.0: Switch branch to MM_04.05.06_2008_L5.4.47 imx-gst1.0-plugin: Switch branch to MM_04.05.06_2008_L5.4.47 gstreamer1.0-plugins-bad: Switch branch to MM_04.05.06_2008_L5.4.47 gstreamer1.0-plugins-base: Switch branch to MM_04.05.06_2008_L5.4.47 gstreamer1.0-plugins-good: Switch branch to MM_04.05.06_2008_L5.4.47 Signed-off-by: i.MX Yocto Project Build Added tinycompress by depencecies Signed-off-by: Hector Bujanda --- ...=> gstreamer1.0-plugins-bad_1.16.2.imx.bb} | 10 +- ...> gstreamer1.0-plugins-base_1.16.2.imx.bb} | 6 +- ...> gstreamer1.0-plugins-good_1.16.2.imx.bb} | 6 +- ...1.16.imx.bb => gstreamer1.0_1.16.2.imx.bb} | 6 +- ...in_4.5.5.bb => imx-gst1.0-plugin_4.5.6.bb} | 4 +- .../0001-tinycompress-Add-id3-decoding.patch | 1001 +++++++++++++++++ .../0002-cplay-Support-wave-file.patch | 221 ++++ .../0003-cplay-Add-pause-feature.patch | 147 +++ ...ss-NULL-buffer-with-0-size-to-driver.patch | 41 + .../tinycompress/tinycompress_1.1.6.bb | 18 + 10 files changed, 1441 insertions(+), 19 deletions(-) rename meta-digi-dey/recipes-multimedia/gstreamer/{gstreamer1.0-plugins-bad_1.16.imx.bb => gstreamer1.0-plugins-bad_1.16.2.imx.bb} (85%) rename meta-digi-dey/recipes-multimedia/gstreamer/{gstreamer1.0-plugins-base_1.16.imx.bb => gstreamer1.0-plugins-base_1.16.2.imx.bb} (92%) rename meta-digi-dey/recipes-multimedia/gstreamer/{gstreamer1.0-plugins-good_1.16.imx.bb => gstreamer1.0-plugins-good_1.16.2.imx.bb} (87%) rename meta-digi-dey/recipes-multimedia/gstreamer/{gstreamer1.0_1.16.imx.bb => gstreamer1.0_1.16.2.imx.bb} (88%) rename meta-digi-dey/recipes-multimedia/gstreamer/{imx-gst1.0-plugin_4.5.5.bb => imx-gst1.0-plugin_4.5.6.bb} (97%) create mode 100755 meta-digi-dey/recipes-multimedia/tinycompress/tinycompress/0001-tinycompress-Add-id3-decoding.patch create mode 100755 meta-digi-dey/recipes-multimedia/tinycompress/tinycompress/0002-cplay-Support-wave-file.patch create mode 100755 meta-digi-dey/recipes-multimedia/tinycompress/tinycompress/0003-cplay-Add-pause-feature.patch create mode 100755 meta-digi-dey/recipes-multimedia/tinycompress/tinycompress/0004-tinycompress-pass-NULL-buffer-with-0-size-to-driver.patch create mode 100644 meta-digi-dey/recipes-multimedia/tinycompress/tinycompress_1.1.6.bb diff --git a/meta-digi-dey/recipes-multimedia/gstreamer/gstreamer1.0-plugins-bad_1.16.imx.bb b/meta-digi-dey/recipes-multimedia/gstreamer/gstreamer1.0-plugins-bad_1.16.2.imx.bb similarity index 85% rename from meta-digi-dey/recipes-multimedia/gstreamer/gstreamer1.0-plugins-bad_1.16.imx.bb rename to meta-digi-dey/recipes-multimedia/gstreamer/gstreamer1.0-plugins-bad_1.16.2.imx.bb index ab32983b8..6dc268c0d 100644 --- a/meta-digi-dey/recipes-multimedia/gstreamer/gstreamer1.0-plugins-bad_1.16.imx.bb +++ b/meta-digi-dey/recipes-multimedia/gstreamer/gstreamer1.0-plugins-bad_1.16.2.imx.bb @@ -3,14 +3,12 @@ require recipes-multimedia/gstreamer/gstreamer1.0-plugins-bad_1.16.2.bb DEPENDS += "jpeg libdrm" DEPENDS_append_imxgpu2d = " virtual/libg2d" -PV = "1.16.1.imx" - FILESEXTRAPATHS_prepend := "${COREBASE}/meta/recipes-multimedia/gstreamer/${PN}:" FILESEXTRAPATHS_prepend := "${COREBASE}/meta/recipes-multimedia/gstreamer/files:" GST1.0-PLUGINS-BAD_SRC ?= "gitsm://source.codeaurora.org/external/imx/gst-plugins-bad.git;protocol=https" -SRCBRANCH = "MM_04.05.05_2005_L5.4.24" -SRCREV = "2fdaef1839ebfef7ea3bc8c1c59463a9ef0ae19a" +SRCBRANCH = "MM_04.05.06_2008_L5.4.47" +SRCREV = "3f6c1ccbabe46a709680b32ce7d5bc521854e08e" SRC_URI = " \ ${GST1.0-PLUGINS-BAD_SRC};branch=${SRCBRANCH} \ file://configure-allow-to-disable-libssh2.patch \ @@ -22,6 +20,8 @@ SRC_URI = " \ S = "${WORKDIR}/git" +PACKAGECONFIG[tinycompress] = "--enable-tinycompress,--disable-tinycompress,tinycompress" + # This remove "--exclude=autopoint" option from autoreconf argument to avoid # configure.ac:30: error: required file './ABOUT-NLS' not found EXTRA_AUTORECONF = "" @@ -31,7 +31,7 @@ PACKAGE_ARCH_mx8 = "${MACHINE_SOCARCH}" PACKAGECONFIG_append_mx6q = " opencv" PACKAGECONFIG_append_mx6qp = " opencv" -PACKAGECONFIG_append_mx8 = " opencv kms" +PACKAGECONFIG_append_mx8 = " opencv kms tinycompress" #Remove vulkan as it's incompatible for i.MX 8M Mini PACKAGECONFIG_remove_mx8mm = " vulkan" diff --git a/meta-digi-dey/recipes-multimedia/gstreamer/gstreamer1.0-plugins-base_1.16.imx.bb b/meta-digi-dey/recipes-multimedia/gstreamer/gstreamer1.0-plugins-base_1.16.2.imx.bb similarity index 92% rename from meta-digi-dey/recipes-multimedia/gstreamer/gstreamer1.0-plugins-base_1.16.imx.bb rename to meta-digi-dey/recipes-multimedia/gstreamer/gstreamer1.0-plugins-base_1.16.2.imx.bb index a3787d465..53f5ec87e 100644 --- a/meta-digi-dey/recipes-multimedia/gstreamer/gstreamer1.0-plugins-base_1.16.imx.bb +++ b/meta-digi-dey/recipes-multimedia/gstreamer/gstreamer1.0-plugins-base_1.16.2.imx.bb @@ -1,14 +1,12 @@ require recipes-multimedia/gstreamer/gstreamer1.0-plugins-base_1.16.2.bb -PV = "1.16.1.imx" - FILESEXTRAPATHS_prepend := "${COREBASE}/meta/recipes-multimedia/gstreamer/files:" FILESEXTRAPATHS_prepend := "${COREBASE}/meta/recipes-multimedia/gstreamer/${PN}:" FILESEXTRAPATHS_prepend := "${THISDIR}/${PN}:" GST1.0-PLUGINS-BASE_SRC ?= "gitsm://source.codeaurora.org/external/imx/gst-plugins-base.git;protocol=https" -SRCBRANCH = "MM_04.05.05_2005_L5.4.24" -SRCREV = "cad00a3c4318c787c9661990e8f9328e4a69a329" +SRCBRANCH = "MM_04.05.06_2008_L5.4.47" +SRCREV = "3c4aa2a58576d68f6e684efa58609665679c9969" SRC_URI = " \ ${GST1.0-PLUGINS-BASE_SRC};branch=${SRCBRANCH} \ file://0001-introspection.m4-prefix-pkgconfig-paths-with-PKG_CON.patch \ diff --git a/meta-digi-dey/recipes-multimedia/gstreamer/gstreamer1.0-plugins-good_1.16.imx.bb b/meta-digi-dey/recipes-multimedia/gstreamer/gstreamer1.0-plugins-good_1.16.2.imx.bb similarity index 87% rename from meta-digi-dey/recipes-multimedia/gstreamer/gstreamer1.0-plugins-good_1.16.imx.bb rename to meta-digi-dey/recipes-multimedia/gstreamer/gstreamer1.0-plugins-good_1.16.2.imx.bb index 3f346d6a4..78c8a60bc 100644 --- a/meta-digi-dey/recipes-multimedia/gstreamer/gstreamer1.0-plugins-good_1.16.imx.bb +++ b/meta-digi-dey/recipes-multimedia/gstreamer/gstreamer1.0-plugins-good_1.16.2.imx.bb @@ -1,13 +1,11 @@ require recipes-multimedia/gstreamer/gstreamer1.0-plugins-good_1.16.2.bb -PV = "1.16.1.imx" - FILESEXTRAPATHS_prepend := "${COREBASE}/meta/recipes-multimedia/gstreamer/${PN}:" FILESEXTRAPATHS_prepend := "${COREBASE}/meta/recipes-multimedia/gstreamer/files:" GST1.0-PLUGINS-GOOD_SRC ?= "gitsm://source.codeaurora.org/external/imx/gst-plugins-good.git;protocol=https" -SRCBRANCH = "MM_04.05.05_2005_L5.4.24" -SRCREV = "fc6d8ccf3bd775517fafb1ce1d9224312d2812d8" +SRCBRANCH = "MM_04.05.06_2008_L5.4.47" +SRCREV = "a1ba15d53aab342dd921261148562f47eeed7d98" SRC_URI = " \ ${GST1.0-PLUGINS-GOOD_SRC};branch=${SRCBRANCH} \ diff --git a/meta-digi-dey/recipes-multimedia/gstreamer/gstreamer1.0_1.16.imx.bb b/meta-digi-dey/recipes-multimedia/gstreamer/gstreamer1.0_1.16.2.imx.bb similarity index 88% rename from meta-digi-dey/recipes-multimedia/gstreamer/gstreamer1.0_1.16.imx.bb rename to meta-digi-dey/recipes-multimedia/gstreamer/gstreamer1.0_1.16.2.imx.bb index f3b4c1c1f..d3bcaec46 100644 --- a/meta-digi-dey/recipes-multimedia/gstreamer/gstreamer1.0_1.16.imx.bb +++ b/meta-digi-dey/recipes-multimedia/gstreamer/gstreamer1.0_1.16.2.imx.bb @@ -1,13 +1,11 @@ require recipes-multimedia/gstreamer/gstreamer1.0_1.16.2.bb -PV = "1.16.1.imx" - FILESEXTRAPATHS_prepend := "${COREBASE}/meta/recipes-multimedia/gstreamer/files:" # Use i.MX fork of GST for customizations GST1.0_SRC ?= "gitsm://source.codeaurora.org/external/imx/gstreamer.git;protocol=https" -SRCBRANCH = "MM_04.05.05_2005_L5.4.24" -SRCREV = "beca1b382febc2ba38a21fcb8f5092209773eb7f" +SRCBRANCH = "MM_04.05.06_2008_L5.4.47" +SRCREV = "8514bc61ccab208a65e387eab9347276a8e770e7" SRC_URI = " \ ${GST1.0_SRC};branch=${SRCBRANCH} \ file://0001-introspection.m4-prefix-pkgconfig-paths-with-PKG_CON.patch \ diff --git a/meta-digi-dey/recipes-multimedia/gstreamer/imx-gst1.0-plugin_4.5.5.bb b/meta-digi-dey/recipes-multimedia/gstreamer/imx-gst1.0-plugin_4.5.6.bb similarity index 97% rename from meta-digi-dey/recipes-multimedia/gstreamer/imx-gst1.0-plugin_4.5.5.bb rename to meta-digi-dey/recipes-multimedia/gstreamer/imx-gst1.0-plugin_4.5.6.bb index e8ccccb39..7c253c13a 100644 --- a/meta-digi-dey/recipes-multimedia/gstreamer/imx-gst1.0-plugin_4.5.5.bb +++ b/meta-digi-dey/recipes-multimedia/gstreamer/imx-gst1.0-plugin_4.5.6.bb @@ -21,12 +21,12 @@ LIC_FILES_CHKSUM = "file://COPYING-LGPL-2;md5=5f30f0716dfdd0d91eb439ebec522ec2 \ file://COPYING-LGPL-2.1;md5=fbc093901857fcd118f065f900982c24" IMXGST_SRC ?= "git://source.codeaurora.org/external/imx/imx-gst1.0-plugin.git;protocol=https" -SRCBRANCH = "MM_04.05.05_2005_L5.4.24" +SRCBRANCH = "MM_04.05.06_2008_L5.4.47" SRC_URI = "${IMXGST_SRC};branch=${SRCBRANCH} \ file://0001-imx-gst1.0-plugin-Update-KERNEL_VERSION-check.patch \ " -SRCREV = "4d2e5c1547c5f8a5e4e26a034ab87c809b34fb54" +SRCREV = "a4373418f5884de7d2da63581d3905f0e3a5d842" S = "${WORKDIR}/git" diff --git a/meta-digi-dey/recipes-multimedia/tinycompress/tinycompress/0001-tinycompress-Add-id3-decoding.patch b/meta-digi-dey/recipes-multimedia/tinycompress/tinycompress/0001-tinycompress-Add-id3-decoding.patch new file mode 100755 index 000000000..f578148a1 --- /dev/null +++ b/meta-digi-dey/recipes-multimedia/tinycompress/tinycompress/0001-tinycompress-Add-id3-decoding.patch @@ -0,0 +1,1001 @@ +From 16f6b7a5baec41f18fde75fd311fb988e3c31810 Mon Sep 17 00:00:00 2001 +From: Shengjiu Wang +Date: Fri, 13 Jul 2018 18:13:24 +0800 +Subject: [PATCH] tinycompress: Add id3 decoding + +Signed-off-by: Shengjiu Wang +--- + include/tinycompress/id3_tag_decode.h | 198 +++++++++++ + src/utils/Makefile.am | 2 +- + src/utils/cplay.c | 88 +++++ + src/utils/id3_tag_decode.c | 642 ++++++++++++++++++++++++++++++++++ + 4 files changed, 929 insertions(+), 1 deletion(-) + create mode 100644 include/tinycompress/id3_tag_decode.h + create mode 100644 src/utils/id3_tag_decode.c + +diff --git a/include/tinycompress/id3_tag_decode.h b/include/tinycompress/id3_tag_decode.h +new file mode 100644 +index 0000000..1a911d7 +--- /dev/null ++++ b/include/tinycompress/id3_tag_decode.h +@@ -0,0 +1,198 @@ ++/* ++ * Copyright (c) 2006-2017 Cadence Design Systems, Inc. ++ * Copyright 2018 NXP ++ * ++ * Permission is hereby granted, free of charge, to any person obtaining ++ * a copy of this software and associated documentation files (the ++ * "Software"), to deal in the Software without restriction, including ++ * without limitation the rights to use, copy, modify, merge, publish, ++ * distribute, sublicense, and/or sell copies of the Software, and to ++ * permit persons to whom the Software is furnished to do so, subject to ++ * the following conditions: ++ * ++ * The above copyright notice and this permission notice shall be included ++ * in all copies or substantial portions of the Software. ++ * ++ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, ++ * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF ++ * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. ++ * IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY ++ * CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, ++ * TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE ++ * SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. ++ */ ++ ++/****************************************************************** ++ * file name : id3_tag_decode.h ++ * ++ * description : stores typedefs of structures specific to MP3 tag ++ * ++ * revision history: ++ * 29 04 2004 DK creation ++ *****************************************************************/ ++ ++#ifndef ID3_TAG_DECODE_H ++#define ID3_TAG_DECODE_H ++ ++typedef signed char WORD8; ++typedef signed char * pWORD8; ++typedef unsigned char UWORD8; ++typedef unsigned char * pUWORD8; ++ ++typedef signed short WORD16; ++typedef signed short * pWORD16; ++typedef unsigned short UWORD16; ++typedef unsigned short * pUWORD16; ++ ++typedef signed int WORD24; ++typedef signed int * pWORD24; ++typedef unsigned int UWORD24; ++typedef unsigned int * pUWORD24; ++ ++typedef signed int WORD32; ++typedef signed int * pWORD32; ++typedef unsigned int UWORD32; ++typedef unsigned int * pUWORD32; ++ ++typedef void VOID; ++typedef void * pVOID; ++ ++typedef signed int BOOL; ++typedef unsigned int UBOOL; ++typedef signed int FLAG; ++typedef unsigned int UFLAG; ++typedef signed int LOOPIDX; ++typedef unsigned int ULOOPIDX; ++typedef signed int WORD; ++typedef unsigned int UWORD; ++ ++#define MAX_TAG_FRAME_SIZE 100 ++ ++#define ID3V1 (0x544147) /* 0x544147 is TAG in WORD8 */ ++ ++#define ID3V2 (0x494433) /* 0x494433 is ID3 in WORD8 */ ++ ++/* ++ * structure corresponding to ID3 tag v1 header. ++ * this structure has all the field corresponding to ID3 tag v1 header. ++ */ ++ ++typedef struct { ++ WORD32 tag; // 3 bytes ++ ++ WORD16 version; // 2 bytes ++ ++ WORD8 flag; //1 byte ++ ++ WORD32 size; //4 bytes ++ ++} id3_v2_header_struct; ++ ++/* structure which will store the frame data and ++ * also put a limit max data to be stored ++ */ ++typedef struct { ++ WORD8 frame_data[MAX_TAG_FRAME_SIZE]; ++ ++ WORD32 max_size; //4 bytes ++ ++ WORD16 tag_present; ++ ++ WORD16 exceeds_buffer_size; ++ ++} id3_v2_frame_struct; ++ ++/* ++ * structure corresponding to ID3 tag v2. ++ * this structure has some of the field corresponding to ID3 tag v2. ++ * if user wants to read some more tag information from ++ * the MP3 file, he can add that field in this structure and pass address ++ * of that element to get_inf function in id3_tag_decode.c under the ++ * corresponding field frame header. few fields which are needed are already ++ * populated by reading from the TAG header. ++ */ ++typedef struct { ++ id3_v2_frame_struct album_movie_show_title; ++ ++ id3_v2_frame_struct composer_name; ++ ++ id3_v2_frame_struct content_type; ++ ++ id3_v2_frame_struct encoded_by; ++ ++ id3_v2_frame_struct lyricist_text_writer; ++ ++ id3_v2_frame_struct content_group_description; ++ ++ id3_v2_frame_struct title_songname_content_description; ++ ++ id3_v2_frame_struct medxa_type; ++ ++ id3_v2_frame_struct original_album_movie_show_title; ++ ++ id3_v2_frame_struct original_filename; ++ ++ id3_v2_frame_struct original_lyricist_text_writer; ++ ++ id3_v2_frame_struct original_artist_performer; ++ ++ id3_v2_frame_struct file_owner_licensee; ++ ++ id3_v2_frame_struct lead_performer_soloist; ++ ++ id3_v2_frame_struct publisher; ++ ++ id3_v2_frame_struct private_frame; ++ ++ id3_v2_frame_struct other_info; ++ ++ id3_v2_header_struct id3_v2_header; ++ ++ WORD32 header_end; ++ ++ WORD32 bytes_consumed; ++ ++} id3v2_struct; ++ ++/* ++ * structure corresponding to ID3 tag v1. ++ * this structure has all the field corresponding to ID3 tag v1. ++ */ ++typedef struct { ++ WORD8 song_title[30]; //30 word8acters ++ ++ WORD8 artist[30]; //30 word8acters ++ ++ WORD8 album[30]; //30 word8acters ++ ++ WORD8 year[4]; //4 word8acters ++ ++ WORD8 comment[30]; //30 word8acters ++ ++ WORD8 genre[1]; //1 byte ++ ++} id3v1_struct; ++ ++WORD32 get_info(const char *inp_buffer, ++ unsigned int avail_inp, ++ WORD32 tag_size, ++ id3_v2_frame_struct *dest); ++ ++WORD32 search_id3_v2(UWORD8 *buffer); ++ ++WORD32 decode_id3_v2(const char *const buffer, ++ id3v2_struct *id3v2, ++ WORD32 continue_flag, ++ WORD32 insize); ++ ++WORD32 get_id3_v2_bytes(UWORD8 *buffer); ++ ++WORD32 get_v1_info(UWORD8 *buffer, id3v1_struct *id3v1); ++ ++WORD32 search_id3_v1(UWORD8 *buffer); ++ ++WORD32 decode_id3_v1(UWORD8 *buffer, id3v1_struct *id3v1); ++ ++void init_id3v2_field(id3v2_struct *id3v2); ++ ++#endif +diff --git a/src/utils/Makefile.am b/src/utils/Makefile.am +index 1b996d4..e813689 100644 +--- a/src/utils/Makefile.am ++++ b/src/utils/Makefile.am +@@ -1,6 +1,6 @@ + bin_PROGRAMS = cplay crecord + +-cplay_SOURCES = cplay.c ++cplay_SOURCES = cplay.c id3_tag_decode.c + crecord_SOURCES = crecord.c + + cplay_CFLAGS = -I$(top_srcdir)/include +diff --git a/src/utils/cplay.c b/src/utils/cplay.c +index 87863a3..2a52b52 100644 +--- a/src/utils/cplay.c ++++ b/src/utils/cplay.c +@@ -72,6 +72,7 @@ + #include "sound/compress_params.h" + #include "tinycompress/tinycompress.h" + #include "tinycompress/tinymp3.h" ++#include "tinycompress/id3_tag_decode.h" + + static int verbose; + static const unsigned int DEFAULT_CODEC_ID = SND_AUDIOCODEC_PCM; +@@ -245,12 +246,97 @@ int main(int argc, char **argv) + exit(EXIT_SUCCESS); + } + ++void shift_buffer(char *buf, int buf_size, int bytes_consumed) ++{ ++ int i; ++ ++ if (bytes_consumed <= 0) ++ return; ++ ++ for (i = 0; i < buf_size - bytes_consumed; i++) ++ buf[i] = buf[i + bytes_consumed]; ++} ++ ++void parse_id3(FILE *file, int *offset) { ++ /* ID3 tag specific declarations */ ++ unsigned char id3_buf[128]; ++ unsigned char id3v2_buf[4096]; ++ signed int id3_v1_found = 0, id3_v1_decoded = 0; ++ signed int id3_v2_found = 0, id3_v2_complete = 0; ++ signed int i_bytes_consumed = 0; ++ signed int i_fread_bytes; ++ id3v1_struct id3v1; ++ id3v2_struct id3v2; ++ ++ { ++ fseek(file, -128, SEEK_END); ++ fread(id3_buf, 1, 128, file); ++ ++ /* search for ID3V1 */ ++ id3_v1_found = search_id3_v1(id3_buf + 0); ++ if (id3_v1_found) { ++ /* if ID3V1 is found, decode ID3V1 */ ++ decode_id3_v1(id3_buf + 3, &id3v1); ++ id3_v1_decoded = 1; ++ } ++ fseek(file, 0, SEEK_SET); ++ } ++ ++ { ++ signed int flag = 0; ++ signed int continue_flag = 0; ++ ++ i_fread_bytes = fread(id3v2_buf, ++ sizeof(char), 0x1000, file); ++ ++ /* search for ID3V2 */ ++ id3_v2_found = ++ search_id3_v2(id3v2_buf); ++ ++ if (id3_v2_found) { ++ /* initialise the max fields */ ++ init_id3v2_field(&id3v2); ++ ++ while (!id3_v2_complete && id3_v2_found) { ++ /* if ID3V2 is found, decode ID3V2 */ ++ id3_v2_complete = decode_id3_v2((const char *const)id3v2_buf, ++ &id3v2, continue_flag, i_fread_bytes); ++ ++ if (!id3_v2_complete) { ++ continue_flag = 1; ++ i_bytes_consumed = id3v2.bytes_consumed; ++ ++ fseek(file, i_bytes_consumed, SEEK_SET); ++ ++ i_fread_bytes = fread(id3v2_buf, ++ sizeof(unsigned char), 0x1000, file); ++ if (i_fread_bytes <= 0) { ++ return; ++ } ++ } ++ } ++ ++ if (id3_v2_complete) { ++ i_bytes_consumed = id3v2.bytes_consumed; ++ fseek(file, i_bytes_consumed, SEEK_SET); ++ } ++ } ++ } ++ ++ *offset = i_bytes_consumed; ++} ++ + void get_codec_mp3(FILE *file, struct compr_config *config, + struct snd_codec *codec) + { + size_t read; + struct mp3_header header; + unsigned int channels, rate, bits; ++ int offset = 0; ++ ++ parse_id3(file, &offset); ++ ++ fseek(file, offset, SEEK_SET); + + read = fread(&header, 1, sizeof(header), file); + if (read != sizeof(header)) { +@@ -279,6 +365,8 @@ void get_codec_mp3(FILE *file, struct compr_config *config, + codec->level = 0; + codec->ch_mode = 0; + codec->format = 0; ++ ++ fseek(file, offset, SEEK_SET); + } + + void get_codec_iec(FILE *file, struct compr_config *config, +diff --git a/src/utils/id3_tag_decode.c b/src/utils/id3_tag_decode.c +new file mode 100644 +index 0000000..393967a +--- /dev/null ++++ b/src/utils/id3_tag_decode.c +@@ -0,0 +1,642 @@ ++/* ++ * Copyright (c) 2006-2017 Cadence Design Systems, Inc. ++ * Copyright 2018 NXP ++ * ++ * Permission is hereby granted, free of charge, to any person obtaining ++ * a copy of this software and associated documentation files (the ++ * "Software"), to deal in the Software without restriction, including ++ * without limitation the rights to use, copy, modify, merge, publish, ++ * distribute, sublicense, and/or sell copies of the Software, and to ++ * permit persons to whom the Software is furnished to do so, subject to ++ * the following conditions: ++ * ++ * The above copyright notice and this permission notice shall be included ++ * in all copies or substantial portions of the Software. ++ * ++ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, ++ * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF ++ * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. ++ * IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY ++ * CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, ++ * TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE ++ * SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. ++ */ ++#include ++#include "tinycompress/id3_tag_decode.h" ++ ++#define CHAR4(c1, c2, c3, c4) \ ++ (int)(((unsigned char)(c1) << 24) | \ ++ ((unsigned char)(c2) << 16) | \ ++ ((unsigned char)(c3) << 8) | \ ++ ((unsigned char)c4)) ++ ++#ifndef MSVC_BUILD ++unsigned int umin(unsigned int a, unsigned int b) ++{ ++ return (a < b ? a : b); ++} ++ ++#else ++unsigned int umin(unsigned int a, unsigned int b) ++{ ++ return (a < b ? a : b); ++} ++#endif ++ ++/*********************************************************** ++ * function name : display ++ * ++ * description : display ID3 tag contents. ++ * ++ * arguments : input parameters ++ * ++ * values returned : 0 ++ ***********************************************************/ ++ ++static void display2(const id3_v2_frame_struct * const src, ++ int size, ++ const char * const disp) ++{ ++ int j; ++ ++ ++ for (j = 0; j < size; j++) { ++ int c = src->frame_data[j]; ++ ++ if (c) { ++ if (!isprint(c)) ++ break; ++ } ++ } ++} ++ ++static VOID display1(WORD8 src[], WORD32 size, WORD8 disp[]) ++{ ++ WORD32 j; ++ ++ for (j = 0; j < size ; j++) { ++ int c = src[j]; ++ ++ if (c) { ++ if (!isprint(c)) ++ break; ++ } ++ } ++} ++ ++/***************************************************************** ++ * function name : init_id3_header ++ * ++ * description : initialise the max filed size of teh farem. ++ * ++ * arguments : input parameters ++ * ++ * values returned : 0 ++ ****************************************************************/ ++ ++VOID init_id3v2_field(id3v2_struct *id3v2) ++{ ++ id3v2->album_movie_show_title.max_size = MAX_TAG_FRAME_SIZE; ++ id3v2->composer_name.max_size = MAX_TAG_FRAME_SIZE; ++ id3v2->content_type.max_size = MAX_TAG_FRAME_SIZE; ++ id3v2->encoded_by.max_size = MAX_TAG_FRAME_SIZE; ++ id3v2->lyricist_text_writer.max_size = MAX_TAG_FRAME_SIZE; ++ id3v2->content_group_description.max_size = MAX_TAG_FRAME_SIZE; ++ id3v2->title_songname_content_description.max_size = MAX_TAG_FRAME_SIZE; ++ id3v2->medxa_type.max_size = MAX_TAG_FRAME_SIZE; ++ id3v2->original_album_movie_show_title.max_size = MAX_TAG_FRAME_SIZE; ++ id3v2->original_filename.max_size = MAX_TAG_FRAME_SIZE; ++ id3v2->original_lyricist_text_writer.max_size = MAX_TAG_FRAME_SIZE; ++ id3v2->original_artist_performer.max_size = MAX_TAG_FRAME_SIZE; ++ id3v2->file_owner_licensee.max_size = MAX_TAG_FRAME_SIZE; ++ id3v2->lead_performer_soloist.max_size = MAX_TAG_FRAME_SIZE; ++ id3v2->publisher.max_size = MAX_TAG_FRAME_SIZE; ++ id3v2->private_frame.max_size = MAX_TAG_FRAME_SIZE; ++ id3v2->other_info.max_size = MAX_TAG_FRAME_SIZE; ++ ++ /* resetting the flag to indicate presese of frame */ ++ id3v2->album_movie_show_title.tag_present = 0; ++ id3v2->composer_name.tag_present = 0; ++ id3v2->content_type.tag_present = 0; ++ id3v2->encoded_by.tag_present = 0; ++ id3v2->lyricist_text_writer.tag_present = 0; ++ id3v2->content_group_description.tag_present = 0; ++ id3v2->title_songname_content_description.tag_present = 0; ++ id3v2->medxa_type.tag_present = 0; ++ id3v2->original_album_movie_show_title.tag_present = 0; ++ id3v2->original_filename.tag_present = 0; ++ id3v2->original_lyricist_text_writer.tag_present = 0; ++ id3v2->original_artist_performer.tag_present = 0; ++ id3v2->file_owner_licensee.tag_present = 0; ++ id3v2->lead_performer_soloist.tag_present = 0; ++ id3v2->publisher.tag_present = 0; ++ id3v2->private_frame.tag_present = 0; ++ id3v2->other_info.tag_present = 0; ++ ++ /* resetting the flag which indicates that size of the frame has ++ * exceeded the max buffer size ++ */ ++ id3v2->album_movie_show_title.exceeds_buffer_size = 0; ++ id3v2->composer_name.exceeds_buffer_size = 0; ++ id3v2->content_type.exceeds_buffer_size = 0; ++ id3v2->encoded_by.exceeds_buffer_size = 0; ++ id3v2->lyricist_text_writer.exceeds_buffer_size = 0; ++ id3v2->content_group_description.exceeds_buffer_size = 0; ++ id3v2->title_songname_content_description.exceeds_buffer_size = 0; ++ id3v2->medxa_type.exceeds_buffer_size = 0; ++ id3v2->original_album_movie_show_title.exceeds_buffer_size = 0; ++ id3v2->original_filename.exceeds_buffer_size = 0; ++ id3v2->original_lyricist_text_writer.exceeds_buffer_size = 0; ++ id3v2->original_artist_performer.exceeds_buffer_size = 0; ++ id3v2->file_owner_licensee.exceeds_buffer_size = 0; ++ id3v2->lead_performer_soloist.exceeds_buffer_size = 0; ++ id3v2->publisher.exceeds_buffer_size = 0; ++ id3v2->private_frame.exceeds_buffer_size = 0; ++ id3v2->other_info.exceeds_buffer_size = 0; ++ ++ id3v2->bytes_consumed = 0; ++ id3v2->header_end = 0; ++} ++ ++/*************************************************************** ++ * function name : search_id3_v2 ++ * ++ * description : finds if ID3V2 starts at the start of given buffer. ++ * ++ * arguments : input parameters ++ * buffer input buffer ++ * ++ * values returned : FLAG 1: ID3 found 0: ID3 not found ++ ***************************************************************/ ++WORD32 search_id3_v2(UWORD8 *buffer) ++{ ++ UWORD32 temp; ++ ++ temp = buffer[0] << 16; ++ temp |= buffer[1] << 8; ++ temp |= buffer[2]; ++ ++ if (temp == ID3V2) ++ return 1; /* ID3 found */ ++ ++ return 0; /* ID3 not found */ ++} ++ ++/************************************************************** ++ * function name : search_id3_v1 ++ * ++ * description : finds if ID3V1 starts at the start of given buffer. ++ * ++ * arguments : input parameters ++ * buffer input buffer ++ * ++ * values returned : FLAG 1: ID3 found 0: ID3 not found ++ **************************************************************/ ++WORD32 search_id3_v1(UWORD8 *buffer) ++{ ++ UWORD32 temp; ++ ++ temp = buffer[0] << 16; ++ temp |= buffer[1] << 8; ++ temp |= buffer[2]; ++ ++ if (temp == ID3V1) ++ return 1; /* ID3 found */ ++ ++ return 0; /* ID3 not found */ ++} ++ ++/*************************************************************** ++ * function name : decode_id3_v1 ++ * ++ * description : decodes ID3V1 tag. ++ * ++ * arguments : input parameters ++ * buffer input buffer ++ * id3v1 structure ++ * ++ * values returned : bytes consumed ++ **************************************************************/ ++WORD32 decode_id3_v1(UWORD8 *buffer, id3v1_struct *id3v1) ++{ ++ WORD32 bytes_consumed = 0; ++ short tag_type; ++ ++ /* setting the tag type */ ++ tag_type = 1; ++ ++ bytes_consumed = get_v1_info(buffer, id3v1); ++ ++ return bytes_consumed; ++} ++ ++/*********************************************************** ++ * function name : get_v1_info ++ * ++ * description : gets ID3V1 information fields. ++ * ++ * arguments : input parameters ++ * buffer input buffer ++ * id3v1 structure ++ * ++ * values returned : bytes consumed ++ ***********************************************************/ ++WORD32 get_v1_info(UWORD8 *buffer, id3v1_struct *id3v1) ++{ ++ WORD32 i; ++ WORD32 bytes_consumed = 0; ++ ++ /* get song_title */ ++ for (i = 0; i < 30; i++) ++ id3v1->song_title[i] = buffer[i]; ++ ++ buffer += 30; ++ bytes_consumed += 30; ++ display1(id3v1->song_title, 30, (WORD8 *)"song_title : "); ++ ++ /* get artist */ ++ for (i = 0; i < 30; i++) ++ id3v1->artist[i] = buffer[i]; ++ ++ buffer += 30; ++ bytes_consumed += 30; ++ display1(id3v1->artist, 30, (WORD8 *)"artist : "); ++ ++ /* get album */ ++ for (i = 0; i < 30; i++) ++ id3v1->album[i] = buffer[i]; ++ ++ buffer += 30; ++ bytes_consumed += 30; ++ display1(id3v1->album, 30, (WORD8 *)"album : "); ++ ++ /* get year */ ++ for (i = 0; i < 4; i++) ++ id3v1->year[i] = buffer[i]; ++ ++ buffer += 4; ++ bytes_consumed += 4; ++ display1(id3v1->year, 4, (WORD8 *)"year : "); ++ ++ /* get comment */ ++ for (i = 0; i < 30; i++) ++ id3v1->comment[i] = buffer[i]; ++ ++ buffer += 30; ++ bytes_consumed += 30; ++ display1(id3v1->comment, 30, (WORD8 *)"comment : "); ++ ++ /* get genre */ ++ for (i = 0; i < 1; i++) ++ id3v1->genre[i] = buffer[i]; ++ ++ buffer += 1; ++ bytes_consumed += 1; ++ ++ return bytes_consumed; ++} ++ ++/***************************************************** ++ * function name : decode_id3_v2 ++ * ++ * description : decodes ID3V2 tag. ++ * ++ * arguments : input parameters ++ * buffer input buffer ++ * id3v2 structure ++ * continue_flag FLAG to indicate whether ++ * it is first call or not ++ * insize input buffer size ++ * ++ * values returned : bytes consumed ++ ******************************************************/ ++WORD32 decode_id3_v2(const char *const buffer, ++ id3v2_struct *const id3v2, ++ WORD32 continue_flag, ++ WORD32 insize) ++{ ++ UWORD32 size = 0, flag; ++ WORD32 i, buf_update_val; ++ UWORD8 buf[4], frame_header[10], id3_buffer[10]; ++ WORD8 *bitstream_ptr; ++ short tag_type; ++ ++ WORD32 bytes_consumed = 0; ++ ++ if (id3v2->header_end == 1) { ++ id3v2->bytes_consumed += insize; ++ if (id3v2->bytes_consumed < id3v2->id3_v2_header.size) ++ return 0; ++ ++ id3v2->bytes_consumed = (id3v2->id3_v2_header.size + 10); ++ return 1; ++ } ++ ++ bitstream_ptr = (WORD8 *)id3_buffer; ++ ++ if (!continue_flag) { ++ bytes_consumed += 3; ++ /* setting the tag type */ ++ tag_type = 2; ++ id3v2->id3_v2_header.version = buffer[bytes_consumed + 0] << 8; ++ id3v2->id3_v2_header.version |= buffer[bytes_consumed + 1]; ++ id3v2->id3_v2_header.flag = buffer[bytes_consumed + 2]; ++ ++ /* making the msb of each byte zero */ ++ buf[0] = buffer[bytes_consumed + 6] & 0x7f; ++ buf[1] = buffer[bytes_consumed + 5] & 0x7f; ++ buf[2] = buffer[bytes_consumed + 4] & 0x7f; ++ buf[3] = buffer[bytes_consumed + 3] & 0x7f; ++ ++ bytes_consumed += 7; ++ ++ /* concatenation the bytes after making ++ * 7th bit zero to get 28 bits size ++ */ ++ size = buf[0]; ++ size |= (buf[1] << 7); ++ size |= (buf[2] << 14); ++ size |= (buf[3] << 21); ++ /* storing the size */ ++ id3v2->id3_v2_header.size = size; ++ ++ /* check for extended header */ ++ if (id3v2->id3_v2_header.flag & 0x20) { ++ for (i = 0; i < 10; i++) ++ bitstream_ptr[i] = buffer[bytes_consumed + i]; ++ ++ i = 0; ++ bytes_consumed += 10; ++ ++ size = bitstream_ptr[i++] << 24; ++ size |= bitstream_ptr[i++] << 16; ++ size |= bitstream_ptr[i++] << 8; ++ size |= bitstream_ptr[i++]; ++ ++ /* two bytes for flag */ ++ i += 2; ++ { ++ UWORD32 padding_size; ++ ++ padding_size = bitstream_ptr[i++] << 24; ++ padding_size |= bitstream_ptr[i++] << 16; ++ padding_size |= bitstream_ptr[i++] << 8; ++ padding_size |= bitstream_ptr[i++]; ++ ++ /* skipping the padding and frame size ++ * number of bytes ++ */ ++ bytes_consumed += (padding_size + size); ++ } ++ } ++ } ++ ++ while (id3v2->header_end != 1) { ++ char *key; ++ id3_v2_frame_struct *value; ++ unsigned int avail_inp; ++ ++ /* reading the 10 bytes to get the frame header */ ++ ++ for (i = 0; i < 10; i++) ++ frame_header[i] = buffer[bytes_consumed + i]; ++ bytes_consumed += 10; ++ ++ /* getting the size from the header */ ++ size = frame_header[4] << 24; ++ size |= frame_header[5] << 16; ++ size |= frame_header[6] << 8; ++ size |= frame_header[7]; ++ ++ /* decoding the flag, currently not used */ ++ flag = frame_header[8] << 8; ++ flag |= frame_header[9]; ++ ++ avail_inp = insize - bytes_consumed; ++ ++ /* switching to the frame type */ ++ switch (CHAR4(frame_header[0], ++ frame_header[1], ++ frame_header[2], ++ frame_header[3])) { ++ case CHAR4('A', 'E', 'N', 'C'): ++ case CHAR4('A', 'P', 'I', 'C'): ++ case CHAR4('C', 'O', 'M', 'M'): ++ case CHAR4('C', 'O', 'M', 'R'): ++ case CHAR4('E', 'N', 'C', 'R'): ++ case CHAR4('E', 'Q', 'U', 'A'): ++ case CHAR4('E', 'T', 'C', 'O'): ++ case CHAR4('G', 'E', 'O', 'B'): ++ case CHAR4('G', 'R', 'I', 'D'): ++ case CHAR4('I', 'P', 'L', 'S'): ++ case CHAR4('L', 'I', 'N', 'K'): ++ case CHAR4('M', 'C', 'D', 'I'): ++ case CHAR4('M', 'L', 'L', 'T'): ++ case CHAR4('O', 'W', 'N', 'E'): ++ case CHAR4('P', 'C', 'N', 'T'): ++ case CHAR4('P', 'O', 'P', 'M'): ++ case CHAR4('P', 'O', 'S', 'S'): ++ case CHAR4('R', 'B', 'U', 'F'): ++ case CHAR4('R', 'V', 'A', 'D'): ++ case CHAR4('R', 'V', 'R', 'B'): ++ case CHAR4('S', 'Y', 'L', 'T'): ++ case CHAR4('S', 'Y', 'T', 'C'): ++ case CHAR4('T', 'B', 'P', 'M'): ++ case CHAR4('T', 'C', 'O', 'P'): ++ case CHAR4('T', 'D', 'A', 'T'): ++ case CHAR4('T', 'D', 'L', 'Y'): ++ case CHAR4('T', 'F', 'L', 'T'): ++ case CHAR4('T', 'I', 'M', 'E'): ++ case CHAR4('T', 'K', 'E', 'Y'): ++ case CHAR4('T', 'L', 'A', 'N'): ++ case CHAR4('T', 'L', 'E', 'N'): ++ case CHAR4('T', 'M', 'E', 'D'): ++ case CHAR4('T', 'O', 'F', 'N'): ++ case CHAR4('T', 'O', 'L', 'Y'): ++ case CHAR4('T', 'O', 'R', 'Y'): ++ case CHAR4('T', 'P', 'E', '2'): ++ case CHAR4('T', 'P', 'E', '3'): ++ case CHAR4('T', 'P', 'E', '4'): ++ case CHAR4('T', 'P', 'O', 'S'): ++ case CHAR4('T', 'R', 'C', 'K'): ++ case CHAR4('T', 'R', 'D', 'A'): ++ case CHAR4('T', 'R', 'S', 'N'): ++ case CHAR4('T', 'R', 'S', 'O'): ++ case CHAR4('T', 'S', 'I', 'Z'): ++ case CHAR4('T', 'S', 'R', 'C'): ++ case CHAR4('T', 'S', 'S', 'E'): ++ case CHAR4('T', 'Y', 'E', 'R'): ++ case CHAR4('T', 'X', 'X', 'X'): ++ case CHAR4('U', 'F', 'I', 'D'): ++ case CHAR4('U', 'S', 'E', 'R'): ++ case CHAR4('U', 'S', 'L', 'T'): ++ case CHAR4('W', 'C', 'O', 'M'): ++ case CHAR4('W', 'C', 'O', 'P'): ++ case CHAR4('W', 'O', 'A', 'F'): ++ case CHAR4('W', 'O', 'A', 'R'): ++ case CHAR4('W', 'O', 'A', 'S'): ++ case CHAR4('W', 'O', 'R', 'S'): ++ case CHAR4('W', 'P', 'A', 'Y'): ++ case CHAR4('W', 'P', 'U', 'B'): ++ case CHAR4('W', 'X', 'X', 'X'): ++ case CHAR4('T', 'I', 'T', '3'): ++ key = "other_info : "; ++ value = &id3v2->other_info; ++ break; ++ case CHAR4('P', 'R', 'I', 'V'): ++ key = "private_frame : "; ++ value = &id3v2->private_frame; ++ break; ++ case CHAR4('T', 'A', 'L', 'B'): ++ key = "album_movie_show_title : "; ++ value = &id3v2->album_movie_show_title; ++ break; ++ case CHAR4('T', 'C', 'O', 'M'): ++ key = "composer_name : "; ++ value = &id3v2->composer_name; ++ break; ++ case CHAR4('T', 'C', 'O', 'N'): ++ key = "content_type : "; ++ value = &id3v2->content_type; ++ break; ++ case CHAR4('T', 'E', 'N', 'C'): ++ key = "encoded_by : "; ++ value = &id3v2->encoded_by; ++ break; ++ case CHAR4('T', 'E', 'X', 'T'): ++ key = "lyricist_text_writer : "; ++ value = &id3v2->lyricist_text_writer; ++ break; ++ case CHAR4('T', 'I', 'T', '1'): ++ key = "content_group_description : "; ++ value = &id3v2->content_group_description; ++ break; ++ case CHAR4('T', 'I', 'T', '2'): ++ key = "title_songname_content_description : "; ++ value = &id3v2->title_songname_content_description; ++ break; ++ case CHAR4('T', 'O', 'A', 'L'): ++ key = "original_album_movie_show_title : "; ++ value = &id3v2->original_album_movie_show_title; ++ break; ++ case CHAR4('T', 'O', 'P', 'E'): ++ key = "original_artist_performer : "; ++ value = &id3v2->original_artist_performer; ++ break; ++ case CHAR4('T', 'O', 'W', 'N'): ++ key = "file_owner_licensee : "; ++ value = &id3v2->file_owner_licensee; ++ break; ++ case CHAR4('T', 'P', 'E', '1'): ++ key = "lead_performer_soloist : "; ++ value = &id3v2->lead_performer_soloist; ++ break; ++ case CHAR4('T', 'P', 'U', 'B'): ++ key = "publisher : "; ++ value = &id3v2->publisher; ++ break; ++ default: ++ /* skipping the read 10 bytes */ ++ buf_update_val = -10; ++ id3v2->header_end = 1; ++ value = 0; ++ key = 0; ++ break; ++ } ++ ++ if (value != 0) ++ buf_update_val = get_info(&buffer[bytes_consumed], ++ avail_inp, size, value); ++ ++ /* Negative value for buf_update_val means one of two things: ++ * 1. The default case happened and we're done with ID3V2 tag ++ * frames, or ++ * 2. get_info() returned -1 to indicate that more input is ++ * required to decode this frame of the tag. ++ */ ++ if (buf_update_val >= 0) ++ display2(value, ++ umin(value->max_size, buf_update_val), key); ++ ++ if (buf_update_val == -1) { ++ id3v2->bytes_consumed += bytes_consumed; ++ return 1; ++ } ++ ++ bytes_consumed += buf_update_val; ++ ++ /* Is there enough input left (10 bytes) to begin ++ * decoding another frame? If not, bag out temporarily ++ * now. The caller will refill our input buffer and ++ * call us again with continue_flag == 1. ++ */ ++ if (insize - bytes_consumed < 10) { ++ id3v2->bytes_consumed += bytes_consumed; ++ return 0; /* not completely decoded */ ++ } ++ } ++ ++ id3v2->bytes_consumed += bytes_consumed; ++ if ((id3v2->bytes_consumed + 10) < id3v2->id3_v2_header.size) ++ return 0; /* not completely decoded */ ++ ++ return 1; /* completely decoded */ ++} ++ ++/******************************************************* ++ * function name : get_id3_v2_bytes ++ * ++ * description : tells the size of ID3V2 tag. ++ * ++ * arguments : input parameters ++ * buffer input buffer ++ * ++ * values returned : bytes consumed ++ ********************************************************/ ++WORD32 get_id3_v2_bytes(UWORD8 *buffer) ++{ ++ WORD32 size; ++ ++ /* making the msb of each byte zero */ ++ size = (buffer[9] & 0x7f); ++ size |= ((buffer[8] & 0x7f) << 7); ++ size |= ((buffer[7] & 0x7f) << 14); ++ size |= ((buffer[6] & 0x7f) << 21); ++ ++ return (size + 10); ++} ++ ++/**************************************************** ++ * function name : get_info ++ * ++ * description : read the frame information from the input buffer. ++ * ++ * arguments : input parameters ++ * ++ * values returned : update value for buffer ++ ****************************************************/ ++WORD32 get_info(const char *inp_buffer, ++ unsigned int avail_inp, ++ WORD32 tag_size, ++ id3_v2_frame_struct *dest) ++{ ++ WORD32 j; ++ ++ /* setting the tag to indicate the presence of frame */ ++ dest->tag_present = 1; ++ /* If there isn't enough input available, we punt back to the top ++ * level and ask for more. ++ */ ++ if (avail_inp < umin(tag_size, dest->max_size)) ++ return -1; ++ ++ if (dest->max_size >= tag_size) { ++ for (j = 0; j < tag_size ; j++) ++ dest->frame_data[j] = inp_buffer[j]; ++ } else { ++ dest->exceeds_buffer_size = 1; ++ for (j = 0; j < dest->max_size ; j++) ++ dest->frame_data[j] = inp_buffer[j]; ++ } ++ return tag_size; ++} +-- +2.7.4 + diff --git a/meta-digi-dey/recipes-multimedia/tinycompress/tinycompress/0002-cplay-Support-wave-file.patch b/meta-digi-dey/recipes-multimedia/tinycompress/tinycompress/0002-cplay-Support-wave-file.patch new file mode 100755 index 000000000..9189bc0ed --- /dev/null +++ b/meta-digi-dey/recipes-multimedia/tinycompress/tinycompress/0002-cplay-Support-wave-file.patch @@ -0,0 +1,221 @@ +From 4d4bc0a958fe254531920095fbabc241aad88113 Mon Sep 17 00:00:00 2001 +From: Shengjiu Wang +Date: Tue, 28 Jul 2020 13:00:36 +0800 +Subject: [PATCH] cplay: Support wave file + +The supported format is mono/stereo, S16_LE/S32_LE, 8kHz-192kHz. +Command is: +cplay -c x -I PCM test.wav + +Upstream-Status: Inappropriate [i.MX specific] +Signed-off-by: Shengjiu Wang +--- + include/tinycompress/wave_formats.h | 51 +++++++++++++ + src/utils/cplay.c | 107 ++++++++++++++++++++++++++++ + 2 files changed, 158 insertions(+) + create mode 100644 include/tinycompress/wave_formats.h + +diff --git a/include/tinycompress/wave_formats.h b/include/tinycompress/wave_formats.h +new file mode 100644 +index 000000000000..4e2e009206cf +--- /dev/null ++++ b/include/tinycompress/wave_formats.h +@@ -0,0 +1,51 @@ ++#ifndef WAVE_FORMATS_H ++#define WAVE_FORMATS_H 1 ++ ++#define COMPOSE_ID(a,b,c,d) ((a) | ((b)<<8) | ((c)<<16) | ((d)<<24)) ++ ++#define WAV_RIFF COMPOSE_ID('R','I','F','F') ++#define WAV_RIFX COMPOSE_ID('R','I','F','X') ++#define WAV_WAVE COMPOSE_ID('W','A','V','E') ++#define WAV_FMT COMPOSE_ID('f','m','t',' ') ++#define WAV_DATA COMPOSE_ID('d','a','t','a') ++ ++/* WAVE fmt block constants from Microsoft mmreg.h header */ ++#define WAV_FMT_PCM 0x0001 ++#define WAV_FMT_IEEE_FLOAT 0x0003 ++#define WAV_FMT_DOLBY_AC3_SPDIF 0x0092 ++#define WAV_FMT_EXTENSIBLE 0xfffe ++ ++/* Used with WAV_FMT_EXTENSIBLE format */ ++#define WAV_GUID_TAG "\x00\x00\x00\x00\x10\x00\x80\x00\x00\xAA\x00\x38\x9B\x71" ++ ++typedef struct { ++ u_int magic; /* 'RIFF' */ ++ u_int length; /* filelen */ ++ u_int type; /* 'WAVE' */ ++} WaveHeader; ++ ++typedef struct { ++ u_short format; /* see WAV_FMT_* */ ++ u_short channels; ++ u_int sample_fq; /* frequence of sample */ ++ u_int byte_p_sec; ++ u_short byte_p_spl; /* samplesize; 1 or 2 bytes */ ++ u_short bit_p_spl; /* 8, 12 or 16 bit */ ++} WaveFmtBody; ++ ++typedef struct { ++ WaveFmtBody format; ++ u_short ext_size; ++ u_short bit_p_spl; ++ u_int channel_mask; ++ u_short guid_format; /* WAV_FMT_* */ ++ u_char guid_tag[14]; /* WAV_GUID_TAG */ ++} WaveFmtExtensibleBody; ++ ++typedef struct { ++ u_int type; /* 'data' */ ++ u_int length; /* samplecount */ ++} WaveChunkHeader; ++ ++ ++#endif /* FORMATS */ +diff --git a/src/utils/cplay.c b/src/utils/cplay.c +index 5b749419e731..8882f4d9746d 100644 +--- a/src/utils/cplay.c ++++ b/src/utils/cplay.c +@@ -1,4 +1,6 @@ + /* ++ * Copyright 2020 NXP ++ * + * This file is provided under a dual BSD/LGPLv2.1 license. When using or + * redistributing this file, you may do so under either license. + * +@@ -73,6 +75,8 @@ + #include "tinycompress/tinycompress.h" + #include "tinycompress/tinymp3.h" + #include "tinycompress/id3_tag_decode.h" ++#include "tinycompress/wave_formats.h" ++#include + + static int verbose; + static const unsigned int DEFAULT_CODEC_ID = SND_AUDIOCODEC_PCM; +@@ -166,6 +170,77 @@ static int parse_mp3_header(struct mp3_header *header, unsigned int *num_channel + return 0; + } + ++static int parse_wav_header(FILE *file, unsigned int *num_channels, unsigned int *sample_rate, ++ unsigned int *format) { ++ WaveHeader wave_header; ++ WaveChunkHeader chunk_header; ++ WaveFmtBody fmt_body; ++ int more_chunks = 1; ++ ++ fread(&wave_header, sizeof(WaveHeader), 1, file); ++ if ((wave_header.magic != WAV_RIFF) || ++ (wave_header.type != WAV_WAVE)) { ++ fprintf(stderr, "Error: it is not a riff/wave file\n"); ++ return -1; ++ } ++ ++ do { ++ fread(&chunk_header, sizeof(WaveChunkHeader), 1, file); ++ switch (chunk_header.type) { ++ case WAV_FMT: ++ fread(&fmt_body, sizeof(WaveFmtBody), 1, file); ++ /* If the format header is larger, skip the rest */ ++ if (chunk_header.length > sizeof(WaveFmtBody)) ++ fseek(file, chunk_header.length - sizeof(WaveFmtBody), SEEK_CUR); ++ ++ *num_channels = fmt_body.channels; ++ *sample_rate = fmt_body.sample_fq; ++ ++ switch (fmt_body.bit_p_spl) { ++ case 8: ++ *format = SND_PCM_FORMAT_U8; ++ break; ++ case 16: ++ *format = SND_PCM_FORMAT_S16_LE; ++ break; ++ case 24: ++ switch (fmt_body.byte_p_spl / fmt_body.channels) { ++ case 3: ++ *format = SND_PCM_FORMAT_S24_3LE; ++ break; ++ case 4: ++ *format = SND_PCM_FORMAT_S24_LE; ++ break; ++ default: ++ fprintf(stderr, "format error\n"); ++ return -1; ++ } ++ break; ++ case 32: ++ if (fmt_body.format == WAV_FMT_PCM) { ++ *format = SND_PCM_FORMAT_S32_LE; ++ } else if (fmt_body.format == WAV_FMT_IEEE_FLOAT) { ++ *format = SND_PCM_FORMAT_FLOAT_LE; ++ } ++ break; ++ default: ++ fprintf(stderr, "format error\n"); ++ return -1; ++ } ++ break; ++ case WAV_DATA: ++ /* Stop looking for chunks */ ++ more_chunks = 0; ++ break; ++ default: ++ /* Unknown chunk, skip bytes */ ++ fseek(file, chunk_header.length, SEEK_CUR); ++ } ++ } while (more_chunks); ++ ++ return 0; ++} ++ + static int print_time(struct compress *compress) + { + unsigned int avail; +@@ -385,6 +460,35 @@ void get_codec_iec(FILE *file, struct compr_config *config, + codec->format = 0; + } + ++void get_codec_pcm(FILE *file, struct compr_config *config, ++ struct snd_codec *codec) ++{ ++ unsigned int channels, rate, format; ++ ++ if (parse_wav_header(file, &channels, &rate, &format) == -1) { ++ fclose(file); ++ exit(EXIT_FAILURE); ++ } ++ ++ if (channels > 2 || (format != SND_PCM_FORMAT_S16_LE && format != SND_PCM_FORMAT_S32_LE) || ++ rate > 192000) { ++ fprintf(stderr, "unsupported wave file\n"); ++ fclose(file); ++ exit(EXIT_FAILURE); ++ } ++ ++ codec->id = SND_AUDIOCODEC_PCM; ++ codec->ch_in = channels; ++ codec->ch_out = channels; ++ codec->sample_rate = rate; ++ codec->bit_rate = 0; ++ codec->rate_control = 0; ++ codec->profile = SND_AUDIOPROFILE_PCM; ++ codec->level = 0; ++ codec->ch_mode = 0; ++ codec->format = format; ++} ++ + void play_samples(char *name, unsigned int card, unsigned int device, + unsigned long buffer_size, unsigned int frag, + unsigned long codec_id) +@@ -411,6 +515,9 @@ void play_samples(char *name, unsigned int card, unsigned int device, + case SND_AUDIOCODEC_IEC61937: + get_codec_iec(file, &config, &codec); + break; ++ case SND_AUDIOCODEC_PCM: ++ get_codec_pcm(file, &config, &codec); ++ break; + default: + fprintf(stderr, "codec ID %ld is not supported\n", codec_id); + exit(EXIT_FAILURE); +-- +2.27.0 + diff --git a/meta-digi-dey/recipes-multimedia/tinycompress/tinycompress/0003-cplay-Add-pause-feature.patch b/meta-digi-dey/recipes-multimedia/tinycompress/tinycompress/0003-cplay-Add-pause-feature.patch new file mode 100755 index 000000000..045714aa9 --- /dev/null +++ b/meta-digi-dey/recipes-multimedia/tinycompress/tinycompress/0003-cplay-Add-pause-feature.patch @@ -0,0 +1,147 @@ +From 6f778c21ee357a662cdd758cff578a3e4b85eedf Mon Sep 17 00:00:00 2001 +From: Zhang Peng +Date: Tue, 4 Aug 2020 15:29:29 +0800 +Subject: [PATCH] cplay: Add pause feature + +Add option: -p pause + +Upstream-Status: Inappropriate [i.MX specific] + +Signed-off-by: Zhang Peng +--- + src/utils/cplay.c | 56 +++++++++++++++++++++++++++++++++++++++++++---- + 1 file changed, 52 insertions(+), 4 deletions(-) + +diff --git a/src/utils/cplay.c b/src/utils/cplay.c +index 8882f4d..8e3dcbb 100644 +--- a/src/utils/cplay.c ++++ b/src/utils/cplay.c +@@ -117,6 +117,9 @@ static void usage(void) + "-f\tfragments\n\n" + "-v\tverbose mode\n" + "-h\tPrints this help list\n\n" ++ "-p\tpause\n" ++ "-m\tpause blocks\n" ++ "-n\tpause time duration\n" + "Example:\n" + "\tcplay -c 1 -d 2 test.mp3\n" + "\tcplay -f 5 test.mp3\n\n" +@@ -133,7 +136,8 @@ static void usage(void) + + void play_samples(char *name, unsigned int card, unsigned int device, + unsigned long buffer_size, unsigned int frag, +- unsigned long codec_id); ++ unsigned long codec_id, int pause_count, int pause_block, ++ int pause_duration); + + struct mp3_header { + uint16_t sync; +@@ -262,12 +266,15 @@ int main(int argc, char **argv) + int c, i; + unsigned int card = 0, device = 0, frag = 0; + unsigned int codec_id = SND_AUDIOCODEC_MP3; ++ int pause_count = 0; ++ int pause_block = 6; ++ int pause_duration = 10; + + if (argc < 2) + usage(); + + verbose = 0; +- while ((c = getopt(argc, argv, "hvb:f:c:d:I:")) != -1) { ++ while ((c = getopt(argc, argv, "hvb:f:c:d:I:p:m:n:")) != -1) { + switch (c) { + case 'h': + usage(); +@@ -306,6 +313,23 @@ int main(int argc, char **argv) + case 'v': + verbose = 1; + break; ++ case 'p': ++ pause_count = strtol(optarg, NULL, 10); ++ break; ++ case 'm': ++ pause_block = strtol(optarg, NULL, 10); ++ if (pause_duration < 0) { ++ printf("Set wrong paramter! Set duration default 6.\n"); ++ pause_duration = 6; ++ } ++ break; ++ case 'n': ++ pause_duration = strtol(optarg, NULL, 10); ++ if (pause_duration < 0) { ++ printf("Set wrong paramter! Set duration default 10.\n"); ++ pause_duration = 10; ++ } ++ break; + default: + exit(EXIT_FAILURE); + } +@@ -315,7 +339,7 @@ int main(int argc, char **argv) + + file = argv[optind]; + +- play_samples(file, card, device, buffer_size, frag, codec_id); ++ play_samples(file, card, device, buffer_size, frag, codec_id, pause_count, pause_block, pause_duration); + + fprintf(stderr, "Finish Playing.... Close Normally\n"); + exit(EXIT_SUCCESS); +@@ -491,7 +515,8 @@ void get_codec_pcm(FILE *file, struct compr_config *config, + + void play_samples(char *name, unsigned int card, unsigned int device, + unsigned long buffer_size, unsigned int frag, +- unsigned long codec_id) ++ unsigned long codec_id, int pause_count, int pause_block, ++ int pause_duration) + { + struct compr_config config; + struct snd_codec codec; +@@ -499,6 +524,7 @@ void play_samples(char *name, unsigned int card, unsigned int device, + FILE *file; + char *buffer; + int size, num_read, wrote; ++ int write_count = 0; + + if (verbose) + printf("%s: entry\n", __func__); +@@ -574,6 +600,13 @@ void play_samples(char *name, unsigned int card, unsigned int device, + if (verbose) + printf("%s: You should hear audio NOW!!!\n", __func__); + ++ if (pause_count > 0) { ++ printf("sleep...\n"); ++ compress_pause(compress); ++ sleep(pause_duration); ++ compress_resume(compress); ++ } ++ + do { + num_read = fread(buffer, 1, size, file); + if (num_read > 0) { +@@ -592,8 +625,23 @@ void play_samples(char *name, unsigned int card, unsigned int device, + printf("%s: wrote %d\n", __func__, wrote); + } + } ++ write_count++; ++ if ((pause_count > 0) && (write_count % pause_block == 0)) { ++ printf("pause...\n"); ++ compress_pause(compress); ++ sleep(pause_duration); ++ printf("pause release...\n"); ++ compress_resume(compress); ++ pause_count--; ++ } + } while (num_read > 0); + ++ if (pause_count > 0) { ++ compress_pause(compress); ++ sleep(5); ++ compress_resume(compress); ++ } ++ + if (verbose) + printf("%s: exit success\n", __func__); + /* issue drain if it supports */ +-- +2.17.1 + diff --git a/meta-digi-dey/recipes-multimedia/tinycompress/tinycompress/0004-tinycompress-pass-NULL-buffer-with-0-size-to-driver.patch b/meta-digi-dey/recipes-multimedia/tinycompress/tinycompress/0004-tinycompress-pass-NULL-buffer-with-0-size-to-driver.patch new file mode 100755 index 000000000..994fc14e2 --- /dev/null +++ b/meta-digi-dey/recipes-multimedia/tinycompress/tinycompress/0004-tinycompress-pass-NULL-buffer-with-0-size-to-driver.patch @@ -0,0 +1,41 @@ +From a2892bf5db7520689fa9cb1d1589fa804bd9dc1a Mon Sep 17 00:00:00 2001 +From: Bing Song +Date: Tue, 18 Aug 2020 15:26:51 +0800 +Subject: [PATCH] tinycompress: pass NULL buffer with 0 size to driver. + +The NULL buffer with 0 size to indecate driver drain input data with +non-block mode. The defaul drain is block mode. + +upstream status: imx specific + +Signed-off-by: Bing Song +--- + src/lib/compress.c | 5 +++-- + 1 file changed, 3 insertions(+), 2 deletions(-) + +diff --git a/src/lib/compress.c b/src/lib/compress.c +index bba4fcf..d66df0b 100644 +--- a/src/lib/compress.c ++++ b/src/lib/compress.c +@@ -315,7 +315,8 @@ int compress_write(struct compress *compress, const void *buf, unsigned int size + fds.events = POLLOUT; + + /*TODO: treat auto start here first */ +- while (size) { ++ /* NULL buffer with 0 size for non-block drain */ ++ do { + if (ioctl(compress->fd, SNDRV_COMPRESS_AVAIL, &avail)) + return oops(compress, errno, "cannot get avail"); + +@@ -357,7 +358,7 @@ int compress_write(struct compress *compress, const void *buf, unsigned int size + size -= written; + cbuf += written; + total += written; +- } ++ } while (size); + return total; + } + +-- +2.17.1 + diff --git a/meta-digi-dey/recipes-multimedia/tinycompress/tinycompress_1.1.6.bb b/meta-digi-dey/recipes-multimedia/tinycompress/tinycompress_1.1.6.bb new file mode 100644 index 000000000..7f9901156 --- /dev/null +++ b/meta-digi-dey/recipes-multimedia/tinycompress/tinycompress_1.1.6.bb @@ -0,0 +1,18 @@ +SUMMARY = "tinycompress library for compress audio offload in alsa" +DESCRIPTION = "A library to handle compressed formats like MP3 etc" +LICENSE = "BSD-3-Clause" + +inherit autotools pkgconfig +LIC_FILES_CHKSUM = "file://COPYING;md5=cf9105c1a2d4405cbe04bbe3367373a0" + +DEPENDS_append = " alsa-lib" + +SRC_URI = "git://git.alsa-project.org/tinycompress.git;protocol=git;branch=master \ + file://0001-tinycompress-Add-id3-decoding.patch \ + file://0002-cplay-Support-wave-file.patch \ + file://0003-cplay-Add-pause-feature.patch \ + file://0004-tinycompress-pass-NULL-buffer-with-0-size-to-driver.patch \ +" +SRCREV = "995f2ed91045dad8c20485ab1a64727d22cd92e5" + +S = "${WORKDIR}/git" From b878d81e61f67414fa89a544c303e981596ad9bc Mon Sep 17 00:00:00 2001 From: Hector Bujanda Date: Thu, 29 Oct 2020 08:39:06 +0100 Subject: [PATCH 15/57] recipes-multimedia: imx-codec: Update recipes to new BSP release imx_5.4.47_2.2.0 Includes: recipes-multimedia: Upgrade from v4.5.5 to v4.5.6 [YOCIMX-4546] Signed-off-by: Yuqing Zhu Signed-off-by: Hector Bujanda --- .../recipes-multimedia/imx-codec/imx-codec_4.5.5.bb | 12 ------------ .../recipes-multimedia/imx-codec/imx-codec_4.5.6.bb | 12 ++++++++++++ 2 files changed, 12 insertions(+), 12 deletions(-) delete mode 100644 meta-digi-dey/recipes-multimedia/imx-codec/imx-codec_4.5.5.bb create mode 100644 meta-digi-dey/recipes-multimedia/imx-codec/imx-codec_4.5.6.bb diff --git a/meta-digi-dey/recipes-multimedia/imx-codec/imx-codec_4.5.5.bb b/meta-digi-dey/recipes-multimedia/imx-codec/imx-codec_4.5.5.bb deleted file mode 100644 index 4657a2096..000000000 --- a/meta-digi-dey/recipes-multimedia/imx-codec/imx-codec_4.5.5.bb +++ /dev/null @@ -1,12 +0,0 @@ -# Copyright (C) 2013-2016 Freescale Semiconductor -# Copyright 2017-2018 NXP -# Released under the MIT license (see COPYING.MIT for the terms) - -require imx-codec.inc - -LIC_FILES_CHKSUM = "file://COPYING;md5=228c72f2a91452b8a03c4cab30f30ef9" - -SRC_URI[md5sum] = "5472ae7b57a8390224761d151632a2a6" -SRC_URI[sha256sum] = "b0d5a6f847df99ee213cc79dae4f5e7194f567859c43d68d7c7c794a97f90294" - -COMPATIBLE_MACHINE = "(mx6|mx7|mx8)" diff --git a/meta-digi-dey/recipes-multimedia/imx-codec/imx-codec_4.5.6.bb b/meta-digi-dey/recipes-multimedia/imx-codec/imx-codec_4.5.6.bb new file mode 100644 index 000000000..b44c8d769 --- /dev/null +++ b/meta-digi-dey/recipes-multimedia/imx-codec/imx-codec_4.5.6.bb @@ -0,0 +1,12 @@ +# Copyright (C) 2013-2016 Freescale Semiconductor +# Copyright 2017-2018 NXP +# Released under the MIT license (see COPYING.MIT for the terms) + +require imx-codec.inc + +LIC_FILES_CHKSUM = "file://COPYING;md5=983e4c77621568488dd902b27e0c2143" + +SRC_URI[md5sum] = "acf07e6202c773b5cf8fa39d3992f08d" +SRC_URI[sha256sum] = "be9e341c1bda167ceb2164aa8c27fbc70480ba28252b5c10a8b1cdfb5fe26826" + +COMPATIBLE_MACHINE = "(mx6|mx7|mx8)" From 53ad14efd69360e00fd2cd7473fec5803a2471a3 Mon Sep 17 00:00:00 2001 From: Hector Bujanda Date: Thu, 29 Oct 2020 08:41:48 +0100 Subject: [PATCH 16/57] recipes-multimedia: imx-parser: Update recipes to new BSP release imx_5.4.47_2.2.0 Includes: recipes-multimedia: Upgrade from v4.5.5 to v4.5.6 [YOCIMX-4546] Signed-off-by: Yuqing Zhu Signed-off-by: Hector Bujanda --- .../imx-parser/imx-parser_4.5.5.bb | 12 ------------ .../imx-parser/imx-parser_4.5.6.bb | 12 ++++++++++++ 2 files changed, 12 insertions(+), 12 deletions(-) delete mode 100644 meta-digi-dey/recipes-multimedia/imx-parser/imx-parser_4.5.5.bb create mode 100644 meta-digi-dey/recipes-multimedia/imx-parser/imx-parser_4.5.6.bb diff --git a/meta-digi-dey/recipes-multimedia/imx-parser/imx-parser_4.5.5.bb b/meta-digi-dey/recipes-multimedia/imx-parser/imx-parser_4.5.5.bb deleted file mode 100644 index 2be01eb17..000000000 --- a/meta-digi-dey/recipes-multimedia/imx-parser/imx-parser_4.5.5.bb +++ /dev/null @@ -1,12 +0,0 @@ -# Copyright (C) 2013-2016 Freescale Semiconductor -# Copyright 2017-2018 NXP -# Released under the MIT license (see COPYING.MIT for the terms) - -include imx-parser.inc - -LIC_FILES_CHKSUM = "file://COPYING;md5=228c72f2a91452b8a03c4cab30f30ef9" - -SRC_URI[md5sum] = "0845c64d2b64c2822328e8bc8442f5b8" -SRC_URI[sha256sum] = "33b8377a663b2ca749f40ef1164918335913e4de02a3857f2892707647d243de" - -COMPATIBLE_MACHINE = "(mx6|mx7|mx8)" diff --git a/meta-digi-dey/recipes-multimedia/imx-parser/imx-parser_4.5.6.bb b/meta-digi-dey/recipes-multimedia/imx-parser/imx-parser_4.5.6.bb new file mode 100644 index 000000000..4df7eba8c --- /dev/null +++ b/meta-digi-dey/recipes-multimedia/imx-parser/imx-parser_4.5.6.bb @@ -0,0 +1,12 @@ +# Copyright (C) 2013-2016 Freescale Semiconductor +# Copyright 2017-2018 NXP +# Released under the MIT license (see COPYING.MIT for the terms) + +include imx-parser.inc + +LIC_FILES_CHKSUM = "file://COPYING;md5=983e4c77621568488dd902b27e0c2143" + +SRC_URI[md5sum] = "6431109c02762e63ad961ac311f14a3f" +SRC_URI[sha256sum] = "6a13f333aa82c3748f937ed7ee6eec4b6f363c74db342dccef1de8d2cdd23bb1" + +COMPATIBLE_MACHINE = "(mx6|mx7|mx8)" From 12dce0052f090db91eb23ada50855a6c740eef5c Mon Sep 17 00:00:00 2001 From: Hector Bujanda Date: Thu, 29 Oct 2020 08:45:37 +0100 Subject: [PATCH 17/57] recipes-multimedia: imx-vpuwrap: Update recipes to new BSP release imx_5.4.47_2.2.0 Includes: imx-vpuwrap: Switch branch to MM_04.05.06_2008_L5.4.47 Signed-off-by: i.MX Yocto Project Build Signed-off-by: Hector Bujanda --- .../{imx-vpuwrap_4.5.5.bb => imx-vpuwrap_4.5.6.bb} | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) rename meta-digi-dey/recipes-multimedia/imx-vpuwrap/{imx-vpuwrap_4.5.5.bb => imx-vpuwrap_4.5.6.bb} (89%) diff --git a/meta-digi-dey/recipes-multimedia/imx-vpuwrap/imx-vpuwrap_4.5.5.bb b/meta-digi-dey/recipes-multimedia/imx-vpuwrap/imx-vpuwrap_4.5.6.bb similarity index 89% rename from meta-digi-dey/recipes-multimedia/imx-vpuwrap/imx-vpuwrap_4.5.5.bb rename to meta-digi-dey/recipes-multimedia/imx-vpuwrap/imx-vpuwrap_4.5.6.bb index 2d4051922..d85c4446c 100644 --- a/meta-digi-dey/recipes-multimedia/imx-vpuwrap/imx-vpuwrap_4.5.5.bb +++ b/meta-digi-dey/recipes-multimedia/imx-vpuwrap/imx-vpuwrap_4.5.6.bb @@ -9,9 +9,9 @@ SECTION = "multimedia" LIC_FILES_CHKSUM = "file://COPYING;md5=228c72f2a91452b8a03c4cab30f30ef9" IMX_VPUWRAP_SRC ?= "git://github.com/NXP/imx-vpuwrap.git;protocol=https" -SRCBRANCH = "MM_04.05.05_2005_L5.4.24" +SRCBRANCH = "MM_04.05.06_2008_L5.4.47" SRC_URI = "${IMX_VPUWRAP_SRC};branch=${SRCBRANCH}" -SRCREV = "76225d8e15b2b72cd11ce073706473473e446294" +SRCREV = "7d16e588b805163ef1c67dc92615ffa29bbb3dfb" S = "${WORKDIR}/git" inherit autotools pkgconfig From 9852058284e7942e719e337839f3163ca5bc5ce0 Mon Sep 17 00:00:00 2001 From: Hector Bujanda Date: Thu, 29 Oct 2020 10:40:07 +0100 Subject: [PATCH 18/57] imx-m4-demos, imx-m7-demos: Update recipes to new BSP release imx_5.4.47_2.2.0 Includes: meta-imx: Remove imx sub-folder [YOCIMX-4148] Signed-off-by: Tom Hochstein imx-mcore-demos-2.8.inc: Correct i.MX 8DXL package name [YOCIMX-4443] imx-mcore-demos-2.8.inc: Create inc M4/M7 recipes [YOCIMX-4443] Put the common functions in the inc file. Signed-off-by: Jun Zhu m4-demos: Add 8dxl back to 8dxlphantom m4 Signed-off-by: Lauren Post imx-m4-demos_2.8.1.bb: Remove i.MX 8QXP version [YOCIMX-4866] m4-demos: Upgrade to v2.8.0.1 [YOCIMX-4866] - imx7ulp - imx8mm/8mn/8mq - imx8qm/8qxp Signed-off-by: Jun Zhu m4-demos: Upgrade i.MX 8DXL 8MP to v2.8.1 [YOCIMX-4866] imx-m7-demos: Update imx8mn package v2.8.0.1 to EULA 1b4db4b Signed-off-by: i.MX Yocto Project Build Signed-off-by: Hector Bujanda --- meta-digi-arm/recipes-cpu/m4-demos/README | 9 ++++ .../m4-demos/imx-m4-demos_2.8.0.1.bb | 23 ++++++++++ .../m4-demos/imx-m4-demos_2.8.0.bb | 11 ----- .../m4-demos/imx-m4-demos_2.8.1.bb | 12 +++++ .../m4-demos/imx-m7-demos_2.8.0.1.bb | 11 +++++ .../m4-demos/imx-m7-demos_2.8.1.bb | 11 +++++ ...m4-demos-2.inc => imx-mcore-demos-2.8.inc} | 18 +++++--- .../m7-demos/imx-m7-demos_2.8.0.bb | 44 ------------------- 8 files changed, 79 insertions(+), 60 deletions(-) create mode 100644 meta-digi-arm/recipes-cpu/m4-demos/README create mode 100644 meta-digi-arm/recipes-cpu/m4-demos/imx-m4-demos_2.8.0.1.bb delete mode 100644 meta-digi-arm/recipes-cpu/m4-demos/imx-m4-demos_2.8.0.bb create mode 100644 meta-digi-arm/recipes-cpu/m4-demos/imx-m4-demos_2.8.1.bb create mode 100644 meta-digi-arm/recipes-cpu/m4-demos/imx-m7-demos_2.8.0.1.bb create mode 100644 meta-digi-arm/recipes-cpu/m4-demos/imx-m7-demos_2.8.1.bb rename meta-digi-arm/recipes-cpu/m4-demos/{imx-m4-demos-2.inc => imx-mcore-demos-2.8.inc} (70%) delete mode 100644 meta-digi-arm/recipes-cpu/m7-demos/imx-m7-demos_2.8.0.bb diff --git a/meta-digi-arm/recipes-cpu/m4-demos/README b/meta-digi-arm/recipes-cpu/m4-demos/README new file mode 100644 index 000000000..6d937e618 --- /dev/null +++ b/meta-digi-arm/recipes-cpu/m4-demos/README @@ -0,0 +1,9 @@ +The M4 demo app version of each SoCs are followed: +* 2.8.1 -- i.MX 8DXL +* 2.8.0.1 -- i.MX 7ULP, 8MM, 8MQ, 8QM, 8QXP +* 2.6.0 -- i.MX 8DXL-Phantom +* 1.0.1 -- i.MX 7D + +The M7 demo app version of each SoCs are followed: +* 2.8.1 -- i.MX 8MP +* 2.8.0.1 -- i.MX 8MN diff --git a/meta-digi-arm/recipes-cpu/m4-demos/imx-m4-demos_2.8.0.1.bb b/meta-digi-arm/recipes-cpu/m4-demos/imx-m4-demos_2.8.0.1.bb new file mode 100644 index 000000000..9d599db65 --- /dev/null +++ b/meta-digi-arm/recipes-cpu/m4-demos/imx-m4-demos_2.8.0.1.bb @@ -0,0 +1,23 @@ +# Copyright 2017-2020 NXP +# Released under the MIT license (see COPYING.MIT for the terms) + +require imx-mcore-demos-2.8.inc + +LIC_FILES_CHKSUM = "file://COPYING;md5=1b4db4b25c3a1e422c0c0ed64feb65d2" + +SRC_URI[imx7ulp.md5sum] = "e08d9dd060ad7da050b169d81492e163" +SRC_URI[imx7ulp.sha256sum] = "079b84263b5522711a31acec9d290e8843c002fd5b314e5a9a1fddee9c039aa6" + +SRC_URI[imx8mm.md5sum] = "0a132f5bc45958eb722c669f4766d079" +SRC_URI[imx8mm.sha256sum] = "500a7d775b5d2af3c3f54f425f0cb3d05dcbf255e7dd7bb38c981ce9010ebec1" + +SRC_URI[imx8mq.md5sum] = "bc5df9ad5986fd5fee745a80feb72bb1" +SRC_URI[imx8mq.sha256sum] = "7ed6f251d08e4c6c2fcfe8aef89dc98f3b8cb6e11007c9f3d8073c502e85c054" + +SRC_URI[imx8qm.md5sum] = "7bfcad2c582c528aaeb0226598754ab3" +SRC_URI[imx8qm.sha256sum] = "c669de065923753c818f6b3bad0687d1f49eb94ababd076096556815c030a7f3" + +SRC_URI[imx8qx.md5sum] = "501dc76bb0a889d4d3aec8ab428eda89" +SRC_URI[imx8qx.sha256sum] = "3521608924aad04f5fd06444e385b3e8c2e2a63344c7a0956f7d53314c56f187" + +COMPATIBLE_MACHINE = "(mx7ulp|mx8mm|mx8mq|mx8qm|mx8qxp)" diff --git a/meta-digi-arm/recipes-cpu/m4-demos/imx-m4-demos_2.8.0.bb b/meta-digi-arm/recipes-cpu/m4-demos/imx-m4-demos_2.8.0.bb deleted file mode 100644 index f2fda4c8e..000000000 --- a/meta-digi-arm/recipes-cpu/m4-demos/imx-m4-demos_2.8.0.bb +++ /dev/null @@ -1,11 +0,0 @@ -# Copyright 2017-2019 NXP -# Released under the MIT license (see COPYING.MIT for the terms) - -require imx-m4-demos-2.inc - -LIC_FILES_CHKSUM = "file://COPYING;md5=228c72f2a91452b8a03c4cab30f30ef9" - -SRC_URI[imx8qx.md5sum] = "d9cbcb6a5bf4a9e73399dfa82191670e" -SRC_URI[imx8qx.sha256sum] = "7800cdbebe07f426cdac50b0e295d64215164a767e79ca58bd917445c50e345f" - -COMPATIBLE_MACHINE = "(mx8qxp)" diff --git a/meta-digi-arm/recipes-cpu/m4-demos/imx-m4-demos_2.8.1.bb b/meta-digi-arm/recipes-cpu/m4-demos/imx-m4-demos_2.8.1.bb new file mode 100644 index 000000000..7440b340d --- /dev/null +++ b/meta-digi-arm/recipes-cpu/m4-demos/imx-m4-demos_2.8.1.bb @@ -0,0 +1,12 @@ +# Copyright 2017-2020 NXP +# Released under the MIT license (see COPYING.MIT for the terms) + +require imx-mcore-demos-2.8.inc + +LIC_FILES_CHKSUM_mx8qxp = "file://COPYING;md5=228c72f2a91452b8a03c4cab30f30ef9" +LIC_FILES_CHKSUM = "file://COPYING;md5=983e4c77621568488dd902b27e0c2143" + +SRC_URI[imx8dxl.md5sum] = "7f09bb52f744f60b6301c70c43081d96" +SRC_URI[imx8dxl.sha256sum] = "63427d2ff6089b5cec2fc3cfdbaf915f371ca34fa637b856afa6c8d6957e9abf" + +COMPATIBLE_MACHINE = "(mx8dxl)" diff --git a/meta-digi-arm/recipes-cpu/m4-demos/imx-m7-demos_2.8.0.1.bb b/meta-digi-arm/recipes-cpu/m4-demos/imx-m7-demos_2.8.0.1.bb new file mode 100644 index 000000000..cecf33cf6 --- /dev/null +++ b/meta-digi-arm/recipes-cpu/m4-demos/imx-m7-demos_2.8.0.1.bb @@ -0,0 +1,11 @@ +# Copyright 2019-2020 NXP +# Released under the MIT license (see COPYING.MIT for the terms) + +require imx-mcore-demos-2.8.inc + +LIC_FILES_CHKSUM = "file://COPYING;md5=1b4db4b25c3a1e422c0c0ed64feb65d2" + +SRC_URI[imx8mn.md5sum] = "3beaedc3fde76585551890df2659e61b" +SRC_URI[imx8mn.sha256sum] = "13ce4a19d51e19cfdee9203a943a57637d001840fe546cacb5a5c741e66bbb43" + +COMPATIBLE_MACHINE = "(mx8mn)" diff --git a/meta-digi-arm/recipes-cpu/m4-demos/imx-m7-demos_2.8.1.bb b/meta-digi-arm/recipes-cpu/m4-demos/imx-m7-demos_2.8.1.bb new file mode 100644 index 000000000..91c7bc94a --- /dev/null +++ b/meta-digi-arm/recipes-cpu/m4-demos/imx-m7-demos_2.8.1.bb @@ -0,0 +1,11 @@ +# Copyright 2019-2020 NXP +# Released under the MIT license (see COPYING.MIT for the terms) + +require imx-mcore-demos-2.8.inc + +LIC_FILES_CHKSUM = "file://COPYING;md5=983e4c77621568488dd902b27e0c2143" + +SRC_URI[imx8mp.md5sum] = "a4be9423223bffb703d31db799c3b7d9" +SRC_URI[imx8mp.sha256sum] = "4a324f3da3bb027e4c1f92184ea63b1a0f037fc22e355ac49b8819fd45821b9a" + +COMPATIBLE_MACHINE = "(mx8mp)" diff --git a/meta-digi-arm/recipes-cpu/m4-demos/imx-m4-demos-2.inc b/meta-digi-arm/recipes-cpu/m4-demos/imx-mcore-demos-2.8.inc similarity index 70% rename from meta-digi-arm/recipes-cpu/m4-demos/imx-m4-demos-2.inc rename to meta-digi-arm/recipes-cpu/m4-demos/imx-mcore-demos-2.8.inc index 0bc715dc7..781001587 100644 --- a/meta-digi-arm/recipes-cpu/m4-demos/imx-m4-demos-2.inc +++ b/meta-digi-arm/recipes-cpu/m4-demos/imx-mcore-demos-2.8.inc @@ -1,7 +1,7 @@ -# Copyright 2017-2018 NXP +# Copyright 2017-2020 NXP # Released under the MIT license (see COPYING.MIT for the terms) -SUMMARY = "i.MX M4 core Demo images" +SUMMARY = "i.MX M4/M7 core Demo images" SECTION = "app" LICENSE = "Proprietary" @@ -9,16 +9,23 @@ inherit deploy fsl-eula2-unpack2 SOC ?= "INVALID" SOC_mx7ulp = "imx7ulp" +SOC_mx8dxl = "imx8dxl" SOC_mx8mm = "imx8mm" +SOC_mx8mn = "imx8mn" +SOC_mx8mp = "imx8mp" SOC_mx8mq = "imx8mq" SOC_mx8qm = "imx8qm" SOC_mx8qxp = "imx8qx" -SOC_mx8dxl = "imx8dxl" +SOC_mx8phantomdxl = "imx8dxl-phantom" -IMX_PACKAGE_NAME = "${SOC}-m4-demo-${PV}" +MCORE_TYPE ?= "m4" +MCORE_TYPE_mx8mn = "m7" +MCORE_TYPE_mx8mp = "m7" + +IMX_PACKAGE_NAME = "${SOC}-${MCORE_TYPE}-demo-${PV}" SRC_URI_append = ";name=${SOC}" -SCR = "SCR-${SOC}-m4-demo.txt" +SCR = "SCR-${SOC}-${MCORE_TYPE}-demo.txt" do_install () { # install elf format binary to /lib/firmware @@ -33,6 +40,7 @@ do_deploy () { # Install the demo binaries install -m 0644 ${S}/*.${DEPLOY_FILE_EXT} ${DEPLOYDIR}/ } + addtask deploy after do_install PACKAGE_ARCH = "${MACHINE_SOCARCH}" diff --git a/meta-digi-arm/recipes-cpu/m7-demos/imx-m7-demos_2.8.0.bb b/meta-digi-arm/recipes-cpu/m7-demos/imx-m7-demos_2.8.0.bb deleted file mode 100644 index 4cd2ec2d4..000000000 --- a/meta-digi-arm/recipes-cpu/m7-demos/imx-m7-demos_2.8.0.bb +++ /dev/null @@ -1,44 +0,0 @@ -# Copyright 2019-2020 NXP -# Released under the MIT license (see COPYING.MIT for the terms) - -SUMMARY = "i.MX M7 core Demo images" -SECTION = "app" -LICENSE = "Proprietary" - -inherit deploy fsl-eula2-unpack2 - -SOC ?= "INVALID" -SOC_mx8mn = "imx8mn" -SOC_mx8mp = "imx8mp" - -IMX_PACKAGE_NAME = "${SOC}-m7-demo-${PV}" -SRC_URI_append = ";name=${SOC}" - -SCR = "SCR-${SOC}-m7-demo.txt" - -do_install () { - # install elf format binary to /lib/firmware - install -d ${D}${base_libdir}/firmware - install -m 0644 ${S}/*.elf ${D}${base_libdir}/firmware -} - -DEPLOY_FILE_EXT ?= "bin" -DEPLOY_FILE_EXT_mx7ulp = "img" - -do_deploy () { - # Install the demo binaries - install -m 0644 ${S}/*.${DEPLOY_FILE_EXT} ${DEPLOYDIR}/ -} -addtask deploy after do_install - -PACKAGE_ARCH = "${MACHINE_SOCARCH}" - -LIC_FILES_CHKSUM = "file://COPYING;md5=228c72f2a91452b8a03c4cab30f30ef9" - -SRC_URI[imx8mn.md5sum] = "21b718fab2c4e77c8a848667698d74d1" -SRC_URI[imx8mn.sha256sum] = "e877c7462b6ea87c498563842f42352d204eb28a65f35f7dc1fec643f84abb66" - -SRC_URI[imx8mp.md5sum] = "3dd44131b41dd902a8ce1b53eb9a0cd6" -SRC_URI[imx8mp.sha256sum] = "c7ed19d1d164c910af114d58fc53628b6e237262e657e082ac7beb685f0398ec" - -COMPATIBLE_MACHINE = "(mx8mn|mx8mp)" From 2d4e75f27709987a91a3558e21d7482792c07aef Mon Sep 17 00:00:00 2001 From: Hector Bujanda Date: Fri, 30 Oct 2020 13:07:33 +0100 Subject: [PATCH 19/57] meta-digi-arm/conf/layer.conf: EULA.txt Update to license v15 Signed-off-by: Ann Thornton Signed-off-by: Hector Bujanda --- meta-digi-arm/conf/layer.conf | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/meta-digi-arm/conf/layer.conf b/meta-digi-arm/conf/layer.conf index ffae8c4ad..0c2530e12 100644 --- a/meta-digi-arm/conf/layer.conf +++ b/meta-digi-arm/conf/layer.conf @@ -13,6 +13,15 @@ LAYERDEPENDS_digi-arm = "core freescale-layer" LAYERSERIES_COMPAT_digi-arm = "zeus" +# Define new EULAs and add them to the list defined in meta-freescale. +# See fsl-eula-unpack.bbclass. +FSL_EULA_FILE_MD5SUM_LA_OPT_NXP_SOFTWARE_LICENSE_V13 = "1b4db4b25c3a1e422c0c0ed64feb65d2" +FSL_EULA_FILE_MD5SUM_LA_OPT_NXP_SOFTWARE_LICENSE_V15 = "983e4c77621568488dd902b27e0c2143" +FSL_EULA_FILE_MD5SUMS_append = " \ + ${FSL_EULA_FILE_MD5SUM_LA_OPT_NXP_SOFTWARE_LICENSE_V13} \ + ${FSL_EULA_FILE_MD5SUM_LA_OPT_NXP_SOFTWARE_LICENSE_V15} \ +" + # Digi's General and Open Source license agreements DIGI_EULA_FILE = "${LAYERDIR}/DIGI_EULA" DIGI_OPEN_EULA_FILE = "${LAYERDIR}/DIGI_OPEN_EULA" From 2b5dd7ec1449d4c45b2b153dd9e953f96b349aca Mon Sep 17 00:00:00 2001 From: Hector Bujanda Date: Mon, 2 Nov 2020 13:19:23 +0100 Subject: [PATCH 20/57] recipes-graphics: imx-gpu-viv: Update recipes to new BSP release imx_5.4.47_2.2.0 Includes: imx-gpu-viv-6.inc: Update files in libopencl-imx package Fix issue: ERROR: imx-dpu-g2d-1.8.9-r0 do_package_qa: QA Issue: /usr/lib/libg2d-dpu.so contained in package imx-dpu-g2d requires libOpenCL.so.1()(64bit), but no providers found in RDEPENDS_imx-dpu-g2d? [file-rdeps] Signed-off-by: Yuqing Zhu imx-gpu-viv: Update library installation The packaging model has been reworked so now we can simply copy the libraries. Signed-off-by: Tom Hochstein imx-gpu-viv: Integrate recipe updates Integrate our local recipe updates into the copied include file. Signed-off-by: Tom Hochstein imx-gpu-viv: Copy include file from meta-freescale Changes are extensive enough now that it makes sense to simply copy what is upstream. Signed-off-by: Tom Hochstein kernel-module-imx-gpu-viv: Switch branch to imx_5.4.47_2.2.0 Signed-off-by: i.MX Yocto Project Build imx-gpu-viv: remove wayland as a requirement for i.MX8 platforms Based on commit ed2c4974 ("imx-gpu-viv: remove wayland as a requirement for i.MX8 platforms"), this commit removes the requeriment of wayland as a backend for the i.MX8 platforms to build framebuffer images. https://jira.digi.com/browse/DEL-7013 Signed-off-by: Arturo Buzarra imx-gpu-viv-v6: remove kernel-module-imx-gpu-viv dependency This dependency was originally removed in commit eafa8684a3ccdbad39a3fcf8cf0b6d6d79d11c5c, but it was erroneously put back in commit 793e901678bb68f289a951be1d2e1a0f7d8face9 when updating the recipe using the one in meta-fsl-bsp-release as reference. Instead of removing the line containing the dependency, in order to avoid the same situation from happening in the future, comment it out and add an explanation about why we're removing it. Signed-off-by: Gabriel Valcazar Signed-off-by: Hector Bujanda --- .../imx-gpu-viv/imx-gpu-viv-6.inc | 371 ++++++++++++++++++ .../imx-gpu-viv/imx-gpu-viv-v6.inc | 37 -- .../imx-gpu-viv_6.4.0.p2.4-aarch32.bb | 19 - .../imx-gpu-viv_6.4.0.p2.4-aarch64.bb | 31 -- .../imx-gpu-viv_6.4.3.p0.0-aarch32.bb | 8 + .../imx-gpu-viv_6.4.3.p0.0-aarch64.bb | 8 + 6 files changed, 387 insertions(+), 87 deletions(-) create mode 100644 meta-digi-dey/recipes-graphics/imx-gpu-viv/imx-gpu-viv-6.inc delete mode 100644 meta-digi-dey/recipes-graphics/imx-gpu-viv/imx-gpu-viv-v6.inc delete mode 100644 meta-digi-dey/recipes-graphics/imx-gpu-viv/imx-gpu-viv_6.4.0.p2.4-aarch32.bb delete mode 100644 meta-digi-dey/recipes-graphics/imx-gpu-viv/imx-gpu-viv_6.4.0.p2.4-aarch64.bb create mode 100644 meta-digi-dey/recipes-graphics/imx-gpu-viv/imx-gpu-viv_6.4.3.p0.0-aarch32.bb create mode 100644 meta-digi-dey/recipes-graphics/imx-gpu-viv/imx-gpu-viv_6.4.3.p0.0-aarch64.bb diff --git a/meta-digi-dey/recipes-graphics/imx-gpu-viv/imx-gpu-viv-6.inc b/meta-digi-dey/recipes-graphics/imx-gpu-viv/imx-gpu-viv-6.inc new file mode 100644 index 000000000..6e10faa54 --- /dev/null +++ b/meta-digi-dey/recipes-graphics/imx-gpu-viv/imx-gpu-viv-6.inc @@ -0,0 +1,371 @@ +# Copyright (C) 2012-2016 Freescale Semiconductor +# Copyright (C) 2012-2018 O.S. Systems Software LTDA. +# Copyright 2017-2019 NXP +# Released under the MIT license (see COPYING.MIT for the terms) + +DESCRIPTION = "GPU driver and apps for i.MX" +SECTION = "libs" +LICENSE = "Proprietary" +LIC_FILES_CHKSUM = "file://COPYING;md5=80c0478f4339af024519b3723023fe28" + +DEPENDS += " \ + ${@bb.utils.contains('DISTRO_FEATURES', 'wayland', 'wayland', \ + bb.utils.contains('DISTRO_FEATURES', 'x11', 'virtual/libx11 libxdamage libxext libxfixes', \ + '', d), d)} \ +" +DEPENDS += " \ + ${@bb.utils.contains('DISTRO_FEATURES', 'x11', 'libxcb libxshmfence libxxf86vm', \ + '', d)} \ +" +DEPENDS_append_imxdrm = " libdrm wayland" +DEPENDS_append_mx8 = " patchelf-native" + +# imx-gpu-viv does not provide everything it needs to for virtual/libgl +# on x11 backend or on Wayland backend with XWayland support. +# We depend on mesa to fill in what is missing. +DEPENDS += "${@bb.utils.contains('DISTRO_FEATURES', 'x11', 'mesa', '', d)}" + +EXTRA_PROVIDES = "" +EXTRA_PROVIDES_append_imxgpu3d = " \ + virtual/libgl \ + virtual/libgles1 \ + virtual/libgles2 \ +" +EXTRA_PROVIDES_append_mx8 = " \ + virtual/libgbm \ +" +EXTRA_PROVIDES_append_mx8qm = " \ + virtual/libopenvx \ +" +PROVIDES_OPENVX = "" +PROVIDES_OPENVX_mx8 = "virtual/libopenvx" +PROVIDES_OPENVX_mx8mm = "" +PROVIDES += " \ + imx-gpu-viv \ + libgal-imx \ + opencl-headers \ + virtual/egl \ + virtual/libopenvg \ + virtual/opencl-headers \ + virtual/opencl-icd \ + ${EXTRA_PROVIDES} \ + ${PROVIDES_OPENVX} \ +" + +RPROVIDES_${PN}_imxgpu3d += "imx-gpu-viv" + +PE = "1" + +inherit fsl-eula-unpack distro_features_check + +REQUIRED_DISTRO_FEATURES_mx8 = "wayland" + +SRC_URI = "${FSL_MIRROR}/${BPN}-${PV}.bin;fsl-eula=true" + +# Note : If you add a package here, to prevent a naming conflict see the python_anonymous() futher below +IMX_PACKAGES_GBM = "" +IMX_PACKAGES_GBM_mx8 = "libgbm-imx libgbm-imx-dev" +PACKAGES =+ "libclc-imx libclc-imx-dev \ + libgl-imx libgl-imx-dev \ + libgles1-imx libgles1-imx-dev \ + libgles2-imx libgles2-imx-dev \ + libgles3-imx-dev \ + libglslc-imx libglslc-imx-dev \ + libopencl-imx libopencl-imx-dev \ + libopenvg-imx libopenvg-imx-dev \ + libvdk-imx libvdk-imx-dev \ + libegl-imx libegl-imx-dev \ + libgal-imx libgal-imx-dev \ + libvivante-dri-imx \ + libvsc-imx \ + ${IMX_PACKAGES_GBM} \ + libwayland-viv-imx libwayland-viv-imx-dev \ + libgc-wayland-protocol-imx libgc-wayland-protocol-imx-dev \ + imx-gpu-viv-tools \ + imx-gpu-viv-demos \ + libvulkan-imx libvulkan-imx-dev \ + libopenvx-imx libopenvx-imx-dev \ + libnn-imx \ +" +python __anonymous () { + has_vivante_kernel_driver_support = (d.getVar('MACHINE_HAS_VIVANTE_KERNEL_DRIVER_SUPPORT') or '0') + if has_vivante_kernel_driver_support != '1': + raise bb.parse.SkipPackage('The kernel of machine needs to have Vivante kernel driver support for this recipe to be used.') +} + +USE_X11 = "${@bb.utils.contains("DISTRO_FEATURES", "x11", "yes", "no", d)}" +USE_WL = "${@bb.utils.contains("DISTRO_FEATURES", "wayland", "yes", "no", d)}" + +# Inhibit warnings about files being stripped. +INHIBIT_PACKAGE_STRIP = "1" +INHIBIT_PACKAGE_DEBUG_SPLIT = "1" + +# FIXME: The provided binary doesn't provide soname. If in future BSP +# release the libraries are fixed, we can drop this hack. +REALSOLIBS := "${SOLIBS}" +SOLIBS = "${SOLIBSDEV}" + +python __anonymous() { + # FIXME: All binaries lack GNU_HASH in elf binary but as we don't have + # the source we cannot fix it. Disable the insane check for now. + packages = d.getVar('PACKAGES').split() + for p in packages: + d.appendVar("INSANE_SKIP_%s" % p, " ldflags") + + # For the packages that make up the OpenGL interfaces, inject variables so that + # they don't get Debian-renamed (which would remove the -imx suffix). + for p in (("libegl", "libegl1"), ("libgl", "libgl1"), + ("libgles1", "libglesv1-cm1"), ("libgles2", "libglesv2-2"), + ("libgles3",), ("libgbm",)): + fullp = p[0] + "-imx" + pkgs = "".join(' %s' % i for i in p) + d.setVar("DEBIAN_NOAUTONAME_" + fullp, "1") + d.appendVar("RREPLACES_" + fullp, pkgs) + d.appendVar("RPROVIDES_" + fullp, pkgs) + d.appendVar("RCONFLICTS_" + fullp, pkgs) + + # For -dev, the first element is both the Debian and original name + fullp += "-dev" + pkgs = p[0] + "-dev" + d.setVar("DEBIAN_NOAUTONAME_" + fullp, "1") + d.appendVar("RREPLACES_" + fullp, pkgs) + d.appendVar("RPROVIDES_" + fullp, pkgs) + d.appendVar("RCONFLICTS_" + fullp, pkgs) +} + +IS_MX6SL = "0" +IS_MX6SL_mx6sl = "1" + +IS_MX8 = "0" +IS_MX8_mx8 = "1" + +PACKAGE_FP_TYPE = "hardfp" + +HAS_GBM = "false" +HAS_GBM_mx8 = "true" + +GLES3_HEADER_REMOVALS = "gl31.h gl32.h" +GLES3_HEADER_REMOVALS_mx8mq = "gl32.h" +GLES3_HEADER_REMOVALS_mx8mn = "gl32.h" +GLES3_HEADER_REMOVALS_mx8mp = "gl32.h" +GLES3_HEADER_REMOVALS_mx8qxp = "" +GLES3_HEADER_REMOVALS_mx8qm = "" + +do_install () { + install -d ${D}${libdir} + install -d ${D}${includedir} + install -d ${D}${bindir} + + cp -P ${S}/gpu-core/usr/lib/*.so* ${D}${libdir} + cp -r ${S}/gpu-core/usr/include/* ${D}${includedir} + cp -r ${S}/gpu-demos/opt ${D} + cp -r ${S}/gpu-tools/gmem-info/usr/bin/* ${D}${bindir} + + # Use vulkan header from vulkan-headers recipe to support vkmark + rm -rf ${D}${includedir}/vulkan/ + + install -d ${D}${libdir}/pkgconfig + if ${HAS_GBM}; then + install -m 0644 ${S}/gpu-core/usr/lib/pkgconfig/gbm.pc ${D}${libdir}/pkgconfig/gbm.pc + fi + + # The preference order, based in DISTRO_FEATURES, is Wayland (with or without X11), X11 and fb + if [ "${USE_WL}" = "yes" ]; then + + backend=wayland + + install -m 0644 ${S}/gpu-core/usr/lib/pkgconfig/egl_wayland.pc ${D}${libdir}/pkgconfig/egl.pc + install -m 0644 ${S}/gpu-core/usr/lib/pkgconfig/glesv1_cm.pc ${D}${libdir}/pkgconfig/glesv1_cm.pc + install -m 0644 ${S}/gpu-core/usr/lib/pkgconfig/glesv2.pc ${D}${libdir}/pkgconfig/glesv2.pc + install -m 0644 ${S}/gpu-core/usr/lib/pkgconfig/vg.pc ${D}${libdir}/pkgconfig/vg.pc + + if [ "${USE_X11}" = "yes" ]; then + + cp -r ${S}/gpu-core/usr/lib/dri ${D}${libdir} + + fi + + elif [ "${USE_X11}" = "yes" ]; then + + cp -r ${S}/gpu-core/usr/lib/dri ${D}${libdir} + + backend=x11 + + install -m 0644 ${S}/gpu-core/usr/lib/pkgconfig/gl_x11.pc ${D}${libdir}/pkgconfig/gl.pc + install -m 0644 ${S}/gpu-core/usr/lib/pkgconfig/egl_x11.pc ${D}${libdir}/pkgconfig/egl.pc + install -m 0644 ${S}/gpu-core/usr/lib/pkgconfig/glesv1_cm_x11.pc ${D}${libdir}/pkgconfig/glesv1_cm.pc + install -m 0644 ${S}/gpu-core/usr/lib/pkgconfig/glesv2_x11.pc ${D}${libdir}/pkgconfig/glesv2.pc + install -m 0644 ${S}/gpu-core/usr/lib/pkgconfig/vg_x11.pc ${D}${libdir}/pkgconfig/vg.pc + + else + install -m 0644 ${S}/gpu-core/usr/lib/pkgconfig/glesv1_cm.pc ${D}${libdir}/pkgconfig/glesv1_cm.pc + install -m 0644 ${S}/gpu-core/usr/lib/pkgconfig/glesv2.pc ${D}${libdir}/pkgconfig/glesv2.pc + install -m 0644 ${S}/gpu-core/usr/lib/pkgconfig/vg.pc ${D}${libdir}/pkgconfig/vg.pc + + # Regular framebuffer + install -m 0644 ${S}/gpu-core/usr/lib/pkgconfig/egl_linuxfb.pc ${D}${libdir}/pkgconfig/egl.pc + + backend=fb + + fi + + # Install Vendor ICDs for OpenCL's installable client driver loader (ICDs Loader) + install -d ${D}${sysconfdir}/OpenCL/vendors/ + install -m 0644 ${S}/gpu-core/etc/Vivante.icd ${D}${sysconfdir}/OpenCL/vendors/Vivante.icd + + # Handle backend specific drivers + cp -r ${S}/gpu-core/usr/lib/${backend}/* ${D}${libdir} + if [ "${USE_WL}" = "yes" ]; then + # Special case for libVDK on Wayland backend, deliver fb library as well. + cp ${S}/gpu-core/usr/lib/fb/libVDK.so.1.2.0 ${D}${libdir}/libVDK-fb.so.1.2.0 + fi + if [ "${IS_MX8}" = "1" ]; then + # Rename our libvulkan.so so it doesn't clash with vulkan-loader libvulkan.so + mv ${D}${libdir}/libvulkan.so.1.1.6 ${D}${libdir}/libvulkan_VSI.so.1.1.6 + patchelf --set-soname libvulkan_VSI.so.1 ${D}${libdir}/libvulkan_VSI.so.1.1.6 + ln -sf libvulkan_VSI.so.1.1.6 ${D}${libdir}/libvulkan_VSI.so.1 + ln -sf libvulkan_VSI.so.1.1.6 ${D}${libdir}/libvulkan_VSI.so + rm ${D}${libdir}/libvulkan.so* + fi + for header in ${GLES3_HEADER_REMOVALS}; do + rm -f ${D}${includedir}/GLES3/${header} + done + + # skip packaging wayland libraries if no support is requested + if [ "${USE_WL}" = "no" ]; then + find ${D}${libdir} -name "libgc_wayland_protocol.*" -exec rm '{}' ';' + find ${D}${libdir} -name "libwayland-viv.*" -exec rm '{}' ';' + fi + + # FIXME: MX6SL does not have 3D support; hack it for now + if [ "${IS_MX6SL}" = "1" ]; then + rm -rf ${D}${libdir}/libCLC* ${D}${includedir}/CL \ + \ + ${D}${libdir}/libGL* ${D}${includedir}/GL* ${D}${libdir}/pkgconfig/gl.pc \ + \ + ${D}${libdir}/libGLES* ${D}${libdir}/pkgconfig/gles*.pc \ + \ + ${D}${libdir}/libOpenCL* ${D}${includedir}/CL \ + \ + ${D}${libdir}/libOpenVG.3d.so \ + \ + ${D}${libdir}/libVivanteOpenCL.so \ + \ + ${D}/opt/viv_samples/vdk \ + ${D}/opt/viv_samples/es20 ${D}/opt/viv_samples/cl11 + + ln -sf libOpenVG.2d.so ${D}${libdir}/libOpenVG.so + fi + + find ${D}${libdir} -type f -exec chmod 644 {} \; + find ${D}${includedir} -type f -exec chmod 644 {} \; + + chown -R root:root "${D}" +} + +ALLOW_EMPTY_${PN} = "1" + +# FIXME: Remove the following lines after adding libopenvx package +INSANE_SKIP_imx-gpu-viv-dev += "dev-elf" +INSANE_SKIP_libclc-imx += "dev-deps" + +FILES_libclc-imx = "${libdir}/libCLC${SOLIBS}" +FILES_libclc-imx-dev = "${includedir}/CL ${libdir}/libCLC${SOLIBSDEV}" + +# libEGL.so is used by some demo apps from Freescale +INSANE_SKIP_libegl-imx += "dev-so" +FILES_libegl-imx = "${libdir}/libEGL${REALSOLIBS} ${libdir}/libEGL${SOLIBSDEV} " +FILES_libegl-imx-dev = "${includedir}/EGL ${includedir}/KHR ${libdir}/pkgconfig/egl.pc" + +FILES_libgal-imx = "${libdir}/libGAL${SOLIBS} ${libdir}/libGAL_egl${SOLIBS}" +FILES_libgal-imx-dev = "${libdir}/libGAL${SOLIBSDEV} ${includedir}/HAL" +RDEPENDS_libgal-imx += "${@bb.utils.contains('DISTRO_FEATURES', 'wayland', 'valgrind', '', d)}" +RPROVIDES_libgal-imx += "libgal-imx" +INSANE_SKIP_libgal-imx += "build-deps" + +FILES_libvsc-imx = "${libdir}/libVSC${SOLIBS}" + +FILES_libgbm-imx_mx8 = "${libdir}/libgbm*${SOLIBS}" +FILES_libgbm-imx-dev_mx8 = "${libdir}/pkgconfig/gbm.pc ${includedir}/gbm.h ${libdir}/libgbm${SOLIBSDEV}" +RDEPENDS_libgbm-imx_append_mx8 = " libdrm" + +FILES_libvulkan-imx = "${libdir}/libvulkan_VSI${SOLIBS} ${libdir}/libvulkan_VSI${REALSOLIBS} ${libdir}/libSPIRV_viv${SOLIBS}" +FILES_libvulkan-imx-dev = "${includedir}/vulkan ${libdir}/libvulkan_VSI${SOLIBSDEV}" +INSANE_SKIP_libvulkan-imx += "dev-so" + +FILES_libopenvx-imx = "${libdir}/libOpenVX${SOLIBS} ${libdir}/libOpenVX${REALSOLIBS} ${libdir}/libOvx*${SOLIBS} ${libdir}/libOpenVXC${SOLIBS} ${libdir}/libOpenVXU${SOLIBS}" +FILES_libopenvx-imx-dev = "${includedir}/VX ${libdir}/libOpenVX${SOLIBSDEV}" +RDEPENDS_libopenvx-imx = "libnn-imx" +INSANE_SKIP_libopenvx-imx += "dev-so dev-deps" + +FILES_libgl-imx = "${libdir}/libGL${REALSOLIBS}" +FILES_libgl-imx-dev = "${libdir}/libGL${SOLIBSDEV} ${includedir}/GL" +INSANE_SKIP_libgl-imx += "file-rdeps" + +# libEGL needs to open libGLESv1.so +INSANE_SKIP_libgles1-imx += "dev-so" +FILES_libgles1-imx = "${libdir}/libGLESv1*${REALSOLIBS} ${libdir}/libGLESv1*${SOLIBS} ${libdir}/libGLES_*${REALSOLIBS} ${libdir}/libGLES_*${SOLIBS}" +FILES_libgles1-imx-dev = "${includedir}/GLES ${libdir}/libGLESv1*${SOLIBS} ${libdir}/libGLES_*${SOLIBSDEV} ${libdir}/pkgconfig/glesv1_cm.pc" +RPROVIDES_libgles1-imx = "libgles-imx" +RPROVIDES_libgles1-imx-dev = "libgles-imx-dev" + +# libEGL needs to open libGLESv2.so +INSANE_SKIP_libgles2-imx += "dev-so" +FILES_libgles2-imx = "${libdir}/libGLESv2${REALSOLIBS} ${libdir}/libGLESv2${SOLIBS}" +FILES_libgles2-imx-dev = "${includedir}/GLES2 ${libdir}/libGLESv2${SOLIBSDEV} ${libdir}/pkgconfig/glesv2.pc" +RDEPENDS_libgles2-imx = "libglslc-imx" + +FILES_libgles3-imx-dev = "${includedir}/GLES3" +# as long as there is no libgles3: ship libgles3-dev along with +# libgles2-dev - otherwise GLES3 headers have to be added manually +RDEPENDS_libgles2-imx-dev += "libgles3-imx-dev" + +FILES_libglslc-imx = "${libdir}/libGLSLC${SOLIBS}" +FILES_libglslc-imx-dev = "${includedir}/CL ${libdir}/libGLSLC${SOLIBSDEV}" + +FILES_libopencl-imx = "${libdir}/libOpenCL${SOLIBS} \ + ${libdir}/libOpenCL${REALSOLIBS} \ + ${libdir}/libVivanteOpenCL${SOLIBS} \ + ${libdir}/libLLVM_viv${SOLIBS} \ + ${sysconfdir}/OpenCL/vendors/Vivante.icd" +FILES_libopencl-imx-dev = "${includedir}/CL ${libdir}/libOpenCL${SOLIBSDEV}" +RDEPENDS_libopencl-imx= "libclc-imx" +INSANE_SKIP_libopencl-imx += "dev-so dev-deps" + +FILES_libnn-imx = "${libdir}/libNN*${SOLIBS}" + +INSANE_SKIP_libopenvg-imx += "dev-so" +FILES_libopenvg-imx = "${libdir}/libOpenVG*${REALSOLIBS}" +FILES_libopenvg-imx-dev = "${includedir}/VG ${libdir}/libOpenVG*${SOLIBSDEV} ${libdir}/pkgconfig/vg.pc" +RDEPENDS_libopenvg-imx += "${@bb.utils.contains('DISTRO_FEATURES', 'systemd', 'systemd-gpuconfig', '', d)}" + +FILES_libvdk-imx = "${libdir}/libVDK*${REALSOLIBS}" +FILES_libvdk-imx-dev = "${includedir}/*vdk*.h ${libdir}/libVDK${SOLIBSDEV}" +INSANE_SKIP_libvdk-imx += "dev-so" + +FILES_libvivante-dri-imx = "${libdir}/dri/vivante_dri.so" +RDEPENDS_libvivante-dri-imx = "libdrm" + +INSANE_SKIP_libwayland-viv-imx += "dev-so" +FILES_libwayland-viv-imx = "${libdir}/libwayland-viv${REALSOLIBS} ${libdir}/libwayland-viv${SOLIBS}" +FILES_libwayland-viv-imx-dev = "${includedir}/wayland-viv ${libdir})/libwayland-viv${SOLIBSDEV} ${libdir}/pkgconfig/wayland-viv.pc" +RPROVIDES_libwayland-viv-imx += "${@bb.utils.contains('DISTRO_FEATURES', 'wayland', 'xf86-video-imx-vivante', '', d)}" + +INSANE_SKIP_libgc-wayland-protocol-imx += "dev-so" +FILES_libgc-wayland-protocol-imx = "${libdir}/libgc_wayland_protocol${REALSOLIBS} ${libdir}/libgc_wayland_protocol${SOLIBS}" +FILES_libgc-wayland-protocol-imx-dev = "${libdir}/libgc_wayland_protocol${SOLIBSDEV} ${libdir}/pkgconfig/gc_wayland_protocol.pc" + +FILES_imx-gpu-viv-tools = "${bindir}/gmem_info" + +FILES_imx-gpu-viv-demos = "/opt" +INSANE_SKIP_imx-gpu-viv-demos += "rpaths dev-deps" + +# COMPATIBLE_MACHINE = "(mx6q|mx6dl|mx6sx|mx6sl|mx8)" + +# Digi custom change: we include the imx-gpu-viv driver as built-in in the +# kernel, so this dependency isn't necessary +RDEPENDS_libgal-imx_remove = "kernel-module-imx-gpu-viv" + +# Remove wayland as a requirement to build framebuffer images +REQUIRED_DISTRO_FEATURES_mx8_remove = "wayland" + diff --git a/meta-digi-dey/recipes-graphics/imx-gpu-viv/imx-gpu-viv-v6.inc b/meta-digi-dey/recipes-graphics/imx-gpu-viv/imx-gpu-viv-v6.inc deleted file mode 100644 index 332c0f73e..000000000 --- a/meta-digi-dey/recipes-graphics/imx-gpu-viv/imx-gpu-viv-v6.inc +++ /dev/null @@ -1,37 +0,0 @@ -require recipes-graphics/imx-gpu-viv/imx-gpu-viv-6.inc - -EXTRA_PROVIDES_remove = "virtual/libopenvx" -PROVIDES_OPENVX = "" -PROVIDES_OPENVX_mx8 = "virtual/libopenvx" -PROVIDES_OPENVX_mx8mm = "" -PROVIDES += "${PROVIDES_OPENVX}" - -PACKAGES =+ "libnn-imx" - -GLES3_HEADER_REMOVALS_mx8mn = "gl32.h" -GLES3_HEADER_REMOVALS_mx8mp = "gl32.h" - -FILES_libgbm-imx_mx8 = "${libdir}/libgbm*${SOLIBS}" - -FILES_libvulkan-imx_append = " ${libdir}/libvulkan_VSI${REALSOLIBS}" -INSANE_SKIP_libvulkan-imx += "dev-so" - -FILES_libopenvx-imx_append = " ${libdir}/libOpenVX${REALSOLIBS} ${libdir}/libOvx*${SOLIBS}" -RDEPENDS_libopenvx-imx = "libnn-imx" -INSANE_SKIP_libopenvx-imx += "dev-so" - -FILES_libopencl-imx_append = " ${libdir}/libOpenCL${REALSOLIBS}" -INSANE_SKIP_libopencl-imx += "dev-so" - -FILES_libnn-imx = "${libdir}/libNN*${SOLIBS}" - -RDEPENDS_libgal-imx += "${@bb.utils.contains('DISTRO_FEATURES', 'wayland', 'valgrind', '', d)}" - -RDEPENDS_libopenvg-imx += "${@bb.utils.contains('DISTRO_FEATURES', 'systemd', 'systemd-gpuconfig', '', d)}" - -# Digi custom change: we include the imx-gpu-viv driver as built-in in the -# kernel, so this dependency isn't necessary -RDEPENDS_libgal-imx_remove = "kernel-module-imx-gpu-viv" - -# Remove wayland as a requirement to build framebuffer images -REQUIRED_DISTRO_FEATURES_mx8_remove = "wayland" diff --git a/meta-digi-dey/recipes-graphics/imx-gpu-viv/imx-gpu-viv_6.4.0.p2.4-aarch32.bb b/meta-digi-dey/recipes-graphics/imx-gpu-viv/imx-gpu-viv_6.4.0.p2.4-aarch32.bb deleted file mode 100644 index 41c546835..000000000 --- a/meta-digi-dey/recipes-graphics/imx-gpu-viv/imx-gpu-viv_6.4.0.p2.4-aarch32.bb +++ /dev/null @@ -1,19 +0,0 @@ -require imx-gpu-viv-v6.inc - -LIC_FILES_CHKSUM = "file://COPYING;md5=228c72f2a91452b8a03c4cab30f30ef9" - -# FIXME: Remove this patch when upstream handles backend-specific libGL -SRC_URI += "file://Add-dummy-libgl.patch" - -SRC_URI[md5sum] = "cd5e9ba9247aa0da5d97b0f030e2ede1" -SRC_URI[sha256sum] = "9cc4c6594083f5970bc394a698a0a8ed0c7f2a1a753dfbf25cb0be5ab8bdcbd5" - -do_install_append() { - if [ "${IS_MX6SL}" != "1" ]; then - if [ "${USE_WL}" = "yes" -o "${USE_X11}" = "yes" ]; then - cp ${S}/gpu-core/usr/lib/libGL-${backend}.so ${D}${libdir}/libGL.so.1.2.0 - fi - fi -} - -COMPATIBLE_MACHINE = "(mx6q|mx6dl|mx6sx|mx6sl|mx7ulp)" diff --git a/meta-digi-dey/recipes-graphics/imx-gpu-viv/imx-gpu-viv_6.4.0.p2.4-aarch64.bb b/meta-digi-dey/recipes-graphics/imx-gpu-viv/imx-gpu-viv_6.4.0.p2.4-aarch64.bb deleted file mode 100644 index 534e7f40a..000000000 --- a/meta-digi-dey/recipes-graphics/imx-gpu-viv/imx-gpu-viv_6.4.0.p2.4-aarch64.bb +++ /dev/null @@ -1,31 +0,0 @@ -require imx-gpu-viv-v6.inc - -LIC_FILES_CHKSUM = "file://COPYING;md5=228c72f2a91452b8a03c4cab30f30ef9" - -SRC_URI[md5sum] = "633029434f0ccc0e8a6b01d92cae95b2" -SRC_URI[sha256sum] = "a295f41a6346c507fc8a677c26ecf9b2f416735e32e6d0734516ef5363027720" - -do_install_append() { - if [ "${USE_WL}" = "yes" -o "${USE_X11}" = "yes" ]; then - cp ${S}/gpu-core/usr/lib/libGL-${backend}.so ${D}${libdir}/libGL.so.1.2.0 - fi - - # Remove the work done by the upstream install for libvulkan so - # we can install the newly versioned library files - rm ${D}${libdir}/libvulkan_VSI.so - # Copy backend-specific library and rename it for use by vulkan-loader - # library of the same name - for i in fb wl x11; do - if [ "$i" = "${backend}" ]; then - mv ${D}${libdir}/libvulkan-${backend}.so.1.1.3 ${D}${libdir}/libvulkan_VSI.so.1.1.3 - else - rm ${D}${libdir}/libvulkan-${i}.so.1.1.3 - fi - done - patchelf --set-soname libvulkan_VSI.so.1 ${D}${libdir}/libvulkan_VSI.so.1.1.3 - rm ${D}${libdir}/libvulkan.so.1 ${D}${libdir}/libvulkan.so - ln -s libvulkan_VSI.so.1.1.3 ${D}${libdir}/libvulkan_VSI.so.1 - ln -s libvulkan_VSI.so.1.1.3 ${D}${libdir}/libvulkan_VSI.so -} - -COMPATIBLE_MACHINE = "(mx8)" diff --git a/meta-digi-dey/recipes-graphics/imx-gpu-viv/imx-gpu-viv_6.4.3.p0.0-aarch32.bb b/meta-digi-dey/recipes-graphics/imx-gpu-viv/imx-gpu-viv_6.4.3.p0.0-aarch32.bb new file mode 100644 index 000000000..f66a19dc5 --- /dev/null +++ b/meta-digi-dey/recipes-graphics/imx-gpu-viv/imx-gpu-viv_6.4.3.p0.0-aarch32.bb @@ -0,0 +1,8 @@ +require imx-gpu-viv-6.inc + +LIC_FILES_CHKSUM = "file://COPYING;md5=983e4c77621568488dd902b27e0c2143" + +SRC_URI[md5sum] = "163167d49e1667bab3a8a37ea33b7624" +SRC_URI[sha256sum] = "cdec43e45e840fe30e188e3b6f07c44b4a1ceafc315e605c8d278564db5fcbe9" + +COMPATIBLE_MACHINE = "(mx6q|mx6dl|mx6sx|mx6sl|mx7ulp)" diff --git a/meta-digi-dey/recipes-graphics/imx-gpu-viv/imx-gpu-viv_6.4.3.p0.0-aarch64.bb b/meta-digi-dey/recipes-graphics/imx-gpu-viv/imx-gpu-viv_6.4.3.p0.0-aarch64.bb new file mode 100644 index 000000000..8aa0047bc --- /dev/null +++ b/meta-digi-dey/recipes-graphics/imx-gpu-viv/imx-gpu-viv_6.4.3.p0.0-aarch64.bb @@ -0,0 +1,8 @@ +require imx-gpu-viv-6.inc + +LIC_FILES_CHKSUM = "file://COPYING;md5=983e4c77621568488dd902b27e0c2143" + +SRC_URI[md5sum] = "db4c88a19d0c1f7ec2788531822f9144" +SRC_URI[sha256sum] = "b3bd03288106daf3a62d2301d09569292ef6a5c74c761cfa4e41dad85e4bf547" + +COMPATIBLE_MACHINE = "(mx8)" From 544f1525648874c50dbc301e7d1423775f40300d Mon Sep 17 00:00:00 2001 From: Hector Bujanda Date: Tue, 3 Nov 2020 00:45:59 +0100 Subject: [PATCH 21/57] recipes-support: opencv: Update recipes to new BSP release imx_5.4.47_2.2.0 Includes: opencv: Add smaller version of download models script [YOCIMX-4899] Add a download models script that downloads a subset of the regular script, reducing the download size from 10 to 1 GB. Signed-off-by: Tom Hochstein opencv: Fix build break [YOCIMX-4806] The fix for installing face_landmark_model.dat failed if test was not in PACKAGECONFIG. In fact we should only install face_landmark_model.dat if test is configured. Signed-off-by: Tom Hochstein opencv: Fix patch fuzz Signed-off-by: Tom Hochstein Signed-off-by: Hector Bujanda --- ...maller-version-of-download_models.py.patch | 179 ++++++++++++++++++ .../opencv/opencv_4.2.0.imx.bb | 6 +- 2 files changed, 184 insertions(+), 1 deletion(-) create mode 100644 meta-digi-dey/recipes-support/opencv/opencv/0001-Add-smaller-version-of-download_models.py.patch diff --git a/meta-digi-dey/recipes-support/opencv/opencv/0001-Add-smaller-version-of-download_models.py.patch b/meta-digi-dey/recipes-support/opencv/opencv/0001-Add-smaller-version-of-download_models.py.patch new file mode 100644 index 000000000..0aabee29f --- /dev/null +++ b/meta-digi-dey/recipes-support/opencv/opencv/0001-Add-smaller-version-of-download_models.py.patch @@ -0,0 +1,179 @@ +From fca4d9eec289f22c081daa2c61a1110e3f268f92 Mon Sep 17 00:00:00 2001 +From: Tom Hochstein +Date: Tue, 1 Sep 2020 14:57:07 -0500 +Subject: [PATCH] Add smaller version of download_models.py + +Signed-off-by: Tom Hochstein +--- + testdata/dnn/download_models_basic.py | 159 ++++++++++++++++++++++++++ + 1 file changed, 159 insertions(+) + create mode 100644 testdata/dnn/download_models_basic.py + +diff --git a/testdata/dnn/download_models_basic.py b/testdata/dnn/download_models_basic.py +new file mode 100644 +index 0000000..5c8a616 +--- /dev/null ++++ b/testdata/dnn/download_models_basic.py +@@ -0,0 +1,159 @@ ++#!/usr/bin/env python ++ ++from __future__ import print_function ++import hashlib ++import sys ++import tarfile ++if sys.version_info[0] < 3: ++ from urllib2 import urlopen ++else: ++ from urllib.request import urlopen ++ ++ ++class Model: ++ MB = 1024*1024 ++ BUFSIZE = 10*MB ++ ++ def __init__(self, **kwargs): ++ self.name = kwargs.pop('name') ++ self.url = kwargs.pop('url', None) ++ self.filename = kwargs.pop('filename') ++ self.sha = kwargs.pop('sha', None) ++ self.archive = kwargs.pop('archive', None) ++ self.member = kwargs.pop('member', None) ++ ++ def __str__(self): ++ return 'Model <{}>'.format(self.name) ++ ++ def printRequest(self, r): ++ def getMB(r): ++ d = dict(r.info()) ++ for c in ['content-length', 'Content-Length']: ++ if c in d: ++ return int(d[c]) / self.MB ++ return '' ++ print(' {} {} [{} Mb]'.format(r.getcode(), r.msg, getMB(r))) ++ ++ def verify(self): ++ if not self.sha: ++ return False ++ print(' expect {}'.format(self.sha)) ++ sha = hashlib.sha1() ++ try: ++ with open(self.filename, 'rb') as f: ++ while True: ++ buf = f.read(self.BUFSIZE) ++ if not buf: ++ break ++ sha.update(buf) ++ print(' actual {}'.format(sha.hexdigest())) ++ return self.sha == sha.hexdigest() ++ except Exception as e: ++ print(' catch {}'.format(e)) ++ ++ def get(self): ++ if self.verify(): ++ print(' hash match - skipping') ++ return True ++ ++ if self.archive or self.member: ++ assert(self.archive and self.member) ++ print(' hash check failed - extracting') ++ print(' get {}'.format(self.member)) ++ self.extract() ++ else: ++ assert(self.url) ++ print(' hash check failed - downloading') ++ print(' get {}'.format(self.url)) ++ self.download() ++ ++ print(' done') ++ print(' file {}'.format(self.filename)) ++ return self.verify() ++ ++ def download(self): ++ try: ++ r = urlopen(self.url, timeout=60) ++ self.printRequest(r) ++ self.save(r) ++ except Exception as e: ++ print(' catch {}'.format(e)) ++ ++ def extract(self): ++ try: ++ with tarfile.open(self.archive) as f: ++ assert self.member in f.getnames() ++ self.save(f.extractfile(self.member)) ++ except Exception as e: ++ print(' catch {}'.format(e)) ++ ++ def save(self, r): ++ with open(self.filename, 'wb') as f: ++ print(' progress ', end='') ++ sys.stdout.flush() ++ while True: ++ buf = r.read(self.BUFSIZE) ++ if not buf: ++ break ++ f.write(buf) ++ print('>', end='') ++ sys.stdout.flush() ++ ++models = [ ++ Model( ++ name='Fcn', ++ url='http://dl.caffe.berkeleyvision.org/fcn8s-heavy-pascal.caffemodel', ++ sha='c449ea74dd7d83751d1357d6a8c323fcf4038962', ++ filename='fcn8s-heavy-pascal.caffemodel'), ++ Model( ++ name='SqueezeNet_v1.1', ++ url='https://raw.githubusercontent.com/DeepScale/SqueezeNet/b5c3f1a23713c8b3fd7b801d229f6b04c64374a5/SqueezeNet_v1.1/squeezenet_v1.1.caffemodel', ++ sha='3397f026368a45ae236403ccc81cfcbe8ebe1bd0', ++ filename='squeezenet_v1.1.caffemodel'), ++ Model( ++ name='Colorization', ++ url='https://raw.githubusercontent.com/richzhang/colorization/master/models/colorization_deploy_v2.prototxt', ++ sha='f528334e386a69cbaaf237a7611d833bef8e5219', ++ filename='colorization_deploy_v2.prototxt'), ++ Model( ++ name='Colorization', ++ url='http://eecs.berkeley.edu/~rich.zhang/projects/2016_colorization/files/demo_v2/colorization_release_v2.caffemodel', ++ sha='21e61293a3fa6747308171c11b6dd18a68a26e7f', ++ filename='colorization_release_v2.caffemodel'), ++ Model( ++ name='OpenPose/pose/coco', # https://github.com/CMU-Perceptual-Computing-Lab/openpose ++ url='http://posefs1.perception.cs.cmu.edu/OpenPose/models/pose/coco/pose_iter_440000.caffemodel', ++ sha='ac7e97da66f3ab8169af2e601384c144e23a95c1', ++ filename='openpose_pose_coco.caffemodel'), ++ Model( ++ name='YOLOv3', # https://pjreddie.com/darknet/yolo/ ++ url='https://pjreddie.com/media/files/yolov3.weights', ++ sha='520878f12e97cf820529daea502acca380f1cb8e', ++ filename='yolov3.weights'), ++ Model( ++ name='EAST', # https://github.com/argman/EAST (a TensorFlow model), https://arxiv.org/abs/1704.03155v2 (a paper) ++ url='https://www.dropbox.com/s/r2ingd0l3zt8hxs/frozen_east_text_detection.tar.gz?dl=1', ++ sha='3ca8233d6edd748f7ed23246c8ca24cbf696bb94', ++ filename='frozen_east_text_detection.tar.gz'), ++ Model( ++ name='EAST', ++ archive='frozen_east_text_detection.tar.gz', ++ member='frozen_east_text_detection.pb', ++ sha='fffabf5ac36f37bddf68e34e84b45f5c4247ed06', ++ filename='frozen_east_text_detection.pb'), ++] ++ ++# Note: models will be downloaded to current working directory ++# expected working directory is opencv_extra/testdata/dnn ++if __name__ == '__main__': ++ failedModels = [] ++ for m in models: ++ print(m) ++ if not m.get(): ++ failedModels.append(m.filename) ++ ++ if failedModels: ++ print("Following models have not been downloaded:") ++ for f in failedModels: ++ print("* {}".format(f)) ++ exit(15) +-- +2.17.1 + diff --git a/meta-digi-dey/recipes-support/opencv/opencv_4.2.0.imx.bb b/meta-digi-dey/recipes-support/opencv/opencv_4.2.0.imx.bb index c323be5d7..c1acf3c61 100644 --- a/meta-digi-dey/recipes-support/opencv/opencv_4.2.0.imx.bb +++ b/meta-digi-dey/recipes-support/opencv/opencv_4.2.0.imx.bb @@ -2,7 +2,7 @@ require recipes-support/opencv/opencv_4.1.0.bb LIC_FILES_CHKSUM = "file://LICENSE;md5=014935351b2df6f3094bf25de8d50ed8" -SRCREV_opencv = "c4fbe8651af1d7e22e707dba7a93d001eaca4a15" +SRCREV_opencv = "7187501b6bc89e111f4dd5694b58151ca98b7d9a" SRCREV_contrib = "65abc7090dedc84bbedec4dfd143f0340e52114f" SRCREV_extra = "322b475403899abc2411c4fbf68318afa77d3191" SRC_URI[tinydnn.md5sum] = "adb1c512e09ca2c7a6faef36f9c53e59" @@ -21,6 +21,7 @@ SRC_URI += " \ https://github.com/tiny-dnn/tiny-dnn/archive/v1.0.0a3.tar.gz;destsuffix=git/3rdparty/tinydnn/tiny-dnn-1.0.0a3;name=tinydnn;unpack=false \ file://uselocalxfeatures.patch;patchdir=../contrib/ \ file://OpenCV_DNN_examples.patch \ + file://0001-Add-smaller-version-of-download_models.py.patch;patchdir=../extra \ " PV = "4.2.0.imx" @@ -51,6 +52,9 @@ do_install_append() { cp -r ${S}/samples/data/* ${D}${datadir}/OpenCV/samples/data install -d ${D}${datadir}/OpenCV/samples/bin/ cp -f bin/example_* ${D}${datadir}/OpenCV/samples/bin/ + if ${@bb.utils.contains('PACKAGECONFIG', 'test', 'true', 'false', d)}; then + cp -r share/opencv4/testdata/cv/face/* ${D}${datadir}/opencv4/testdata/cv/face/ + fi } FILES_${PN}-samples += "${datadir}/OpenCV/samples" From 306f0c2d436cdf5b87a27e9cddc36010021041a4 Mon Sep 17 00:00:00 2001 From: Hector Bujanda Date: Tue, 3 Nov 2020 01:25:09 +0100 Subject: [PATCH 22/57] recipes-graphics: xserver-xorg: Update recipes to new BSP release imx_5.4.47_2.2.0 Includes: xserver-xorg: Upgrade to 1.20.8 version [YOCIMX-4697] Backport the recipes from poky master as the xserver is already upgraded to 1.20.8. Signed-off-by: Neena Busireddy xserver-xorg: Remove comment that is no longer valid Signed-off-by: Tom Hochstein xserver-xorg: Fix patch fuzz Signed-off-by: Tom Hochstein Signed-off-by: Hector Bujanda Added FILESEXTRAPATHS_prepend to reuse some recipes from poky layer. Patches refreshed with devtool finish --force-patch-refresh Signed-off-by: Hector Bujanda --- meta-digi-dey/classes/features_check.bbclass | 88 +++++++++ .../xorg-xserver/xserver-xorg.inc | 182 ++++++++++++++++++ ...cification-EGL_NATIVE_PIXMAP_KHR-req.patch | 13 +- ...Config-when-the-opengl-context-fails.patch | 29 +++ ...e_display.c-add-missing-mi.h-include.patch | 24 +++ .../xorg-xserver/xserver-xorg_%.bbappend | 4 +- .../xorg-xserver/xserver-xorg_1.20.8.bb | 34 ++++ 7 files changed, 365 insertions(+), 9 deletions(-) create mode 100644 meta-digi-dey/classes/features_check.bbclass create mode 100644 meta-digi-dey/recipes-graphics/xorg-xserver/xserver-xorg.inc create mode 100644 meta-digi-dey/recipes-graphics/xorg-xserver/xserver-xorg/0001-Use-GLES-Config-when-the-opengl-context-fails.patch create mode 100644 meta-digi-dey/recipes-graphics/xorg-xserver/xserver-xorg/0001-drmmode_display.c-add-missing-mi.h-include.patch create mode 100644 meta-digi-dey/recipes-graphics/xorg-xserver/xserver-xorg_1.20.8.bb diff --git a/meta-digi-dey/classes/features_check.bbclass b/meta-digi-dey/classes/features_check.bbclass new file mode 100644 index 000000000..876d32e31 --- /dev/null +++ b/meta-digi-dey/classes/features_check.bbclass @@ -0,0 +1,88 @@ +# Allow checking of required and conflicting DISTRO_FEATURES +# +# ANY_OF_DISTRO_FEATURES: ensure at least one item on this list is included +# in DISTRO_FEATURES. +# REQUIRED_DISTRO_FEATURES: ensure every item on this list is included +# in DISTRO_FEATURES. +# CONFLICT_DISTRO_FEATURES: ensure no item in this list is included in +# DISTRO_FEATURES. +# ANY_OF_MACHINE_FEATURES: ensure at least one item on this list is included +# in MACHINE_FEATURES. +# REQUIRED_MACHINE_FEATURES: ensure every item on this list is included +# in MACHINE_FEATURES. +# CONFLICT_MACHINE_FEATURES: ensure no item in this list is included in +# MACHINE_FEATURES. +# ANY_OF_COMBINED_FEATURES: ensure at least one item on this list is included +# in COMBINED_FEATURES. +# REQUIRED_COMBINED_FEATURES: ensure every item on this list is included +# in COMBINED_FEATURES. +# CONFLICT_COMBINED_FEATURES: ensure no item in this list is included in +# COMBINED_FEATURES. +# +# Copyright 2019 (C) Texas Instruments Inc. +# Copyright 2013 (C) O.S. Systems Software LTDA. + +python () { + if d.getVar('PARSE_ALL_RECIPES', False): + return + + # Assume at least one var is set. + distro_features = set((d.getVar('DISTRO_FEATURES') or '').split()) + + any_of_distro_features = set((d.getVar('ANY_OF_DISTRO_FEATURES') or '').split()) + if any_of_distro_features: + if set.isdisjoint(any_of_distro_features, distro_features): + raise bb.parse.SkipRecipe("one of '%s' needs to be in DISTRO_FEATURES" % ' '.join(any_of_distro_features)) + + required_distro_features = set((d.getVar('REQUIRED_DISTRO_FEATURES') or '').split()) + if required_distro_features: + missing = set.difference(required_distro_features, distro_features) + if missing: + raise bb.parse.SkipRecipe("missing required distro feature%s '%s' (not in DISTRO_FEATURES)" % ('s' if len(missing) > 1 else '', ' '.join(missing))) + + conflict_distro_features = set((d.getVar('CONFLICT_DISTRO_FEATURES') or '').split()) + if conflict_distro_features: + conflicts = set.intersection(conflict_distro_features, distro_features) + if conflicts: + raise bb.parse.SkipRecipe("conflicting distro feature%s '%s' (in DISTRO_FEATURES)" % ('s' if len(conflicts) > 1 else '', ' '.join(conflicts))) + + # Assume at least one var is set. + machine_features = set((d.getVar('MACHINE_FEATURES') or '').split()) + + any_of_machine_features = set((d.getVar('ANY_OF_MACHINE_FEATURES') or '').split()) + if any_of_machine_features: + if set.isdisjoint(any_of_machine_features, machine_features): + raise bb.parse.SkipRecipe("one of '%s' needs to be in MACHINE_FEATURES" % ' '.join(any_of_machine_features)) + + required_machine_features = set((d.getVar('REQUIRED_MACHINE_FEATURES') or '').split()) + if required_machine_features: + missing = set.difference(required_machine_features, machine_features) + if missing: + raise bb.parse.SkipRecipe("missing required machine feature%s '%s' (not in MACHINE_FEATURES)" % ('s' if len(missing) > 1 else '', ' '.join(missing))) + + conflict_machine_features = set((d.getVar('CONFLICT_MACHINE_FEATURES') or '').split()) + if conflict_machine_features: + conflicts = set.intersection(conflict_machine_features, machine_features) + if conflicts: + raise bb.parse.SkipRecipe("conflicting machine feature%s '%s' (in MACHINE_FEATURES)" % ('s' if len(conflicts) > 1 else '', ' '.join(conflicts))) + + # Assume at least one var is set. + combined_features = set((d.getVar('COMBINED_FEATURES') or '').split()) + + any_of_combined_features = set((d.getVar('ANY_OF_COMBINED_FEATURES') or '').split()) + if any_of_combined_features: + if set.isdisjoint(any_of_combined_features, combined_features): + raise bb.parse.SkipRecipe("one of '%s' needs to be in COMBINED_FEATURES" % ' '.join(any_of_combined_features)) + + required_combined_features = set((d.getVar('REQUIRED_COMBINED_FEATURES') or '').split()) + if required_combined_features: + missing = set.difference(required_combined_features, combined_features) + if missing: + raise bb.parse.SkipRecipe("missing required machine feature%s '%s' (not in COMBINED_FEATURES)" % ('s' if len(missing) > 1 else '', ' '.join(missing))) + + conflict_combined_features = set((d.getVar('CONFLICT_COMBINED_FEATURES') or '').split()) + if conflict_combined_features: + conflicts = set.intersection(conflict_combined_features, combined_features) + if conflicts: + raise bb.parse.SkipRecipe("conflicting machine feature%s '%s' (in COMBINED_FEATURES)" % ('s' if len(conflicts) > 1 else '', ' '.join(conflicts))) +} diff --git a/meta-digi-dey/recipes-graphics/xorg-xserver/xserver-xorg.inc b/meta-digi-dey/recipes-graphics/xorg-xserver/xserver-xorg.inc new file mode 100644 index 000000000..b3e03744c --- /dev/null +++ b/meta-digi-dey/recipes-graphics/xorg-xserver/xserver-xorg.inc @@ -0,0 +1,182 @@ +SUMMARY = "The X.Org X server" +HOMEPAGE = "http://www.x.org" +SECTION = "x11/base" +LICENSE = "MIT-X" +LIC_FILES_CHKSUM = "file://COPYING;md5=5df87950af51ac2c5822094553ea1880" + +# xf86-*-* packages depend on an X server built with the xfree86 DDX +# so we have a virtual to represent that: +# deprecated, we should use virtual/xserver instead +PROVIDES = "virtual/xserver-xf86" + +# Other packages tend to just care that there is *an* X server: +PROVIDES += "virtual/xserver" + +PE = "2" + +XORG_PN = "xorg-server" +SRC_URI = "${XORG_MIRROR}/individual/xserver/${XORG_PN}-${PV}.tar.bz2" + +CVE_PRODUCT = "xorg-server" + +S = "${WORKDIR}/${XORG_PN}-${PV}" + +inherit autotools pkgconfig + +inherit features_check +REQUIRED_DISTRO_FEATURES = "x11" + +LIB_DEPS = "pixman libxfont2 xtrans libxau libxext libxdmcp libdrm libxkbfile libpciaccess" +DEPENDS = "xorgproto ${LIB_DEPS} font-util" + +# Split out some modules and extensions from the main package +# These aren't needed for basic operations and only take up space: +# 32.0k libdri.so +# 91.0k libexa.so +# 336.0k libglx.so +# 1360k libint10.so +# 180.0k libwfb.so +# 320.0k libxaa.so +# 124.0k libxf1bpp.so +# 84.0k libxf4bpp.so +# librecord.so +# libextmod.so +# libdbe.so + +PACKAGES =+ "${PN}-sdl \ + ${PN}-fbdev \ + ${PN}-xvfb \ + ${PN}-utils \ + ${PN}-xephyr \ + ${PN}-xwayland \ + ${PN}-multimedia-modules \ + ${PN}-extension-dri \ + ${PN}-extension-dri2 \ + ${PN}-extension-glx \ + ${PN}-extension-record \ + ${PN}-extension-extmod \ + ${PN}-extension-dbe \ + ${PN}-module-libint10 \ + ${PN}-module-libafb \ + ${PN}-module-libwfb \ + ${PN}-module-libmfb \ + ${PN}-module-libcfb \ + ${PN}-module-exa \ + ${PN}-module-xaa \ + ${PN}-module-libxf1bpp \ + ${PN}-module-libxf4bpp \ + xf86-video-modesetting" + +SUMMARY_xf86-video-modesetting = "X.Org X server -- modesetting display driver" +INSANE_SKIP_${MLPREFIX}xf86-video-modesetting = "xorg-driver-abi" + +XSERVER_RRECOMMENDS = "xkeyboard-config rgb xserver-xf86-config xkbcomp xf86-input-libinput" +RRECOMMENDS_${PN} += "${XSERVER_RRECOMMENDS}" +RRECOMMENDS_${PN}-xwayland += "${XSERVER_RRECOMMENDS}" +RDEPENDS_${PN}-xvfb += "xkeyboard-config" +RDEPENDS_${PN}-module-exa = "${PN} (= ${EXTENDPKGV})" + +FILES_${PN} = "${bindir} ${libdir}/X11/Options ${libdir}/X11/Cards ${libdir}/X11/getconfig ${libdir}/X11/etc ${libdir}/modules/*.so ${libdir}/xorg/modules/*.so /etc/X11 ${libdir}/xorg/protocol.txt ${datadir}/X11/xorg.conf.d" +FILES_${PN}-dev += "${libdir}/xorg/modules/*.la ${libdir}/xorg/modules/*/*.la" +FILES_${PN}-doc += "${libdir}/X11/doc ${datadir}/X11/xkb/compiled/README.compiled ${localstatedir}/lib/xkb/README.compiled" +FILES_${PN}-sdl = "${bindir}/Xsdl" +FILES_${PN}-fbdev = "${bindir}/Xfbdev" +FILES_${PN}-xvfb = "${bindir}/Xvfb" +FILES_${PN}-utils = "${bindir}/scanpci ${bindir}/pcitweak ${bindir}/ioport ${bindir}/in[bwl] ${bindir}/out[bwl] ${bindir}/mmap[rw] ${bindir}/gtf ${bindir}/getconfig ${bindir}/getconfig.pl" +FILES_${PN}-xephyr = "${bindir}/Xephyr" +FILES_${PN}-xwayland = "${bindir}/Xwayland" +FILES_${PN}-multimedia-modules = "${libdir}/xorg/modules/multimedia/*drv*" +FILES_${PN}-extension-dri = "${libdir}/xorg/modules/extensions/libdri.so" +FILES_${PN}-extension-dri2 = "${libdir}/xorg/modules/extensions/libdri2.so" +FILES_${PN}-extension-glx = "${libdir}/xorg/modules/extensions/libglx.so" +FILES_${PN}-extension-record = "${libdir}/xorg/modules/extensions/librecord.so" +FILES_${PN}-extension-extmod = "${libdir}/xorg/modules/extensions/libextmod.so" +FILES_${PN}-extension-dbe = "${libdir}/xorg/modules/extensions/libdbe.so" +FILES_${PN}-module-libint10 = "${libdir}/xorg/modules/libint10.so" +FILES_${PN}-module-libafb = "${libdir}/xorg/modules/libafb.so" +FILES_${PN}-module-libwfb = "${libdir}/xorg/modules/libwfb.so" +FILES_${PN}-module-libmfb = "${libdir}/xorg/modules/libmfb.so" +FILES_${PN}-module-libcfb = "${libdir}/xorg/modules/libcfb.so" +FILES_${PN}-module-exa = "${libdir}/xorg/modules/libexa.so" +FILES_${PN}-module-xaa = "${libdir}/xorg/modules/libxaa.so" +FILES_${PN}-module-libxf1bpp = "${libdir}/xorg/modules/libxf1bpp.so" +FILES_${PN}-module-libxf4bpp = "${libdir}/xorg/modules/libxf4bpp.so" +FILES_xf86-video-modesetting = "${libdir}/xorg/modules/drivers/modesetting_drv.so" + +EXTRA_OECONF += "--with-fop=no \ + --with-pic \ + --disable-static \ + --disable-record \ + --disable-dmx \ + --disable-xnest \ + --enable-xvfb \ + --enable-composite \ + --without-dtrace \ + --with-int10=x86emu \ + --sysconfdir=/etc/X11 \ + --localstatedir=/var \ + --with-xkb-output=/var/lib/xkb \ + --with-os-name=Linux \ +" + +OPENGL_PKGCONFIGS = "dri glx glamor dri3 xshmfence" +PACKAGECONFIG ??= "dga dri2 udev ${XORG_CRYPTO} \ + ${@bb.utils.contains('DISTRO_FEATURES', 'opengl', '${OPENGL_PKGCONFIGS}', '', d)} \ + ${@bb.utils.contains('DISTRO_FEATURES', 'opengl wayland', 'xwayland', '', d)} \ + ${@bb.utils.contains('DISTRO_FEATURES', 'systemd', 'systemd systemd-logind', '', d)} \ +" + +PACKAGECONFIG[udev] = "--enable-config-udev,--disable-config-udev,udev" +PACKAGECONFIG[dga] = "--enable-dga,--disable-dga" +PACKAGECONFIG[dri] = "--enable-dri,--disable-dri,virtual/mesa" +PACKAGECONFIG[dri2] = "--enable-dri2,--disable-dri2" +# DRI3 requires xshmfence to also be enabled +PACKAGECONFIG[dri3] = "--enable-dri3,--disable-dri3" +PACKAGECONFIG[glx] = "--enable-glx,--disable-glx,virtual/libgl virtual/libx11" +PACKAGECONFIG[glamor] = "--enable-glamor,--disable-glamor,libepoxy virtual/libgbm,libegl" +PACKAGECONFIG[unwind] = "--enable-libunwind,--disable-libunwind,libunwind" +PACKAGECONFIG[xshmfence] = "--enable-xshmfence,--disable-xshmfence,libxshmfence" +PACKAGECONFIG[xmlto] = "--with-xmlto, --without-xmlto, xmlto-native docbook-xml-dtd4-native docbook-xsl-stylesheets-native" +PACKAGECONFIG[systemd-logind] = "--enable-systemd-logind=yes,--enable-systemd-logind=no,dbus," +PACKAGECONFIG[systemd] = "--with-systemd-daemon,--without-systemd-daemon,systemd" +PACKAGECONFIG[xinerama] = "--enable-xinerama,--disable-xinerama" +PACKAGECONFIG[xwayland] = "--enable-xwayland,--disable-xwayland,wayland wayland-native wayland-protocols libepoxy" + +# Xorg requires a SHA1 implementation, pick one +XORG_CRYPTO ??= "openssl" +PACKAGECONFIG[openssl] = "--with-sha1=libcrypto,,openssl" +PACKAGECONFIG[nettle] = "--with-sha1=libnettle,,nettle" +PACKAGECONFIG[gcrypt] = "--with-sha1=libgcrypt,,libgcrypt" + +do_install_append () { + # Its assumed base-files creates this for us + rmdir ${D}${localstatedir}/log/ + sed -i -e 's,${libdir}/xorg/modules,${prefix}/lib*/xorg/modules,' ${D}${mandir}/man5/xorg.conf.5 +} + +# Add runtime provides for the ABI versions of the video and input subsystems, +# so that drivers can depend on the relevant version. +python populate_packages_prepend() { + import subprocess + + # Set PKG_CONFIG_PATH so pkg-config looks at the .pc files that are going + # into the new package, not the staged ones. + newenv = dict(os.environ) + newenv["PKG_CONFIG_PATH"] = d.expand("${PKGD}${libdir}/pkgconfig/") + + def get_abi(name): + abis = { + "video": "abi_videodrv", + "input": "abi_xinput" + } + p = subprocess.Popen(args="pkg-config --variable=%s xorg-server" % abis[name], + shell=True, env=newenv, stdout=subprocess.PIPE) + stdout, stderr = p.communicate() + output = stdout.decode("utf-8").split(".")[0] + mlprefix = d.getVar('MLPREFIX') or '' + return "%sxorg-abi-%s-%s" % (mlprefix, name, output) + + pn = d.getVar("PN") + d.appendVar("RPROVIDES_" + pn, " " + get_abi("input")) + d.appendVar("RPROVIDES_" + pn, " " + get_abi("video")) +} diff --git a/meta-digi-dey/recipes-graphics/xorg-xserver/xserver-xorg/0001-MGS-5186-Per-Specification-EGL_NATIVE_PIXMAP_KHR-req.patch b/meta-digi-dey/recipes-graphics/xorg-xserver/xserver-xorg/0001-MGS-5186-Per-Specification-EGL_NATIVE_PIXMAP_KHR-req.patch index e91c493a5..7a6eac8f5 100644 --- a/meta-digi-dey/recipes-graphics/xorg-xserver/xserver-xorg/0001-MGS-5186-Per-Specification-EGL_NATIVE_PIXMAP_KHR-req.patch +++ b/meta-digi-dey/recipes-graphics/xorg-xserver/xserver-xorg/0001-MGS-5186-Per-Specification-EGL_NATIVE_PIXMAP_KHR-req.patch @@ -1,7 +1,8 @@ -From ed3c55fa6260ad125a32f9ac67f9e44a9bce7cf1 Mon Sep 17 00:00:00 2001 +From 6e467c13b7412cc862eab91edb4e59a5984f248f Mon Sep 17 00:00:00 2001 From: Prabhu Sundararaj Date: Mon, 11 May 2020 19:12:51 -0500 Subject: [PATCH] MGS-5186 Per Specification EGL_NATIVE_PIXMAP_KHR requires + EGL_NO_CONTEXT https://www.khronos.org/registry/EGL/extensions/KHR/EGL_KHR_image_pixmap.txt @@ -10,15 +11,16 @@ Per Specification EGL_NATIVE_PIXMAP_KHR requires EGL_NO_CONTEXT. So passing context will result in error. Signed-off-by: Prabhu Sundararaj + --- hw/xwayland/xwayland-glamor-gbm.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/hw/xwayland/xwayland-glamor-gbm.c b/hw/xwayland/xwayland-glamor-gbm.c -index a211e09..f5be403 100644 +index dce782f..e274fcd 100644 --- a/hw/xwayland/xwayland-glamor-gbm.c +++ b/hw/xwayland/xwayland-glamor-gbm.c -@@ -166,7 +166,7 @@ xwl_glamor_gbm_create_pixmap_for_bo(ScreenPtr screen, struct gbm_bo *bo, +@@ -167,7 +167,7 @@ xwl_glamor_gbm_create_pixmap_for_bo(ScreenPtr screen, struct gbm_bo *bo, xwl_pixmap->bo = bo; xwl_pixmap->buffer = NULL; xwl_pixmap->image = eglCreateImageKHR(xwl_screen->egl_display, @@ -26,7 +28,4 @@ index a211e09..f5be403 100644 + EGL_NO_CONTEXT /*xwl_screen->egl_context*/, EGL_NATIVE_PIXMAP_KHR, xwl_pixmap->bo, NULL); - --- -2.17.1 - + if (xwl_pixmap->image == EGL_NO_IMAGE_KHR) diff --git a/meta-digi-dey/recipes-graphics/xorg-xserver/xserver-xorg/0001-Use-GLES-Config-when-the-opengl-context-fails.patch b/meta-digi-dey/recipes-graphics/xorg-xserver/xserver-xorg/0001-Use-GLES-Config-when-the-opengl-context-fails.patch new file mode 100644 index 000000000..d24205e69 --- /dev/null +++ b/meta-digi-dey/recipes-graphics/xorg-xserver/xserver-xorg/0001-Use-GLES-Config-when-the-opengl-context-fails.patch @@ -0,0 +1,29 @@ +From e0a460c8f3f43b96dad184cddbaf0aae05620a68 Mon Sep 17 00:00:00 2001 +From: Prabhu Sundararaj +Date: Tue, 30 Jun 2020 02:24:59 +0000 +Subject: [PATCH] Use GLES Config when the opengl context fails + +Signed-off-by: Prabhu Sundararaj + +--- + hw/xwayland/xwayland-glamor-gbm.c | 6 +++++- + 1 file changed, 5 insertions(+), 1 deletion(-) + +diff --git a/hw/xwayland/xwayland-glamor-gbm.c b/hw/xwayland/xwayland-glamor-gbm.c +index e274fcd..954abed 100644 +--- a/hw/xwayland/xwayland-glamor-gbm.c ++++ b/hw/xwayland/xwayland-glamor-gbm.c +@@ -952,8 +952,12 @@ xwl_glamor_gbm_init_egl(struct xwl_screen *xwl_screen) + xwl_screen->egl_context = eglCreateContext( + xwl_screen->egl_display, NULL, EGL_NO_CONTEXT, config_attribs_core); + if (xwl_screen->egl_context == EGL_NO_CONTEXT) { ++ static const EGLint config_attribs[] = { ++ EGL_CONTEXT_CLIENT_VERSION, 2, ++ EGL_NONE ++ }; + xwl_screen->egl_context = eglCreateContext( +- xwl_screen->egl_display, NULL, EGL_NO_CONTEXT, NULL); ++ xwl_screen->egl_display, NULL, EGL_NO_CONTEXT, config_attribs); + } + + if (xwl_screen->egl_context == EGL_NO_CONTEXT) { diff --git a/meta-digi-dey/recipes-graphics/xorg-xserver/xserver-xorg/0001-drmmode_display.c-add-missing-mi.h-include.patch b/meta-digi-dey/recipes-graphics/xorg-xserver/xserver-xorg/0001-drmmode_display.c-add-missing-mi.h-include.patch new file mode 100644 index 000000000..4de950642 --- /dev/null +++ b/meta-digi-dey/recipes-graphics/xorg-xserver/xserver-xorg/0001-drmmode_display.c-add-missing-mi.h-include.patch @@ -0,0 +1,24 @@ +From e108605c2a14d6643b620c5f09443d95bfa35147 Mon Sep 17 00:00:00 2001 +From: Alexander Kanavin +Date: Fri, 7 Feb 2020 20:36:45 +0100 +Subject: [PATCH] drmmode_display.c: add missing mi.h include + +Upstream-Status: Pending +Signed-off-by: Alexander Kanavin + +--- + hw/xfree86/drivers/modesetting/drmmode_display.c | 1 + + 1 file changed, 1 insertion(+) + +diff --git a/hw/xfree86/drivers/modesetting/drmmode_display.c b/hw/xfree86/drivers/modesetting/drmmode_display.c +index ae06fa3..4fb2314 100644 +--- a/hw/xfree86/drivers/modesetting/drmmode_display.c ++++ b/hw/xfree86/drivers/modesetting/drmmode_display.c +@@ -47,6 +47,7 @@ + #include "xf86Crtc.h" + #include "drmmode_display.h" + #include "present.h" ++#include "mi.h" + + #include + diff --git a/meta-digi-dey/recipes-graphics/xorg-xserver/xserver-xorg_%.bbappend b/meta-digi-dey/recipes-graphics/xorg-xserver/xserver-xorg_%.bbappend index 4891eafbf..2040dd8c1 100644 --- a/meta-digi-dey/recipes-graphics/xorg-xserver/xserver-xorg_%.bbappend +++ b/meta-digi-dey/recipes-graphics/xorg-xserver/xserver-xorg_%.bbappend @@ -1,8 +1,8 @@ FILESEXTRAPATHS_prepend := "${THISDIR}/${BPN}:" -# Trailing space is intentional due to a bug in meta-freescale SRC_URI += "file://0001-glamor-Use-CFLAGS-for-EGL-and-GBM.patch \ file://0001-MGS-5186-Per-Specification-EGL_NATIVE_PIXMAP_KHR-req.patch \ - file://0002-MGS-5186-Per-Specification-EGL_NATIVE_PIXMAP_KHR-req.patch" + file://0002-MGS-5186-Per-Specification-EGL_NATIVE_PIXMAP_KHR-req.patch \ + file://0001-Use-GLES-Config-when-the-opengl-context-fails.patch" PACKAGECONFIG_append_mx8 = " glamor" diff --git a/meta-digi-dey/recipes-graphics/xorg-xserver/xserver-xorg_1.20.8.bb b/meta-digi-dey/recipes-graphics/xorg-xserver/xserver-xorg_1.20.8.bb new file mode 100644 index 000000000..40f894b0b --- /dev/null +++ b/meta-digi-dey/recipes-graphics/xorg-xserver/xserver-xorg_1.20.8.bb @@ -0,0 +1,34 @@ +require xserver-xorg.inc + +FILESEXTRAPATHS_prepend := "${COREBASE}/meta/recipes-graphics/xorg-xserver/xserver-xorg:" + +SRC_URI += "file://0001-xf86pciBus.c-use-Intel-ddx-only-for-pre-gen4-hardwar.patch \ + file://pkgconfig.patch \ + file://0001-test-xtest-Initialize-array-with-braces.patch \ + file://sdksyms-no-build-path.patch \ + file://0001-drmmode_display.c-add-missing-mi.h-include.patch \ + " +SRC_URI[md5sum] = "a770aec600116444a953ff632f51f839" +SRC_URI[sha256sum] = "d17b646bee4ba0fb7850c1cc55b18e3e8513ed5c02bdf38da7e107f84e2d0146" + +# These extensions are now integrated into the server, so declare the migration +# path for in-place upgrades. + +RREPLACES_${PN} = "${PN}-extension-dri \ + ${PN}-extension-dri2 \ + ${PN}-extension-record \ + ${PN}-extension-extmod \ + ${PN}-extension-dbe \ + " +RPROVIDES_${PN} = "${PN}-extension-dri \ + ${PN}-extension-dri2 \ + ${PN}-extension-record \ + ${PN}-extension-extmod \ + ${PN}-extension-dbe \ + " +RCONFLICTS_${PN} = "${PN}-extension-dri \ + ${PN}-extension-dri2 \ + ${PN}-extension-record \ + ${PN}-extension-extmod \ + ${PN}-extension-dbe \ + " From 4685664d07a9921a7f843e3fac64b569c612aa93 Mon Sep 17 00:00:00 2001 From: Hector Palacios Date: Thu, 29 Oct 2020 09:56:55 +0100 Subject: [PATCH 23/57] u-boot: boot script: allow to disable Wi-Fi/BT overlays MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Check a U-Boot env variable (disable_wifi/disable_bt) for easily disabling Wi-Fi and/or Bluetooth overlays. Signed-off-by: Hector Palacios ç https://jira.digi.com/browse/DEL-7297 (cherry picked from commit b74a8cee54bbffd3e5ceb61f7e937a138727f946) Signed-off-by: Hector Palacios --- .../recipes-bsp/u-boot/u-boot-dey/ccimx8mn-dvk/boot.txt | 4 ++-- .../u-boot/u-boot-dey/ccimx8x-sbc-express/boot.txt | 4 ++-- .../recipes-bsp/u-boot/u-boot-dey/ccimx8x-sbc-pro/boot.txt | 4 ++-- 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/meta-digi-arm/recipes-bsp/u-boot/u-boot-dey/ccimx8mn-dvk/boot.txt b/meta-digi-arm/recipes-bsp/u-boot/u-boot-dey/ccimx8mn-dvk/boot.txt index 413f0e3f5..78414f805 100644 --- a/meta-digi-arm/recipes-bsp/u-boot/u-boot-dey/ccimx8mn-dvk/boot.txt +++ b/meta-digi-arm/recipes-bsp/u-boot/u-boot-dey/ccimx8mn-dvk/boot.txt @@ -24,11 +24,11 @@ if test -n "${module_ram}"; then setexpr module_has_bt ${hwid_2} \& 20000 setexpr module_has_bt ${module_has_bt} / 20000 - if test "${module_has_bt}" = "1"; then + if test "${module_has_bt}" = "1" && test -z "${disable_bt}"; then setenv overlays _ov_som_bt_ccimx8mn.dtbo,${overlays} fi - if test "${module_has_wifi}" = "1"; then + if test "${module_has_wifi}" = "1" && test -z "${disable_wifi}"; then setenv overlays _ov_som_wifi_ccimx8mn.dtbo,${overlays} fi diff --git a/meta-digi-arm/recipes-bsp/u-boot/u-boot-dey/ccimx8x-sbc-express/boot.txt b/meta-digi-arm/recipes-bsp/u-boot/u-boot-dey/ccimx8x-sbc-express/boot.txt index 875d874de..278914bcd 100644 --- a/meta-digi-arm/recipes-bsp/u-boot/u-boot-dey/ccimx8x-sbc-express/boot.txt +++ b/meta-digi-arm/recipes-bsp/u-boot/u-boot-dey/ccimx8x-sbc-express/boot.txt @@ -20,11 +20,11 @@ if test -n "${module_ram}"; then setexpr module_has_bt ${hwid_3} \& 2 setexpr module_has_bt ${module_has_bt} / 2 - if test "${module_has_bt}" = "1"; then + if test "${module_has_bt}" = "1" && test -z "${disable_bt}"; then setenv overlays _ov_som_bt_ccimx8x.dtbo,${overlays} fi - if test "${module_has_wifi}" = "1"; then + if test "${module_has_wifi}" = "1" && test -z "${disable_wifi}"; then setenv overlays _ov_som_wifi_ccimx8x.dtbo,${overlays} fi else diff --git a/meta-digi-arm/recipes-bsp/u-boot/u-boot-dey/ccimx8x-sbc-pro/boot.txt b/meta-digi-arm/recipes-bsp/u-boot/u-boot-dey/ccimx8x-sbc-pro/boot.txt index eb6de7f06..481c8cc2d 100644 --- a/meta-digi-arm/recipes-bsp/u-boot/u-boot-dey/ccimx8x-sbc-pro/boot.txt +++ b/meta-digi-arm/recipes-bsp/u-boot/u-boot-dey/ccimx8x-sbc-pro/boot.txt @@ -20,11 +20,11 @@ if test -n "${module_ram}"; then setexpr module_has_bt ${hwid_3} \& 2 setexpr module_has_bt ${module_has_bt} / 2 - if test "${module_has_bt}" = "1"; then + if test "${module_has_bt}" = "1" && test -z "${disable_bt}"; then setenv overlays _ov_som_bt_ccimx8x.dtbo,${overlays} fi - if test "${module_has_wifi}" = "1"; then + if test "${module_has_wifi}" = "1" && test -z "${disable_wifi}"; then setenv overlays _ov_som_wifi_ccimx8x.dtbo,${overlays} fi else From f9df488eb3af94d0062e6d9b663223999c33ad0e Mon Sep 17 00:00:00 2001 From: Gabriel Valcazar Date: Wed, 4 Nov 2020 10:52:39 +0100 Subject: [PATCH 24/57] digi-sc-firmware: update to v1.6.0 Signed-off-by: Gabriel Valcazar --- ...{digi-sc-firmware_1.5.1.bb => digi-sc-firmware_1.6.0.bb} | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) rename meta-digi-arm/recipes-bsp/digi-sc-firmware/{digi-sc-firmware_1.5.1.bb => digi-sc-firmware_1.6.0.bb} (84%) diff --git a/meta-digi-arm/recipes-bsp/digi-sc-firmware/digi-sc-firmware_1.5.1.bb b/meta-digi-arm/recipes-bsp/digi-sc-firmware/digi-sc-firmware_1.6.0.bb similarity index 84% rename from meta-digi-arm/recipes-bsp/digi-sc-firmware/digi-sc-firmware_1.5.1.bb rename to meta-digi-arm/recipes-bsp/digi-sc-firmware/digi-sc-firmware_1.6.0.bb index 6db7a2c24..98f431c1a 100644 --- a/meta-digi-arm/recipes-bsp/digi-sc-firmware/digi-sc-firmware_1.5.1.bb +++ b/meta-digi-arm/recipes-bsp/digi-sc-firmware/digi-sc-firmware_1.6.0.bb @@ -4,15 +4,15 @@ DESCRIPTION = "i.MX System Controller Firmware, customized for Digi platforms" LICENSE = "Proprietary" -LIC_FILES_CHKSUM = "file://COPYING;md5=1b4db4b25c3a1e422c0c0ed64feb65d2" +LIC_FILES_CHKSUM = "file://COPYING;md5=983e4c77621568488dd902b27e0c2143" SECTION = "BSP" inherit pkgconfig deploy SRC_URI = "${DIGI_PKG_SRC}/${BPN}-${PV}.tar.gz" -SRC_URI[md5sum] = "e9bb8ca081eeec038315de9e6110a3d7" -SRC_URI[sha256sum] = "2d107e56368447c26e73338e90e0c691fceed22682e1907f7f512d1a5a452b91" +SRC_URI[md5sum] = "0059e04701ba4fe4436610eef680907d" +SRC_URI[sha256sum] = "1776a5eeae3641cff8fe8dc16d78219e758cd30b12efdb7223bc31c34ae1580d" S = "${WORKDIR}/${PN}-${PV}" From a628fb9b63953717c41e5717ddfa5be571c9ba54 Mon Sep 17 00:00:00 2001 From: Gonzalo Ruiz Date: Thu, 12 Nov 2020 10:35:18 +0100 Subject: [PATCH 25/57] firmware_qualcomm: ccimx8mn: update US Board Data File Target Powers table Update file: - bdwlan30_US.bin (388da992fdf0bd25e62060247a0606e5) This file was generated by calibrating several v3 CC8MN SOMs and merging their resulting BDF files into a Golden file. It also encodes the Target output powers tables. Reference calibration file is obtained from 'qca6574au-le-2-2-2_qca_oem' repo at tag 'r00005.1' under path 'wlanfw/cnss_proc/wlan/fw/target/sdio_dst/qc6174/bdwlan30.bin': - bdwlan30.bin (8a40d95698825e1718bee640b1f7982a) Target output powers respect the maximum EVM for every data rate. https://jira.digi.com/browse/DEL-7290 Signed-off-by: Gonzalo Ruiz --- .../ccimx8mn/bdwlan30_US.bin | Bin 8124 -> 8124 bytes 1 file changed, 0 insertions(+), 0 deletions(-) diff --git a/meta-digi-arm/recipes-bsp/firmware-qualcomm/firmware-qualcomm/ccimx8mn/bdwlan30_US.bin b/meta-digi-arm/recipes-bsp/firmware-qualcomm/firmware-qualcomm/ccimx8mn/bdwlan30_US.bin index 486c810ccaf5313d6b4752f9bcdb4eeca7d58319..468e69e2b57ff06bef1a335eb76284af89ab59fc 100644 GIT binary patch delta 360 zcmdmEzsH_skGxRnMwS`u0V+xgGB7M5ai&X+0SGV|A|fDhAdr&k$WURz&Di{g-I1?e zL`p&oC+6XKw?+eG7KIEhu6O4$Sb*kWFzPXd@QLv7tm<+D`H4aX3k+=57N5ug02a?h AW&i*H delta 360 zcmdmEzsH_skNkn;jVv?R1C->XBw$!f>|K@$0}x;`L_|R1Kp-OWuFH)HH)Hb~c1ON? xAt?zloS2L2-8m1CSyW(T!OTHn)Ps#i5yB_J!?S9Y2gpwpGFV_>v$ps|4gm5|OCA6K From 18198b5c12b03bbb6056ad657346fc2154689515 Mon Sep 17 00:00:00 2001 From: Mike Engel Date: Mon, 16 Nov 2020 10:00:28 +0100 Subject: [PATCH 26/57] u-boot-dey: ccimx6ulstarter: fix typo in installer script Signed-off-by: Mike Engel (cherry picked from commit 3041f3a2f7468811731fda28c4582417864fd716) --- .../u-boot/u-boot-dey/ccimx6ulstarter/install_linux_fw_sd.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/meta-digi-arm/recipes-bsp/u-boot/u-boot-dey/ccimx6ulstarter/install_linux_fw_sd.txt b/meta-digi-arm/recipes-bsp/u-boot/u-boot-dey/ccimx6ulstarter/install_linux_fw_sd.txt index 7c009c37d..c896fffc6 100644 --- a/meta-digi-arm/recipes-bsp/u-boot/u-boot-dey/ccimx6ulstarter/install_linux_fw_sd.txt +++ b/meta-digi-arm/recipes-bsp/u-boot/u-boot-dey/ccimx6ulstarter/install_linux_fw_sd.txt @@ -21,7 +21,7 @@ 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" || test "${module_variant}" = "0x06" || test "${module_variant}" = "0x0a; then + if test "${module_variant}" = "0x02" || test "${module_variant}" = "0x03" || test "${module_variant}" = "0x06" || test "${module_variant}" = "0x0a"; then setenv INSTALL_UBOOT_FILENAME u-boot-ccimx6ulstarter.imx; elif test "${module_variant}" = "0x04" || test "${module_variant}" = "0x05" || test "${module_variant}" = "0x07"; then setenv INSTALL_UBOOT_FILENAME u-boot-ccimx6ulstarter1GB.imx; From c92392ffdf3441c3518a4b15c06e6573a35b2b1b Mon Sep 17 00:00:00 2001 From: Hector Palacios Date: Wed, 11 Nov 2020 18:24:08 +0100 Subject: [PATCH 27/57] uboot: add script to update firmware through uuu U-Boot v2020.04 for the CC6UL supports the fastboot protocol. Create scripts to install DEY firmware via USB using uuu tool. Signed-off-by: Hector Palacios --- .../ccimx6ulsbc/install_linux_fw_uuu.sh | 170 ++++++++++++++++++ .../ccimx6ulstarter/install_linux_fw_uuu.sh | 170 ++++++++++++++++++ 2 files changed, 340 insertions(+) create mode 100755 meta-digi-arm/recipes-bsp/u-boot/u-boot-dey/ccimx6ulsbc/install_linux_fw_uuu.sh create mode 100755 meta-digi-arm/recipes-bsp/u-boot/u-boot-dey/ccimx6ulstarter/install_linux_fw_uuu.sh diff --git a/meta-digi-arm/recipes-bsp/u-boot/u-boot-dey/ccimx6ulsbc/install_linux_fw_uuu.sh b/meta-digi-arm/recipes-bsp/u-boot/u-boot-dey/ccimx6ulsbc/install_linux_fw_uuu.sh new file mode 100755 index 000000000..36f1f37d8 --- /dev/null +++ b/meta-digi-arm/recipes-bsp/u-boot/u-boot-dey/ccimx6ulsbc/install_linux_fw_uuu.sh @@ -0,0 +1,170 @@ +#!/bin/sh +#=============================================================================== +# +# Copyright (C) 2020 by Digi International Inc. +# All rights reserved. +# +# This program is free software; you can redistribute it and/or modify it +# under the terms of the GNU General Public License version 2 as published by +# the Free Software Foundation. +# +# +# Description: +# Script to flash Yocto build artifacts over USB to the target. +#=============================================================================== +# set -x +clear + +# Parse uuu cmd output +getenv() +{ + uuu -v fb: ucmd printenv "${1}" | sed -ne "s,^${1}=,,g;T;p" +} + +# Update a NAND partition +# Params: +# 1. partition +# 2. file +# 3. timeout (in ms) +# Description: +# - downloads image to RAM +# - runs 'update' command from RAM +nand_update() +{ + echo "\033[36m" + echo "=====================================================================================" + echo "Updating '${1}' partition with file: ${2}" + echo "=====================================================================================" + echo "\033[0m" + + uuu fb: download -f "${2}" + uuu "fb[-t ${3}]:" ucmd update "${1}" ram \${fastboot_buffer} \${fastboot_bytes} +} + +# +# U-Boot script for installing Linux images created by Yocto into the NAND +# +echo "############################################################" +echo "# Linux firmware install through USB OTG #" +echo "############################################################" +echo "" +echo " This process will erase your NAND and will install a new" +echo " U-Boot and Linux firmware images on the NAND." +echo "" +echo " Press CTRL+C now if you wish to abort or wait 10 seconds" +echo " to continue." + +sleep 10 + +# Enable the redirect support to get u-boot variables values +uuu fb: ucmd setenv stdout serial,fastboot + +# Get U-Boot file name from cmdline when passed +if [ -n "$1" ]; then + INSTALL_UBOOT_FILENAME="$1" +else + module_variant=$(getenv "module_variant") + # Determine U-Boot file to program basing on SOM's variant + if [ -n "$module_variant" ]; then + if [ "$module_variant" = "0x08" ] || \ + [ "$module_variant" = "0x09" ]; then + INSTALL_UBOOT_FILENAME="u-boot-ccimx6ulsbc512MB.imx" + elif [ "$module_variant" = "0x04" ] || \ + [ "$module_variant" = "0x05" ] || \ + [ "$module_variant" = "0x07" ]; then + INSTALL_UBOOT_FILENAME="u-boot-ccimx6ulsbc1GB.imx" + else + INSTALL_UBOOT_FILENAME="u-boot-ccimx6ulsbc.imx" + fi + fi +fi + +# remove redirect +uuu fb: ucmd setenv stdout serial + +# u-boot when the checked value is empty. +if [ -n "${INSTALL_UBOOT_FILENAME}" ]; then + true +else + echo "" + echo "[ERROR] Cannot determine U-Boot file for this module!" + echo "" + echo "1. Add U-boot file name, depending on your ConnectCore 8X variant, to script command line:" + echo " - For a SOM with 1GB DDR3, run:" + echo " => ./install_linux_fs_uuu.sh u-boot-ccimx6ulsbc1GB.imx" + echo " - For a SOM with 512MB DDR3, run:" + echo " => ./install_linux_fs_uuu.sh u-boot-ccimx6ulsbc512MB.imx" + echo " - For a SOM with 256MB DDR3, run:" + echo " => ./install_linux_fs_uuu.sh u-boot-ccimx6ulsbc.imx" + echo "" + echo "2. Run the install script again." + echo "" + echo "Aborted" + echo "" + exit +fi + +# Set fastboot buffer address to $loadaddr, just in case +uuu fb: ucmd setenv fastboot_buffer \${loadaddr} + +# Skip user confirmation for U-Boot update +uuu fb: ucmd setenv forced_update 1 + +# Update U-Boot +nand_update "uboot" "${INSTALL_UBOOT_FILENAME}" 5000 + +# Set 'bootcmd' for the second part of the script that will +# - Reset environment to defaults +# - Save the environment +# - Update the 'linux' partition +# - Update the 'recovery' partition +# - Update the 'rootfs' partition +uuu fb: ucmd setenv bootcmd " + env default -a; + saveenv; + echo \"\"; + echo \"\"; + echo \">> Installing Linux firmware\"; + echo \"\"; + echo \"\"; + fastboot 0; +" + +uuu fb: ucmd saveenv +uuu fb: acmd reset + +INSTALL_LINUX_FILENAME="dey-image-qt-##GRAPHICAL_BACKEND##-ccimx6ulsbc.boot.ubifs" +INSTALL_RECOVERY_FILENAME="dey-image-qt-##GRAPHICAL_BACKEND##-ccimx6ulsbc.recovery.ubifs" +INSTALL_ROOTFS_FILENAME="dey-image-qt-##GRAPHICAL_BACKEND##-ccimx6ulsbc.ubifs" + +# Wait for the target to reset +sleep 3 + +# Set fastboot buffer address to $loadaddr +uuu fb: ucmd setenv fastboot_buffer \${loadaddr} + +# Update Linux +nand_update "linux" "${INSTALL_LINUX_FILENAME}" 15000 + +# Update Recovery +nand_update "recovery" "${INSTALL_RECOVERY_FILENAME}" 15000 + +# Update Rootfs +nand_update "rootfs" "${INSTALL_ROOTFS_FILENAME}" 90000 + +# Configure u-boot to boot into recovery mode +uuu fb: ucmd setenv boot_recovery yes +uuu fb: ucmd setenv recovery_command wipe_update + +uuu fb: ucmd saveenv + +# Reset the target +uuu fb: acmd reset + +echo "\033[32m" +echo "=============================================================" +echo "Done! Wait for the target to complete first boot process." +echo "=============================================================" +echo "\033[0m" + +exit diff --git a/meta-digi-arm/recipes-bsp/u-boot/u-boot-dey/ccimx6ulstarter/install_linux_fw_uuu.sh b/meta-digi-arm/recipes-bsp/u-boot/u-boot-dey/ccimx6ulstarter/install_linux_fw_uuu.sh new file mode 100755 index 000000000..afa42cf22 --- /dev/null +++ b/meta-digi-arm/recipes-bsp/u-boot/u-boot-dey/ccimx6ulstarter/install_linux_fw_uuu.sh @@ -0,0 +1,170 @@ +#!/bin/sh +#=============================================================================== +# +# Copyright (C) 2020 by Digi International Inc. +# All rights reserved. +# +# This program is free software; you can redistribute it and/or modify it +# under the terms of the GNU General Public License version 2 as published by +# the Free Software Foundation. +# +# +# Description: +# Script to flash Yocto build artifacts over USB to the target. +#=============================================================================== +# set -x +clear + +# Parse uuu cmd output +getenv() +{ + uuu -v fb: ucmd printenv "${1}" | sed -ne "s,^${1}=,,g;T;p" +} + +# Update a NAND partition +# Params: +# 1. partition +# 2. file +# 3. timeout (in ms) +# Description: +# - downloads image to RAM +# - runs 'update' command from RAM +nand_update() +{ + echo "\033[36m" + echo "=====================================================================================" + echo "Updating '${1}' partition with file: ${2}" + echo "=====================================================================================" + echo "\033[0m" + + uuu fb: download -f "${2}" + uuu "fb[-t ${3}]:" ucmd update "${1}" ram \${fastboot_buffer} \${fastboot_bytes} +} + +# +# U-Boot script for installing Linux images created by Yocto into the NAND +# +echo "############################################################" +echo "# Linux firmware install through USB OTG #" +echo "############################################################" +echo "" +echo " This process will erase your NAND and will install a new" +echo " U-Boot and Linux firmware images on the NAND." +echo "" +echo " Press CTRL+C now if you wish to abort or wait 10 seconds" +echo " to continue." + +sleep 10 + +# Enable the redirect support to get u-boot variables values +uuu fb: ucmd setenv stdout serial,fastboot + +# Get U-Boot file name from cmdline when passed +if [ -n "$1" ]; then + INSTALL_UBOOT_FILENAME="$1" +else + module_variant=$(getenv "module_variant") + # Determine U-Boot file to program basing on SOM's variant + if [ -n "$module_variant" ]; then + if [ "$module_variant" = "0x08" ] || \ + [ "$module_variant" = "0x09" ]; then + INSTALL_UBOOT_FILENAME="u-boot-ccimx6ulstarter512MB.imx" + elif [ "$module_variant" = "0x04" ] || \ + [ "$module_variant" = "0x05" ] || \ + [ "$module_variant" = "0x07" ]; then + INSTALL_UBOOT_FILENAME="u-boot-ccimx6ulstarter1GB.imx" + else + INSTALL_UBOOT_FILENAME="u-boot-ccimx6ulstarter.imx" + fi + fi +fi + +# remove redirect +uuu fb: ucmd setenv stdout serial + +# u-boot when the checked value is empty. +if [ -n "${INSTALL_UBOOT_FILENAME}" ]; then + true +else + echo "" + echo "[ERROR] Cannot determine U-Boot file for this module!" + echo "" + echo "1. Add U-boot file name, depending on your ConnectCore 8X variant, to script command line:" + echo " - For a SOM with 1GB DDR3, run:" + echo " => ./install_linux_fs_uuu.sh u-boot-ccimx6ulstarter1GB.imx" + echo " - For a SOM with 512MB DDR3, run:" + echo " => ./install_linux_fs_uuu.sh u-boot-ccimx6ulstarter512MB.imx" + echo " - For a SOM with 256MB DDR3, run:" + echo " => ./install_linux_fs_uuu.sh u-boot-ccimx6ulstarter.imx" + echo "" + echo "2. Run the install script again." + echo "" + echo "Aborted" + echo "" + exit +fi + +# Set fastboot buffer address to $loadaddr, just in case +uuu fb: ucmd setenv fastboot_buffer \${loadaddr} + +# Skip user confirmation for U-Boot update +uuu fb: ucmd setenv forced_update 1 + +# Update U-Boot +nand_update "uboot" "${INSTALL_UBOOT_FILENAME}" 5000 + +# Set 'bootcmd' for the second part of the script that will +# - Reset environment to defaults +# - Save the environment +# - Update the 'linux' partition +# - Update the 'recovery' partition +# - Update the 'rootfs' partition +uuu fb: ucmd setenv bootcmd " + env default -a; + saveenv; + echo \"\"; + echo \"\"; + echo \">> Installing Linux firmware\"; + echo \"\"; + echo \"\"; + fastboot 0; +" + +uuu fb: ucmd saveenv +uuu fb: acmd reset + +INSTALL_LINUX_FILENAME="dey-image-qt-##GRAPHICAL_BACKEND##-ccimx6ulstarter.boot.ubifs" +INSTALL_RECOVERY_FILENAME="dey-image-qt-##GRAPHICAL_BACKEND##-ccimx6ulstarter.recovery.ubifs" +INSTALL_ROOTFS_FILENAME="dey-image-qt-##GRAPHICAL_BACKEND##-ccimx6ulstarter.ubifs" + +# Wait for the target to reset +sleep 3 + +# Set fastboot buffer address to $loadaddr +uuu fb: ucmd setenv fastboot_buffer \${loadaddr} + +# Update Linux +nand_update "linux" "${INSTALL_LINUX_FILENAME}" 15000 + +# Update Recovery +nand_update "recovery" "${INSTALL_RECOVERY_FILENAME}" 15000 + +# Update Rootfs +nand_update "rootfs" "${INSTALL_ROOTFS_FILENAME}" 90000 + +# Configure u-boot to boot into recovery mode +uuu fb: ucmd setenv boot_recovery yes +uuu fb: ucmd setenv recovery_command wipe_update + +uuu fb: ucmd saveenv + +# Reset the target +uuu fb: acmd reset + +echo "\033[32m" +echo "=============================================================" +echo "Done! Wait for the target to complete first boot process." +echo "=============================================================" +echo "\033[0m" + +exit From d30eddd3264bc568d5ab00c0243b42bb90aa0258 Mon Sep 17 00:00:00 2001 From: Hector Palacios Date: Thu, 12 Nov 2020 09:38:43 +0100 Subject: [PATCH 28/57] ccimx6ul: enable UBOOT_HAS_FASTBOOT This allows the generation of the uuu install script artifact. Signed-off-by: Hector Palacios --- meta-digi-arm/conf/machine/include/ccimx6ul.inc | 1 + 1 file changed, 1 insertion(+) diff --git a/meta-digi-arm/conf/machine/include/ccimx6ul.inc b/meta-digi-arm/conf/machine/include/ccimx6ul.inc index a37402b49..265d22248 100644 --- a/meta-digi-arm/conf/machine/include/ccimx6ul.inc +++ b/meta-digi-arm/conf/machine/include/ccimx6ul.inc @@ -11,6 +11,7 @@ include conf/machine/include/tune-cortexa7.inc # Platform u-boot settings UBOOT_PREFIX = "u-boot" UBOOT_SUFFIX = "imx" +UBOOT_HAS_FASTBOOT = "true" STORAGE_MEDIA = "mtd" From dc663aa743caa2ce3412e2fd981e2b6bd43d3d67 Mon Sep 17 00:00:00 2001 From: Hector Palacios Date: Thu, 12 Nov 2020 09:39:36 +0100 Subject: [PATCH 29/57] uboot: v2020.04 is now supported for ccimx8m and ccimx6ul Signed-off-by: Hector Palacios --- meta-digi-arm/recipes-bsp/u-boot/u-boot-dey_2020.04.bb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/meta-digi-arm/recipes-bsp/u-boot/u-boot-dey_2020.04.bb b/meta-digi-arm/recipes-bsp/u-boot/u-boot-dey_2020.04.bb index 1d522300e..0f9f094b9 100644 --- a/meta-digi-arm/recipes-bsp/u-boot/u-boot-dey_2020.04.bb +++ b/meta-digi-arm/recipes-bsp/u-boot/u-boot-dey_2020.04.bb @@ -8,4 +8,4 @@ DEPENDS += "flex-native bison-native" SRCBRANCH = "v2020.04/master" SRCREV = "${AUTOREV}" -COMPATIBLE_MACHINE = "(ccimx8x)" +COMPATIBLE_MACHINE = "(ccimx8x|ccimx8m|ccimx6ul)" From 376f6dadf2f67b6430f0e8acf064d13596724a3a Mon Sep 17 00:00:00 2001 From: Hector Bujanda Date: Tue, 17 Nov 2020 10:05:33 +0100 Subject: [PATCH 30/57] ccimx8x/mn: add dt overlays for the user LEDs https://jira.digi.com/browse/DEL-7254 Signed-off-by: Hector Bujanda --- meta-digi-arm/conf/machine/ccimx8mn-dvk.conf | 1 + meta-digi-arm/conf/machine/ccimx8x-sbc-pro.conf | 1 + 2 files changed, 2 insertions(+) diff --git a/meta-digi-arm/conf/machine/ccimx8mn-dvk.conf b/meta-digi-arm/conf/machine/ccimx8mn-dvk.conf index 966cee45a..28ddaff9f 100644 --- a/meta-digi-arm/conf/machine/ccimx8mn-dvk.conf +++ b/meta-digi-arm/conf/machine/ccimx8mn-dvk.conf @@ -17,6 +17,7 @@ UBOOT_DTB_NAME = "ccimx8mn-dvk.dtb" KERNEL_DEVICETREE ?= " \ digi/ccimx8mn-dvk.dtb \ digi/_ov_board_lvds_ccimx8mn-dvk.dtbo \ + digi/_ov_board_user-leds_ccimx8mn-dvk.dtbo \ digi/_ov_board_v1-v2_ccimx8mn-dvk.dtbo \ digi/_ov_som_bt_ccimx8mn.dtbo \ digi/_ov_som_mca-keypad_ccimx8mn.dtbo \ diff --git a/meta-digi-arm/conf/machine/ccimx8x-sbc-pro.conf b/meta-digi-arm/conf/machine/ccimx8x-sbc-pro.conf index 3fb369cdc..1b3b86f98 100644 --- a/meta-digi-arm/conf/machine/ccimx8x-sbc-pro.conf +++ b/meta-digi-arm/conf/machine/ccimx8x-sbc-pro.conf @@ -21,6 +21,7 @@ KERNEL_DEVICETREE ?= " \ digi/_ov_board_lvds1_ccimx8x-sbc-pro.dtbo \ digi/_ov_board_parallel-camera_ccimx8x-sbc-pro.dtbo \ digi/_ov_board_pcie-card_ccimx8x-sbc-pro.dtbo \ + digi/_ov_board_user-leds_ccimx8x-sbc-pro.dtbo \ digi/_ov_board_v1-v3_ccimx8x-sbc-pro.dtbo \ digi/_ov_som_bt_ccimx8x.dtbo \ digi/_ov_som_mca-keypad_ccimx8x.dtbo \ From fe2b5017f60327a3dff7fee518f1eec85f2a0724 Mon Sep 17 00:00:00 2001 From: Francisco Gil Martinez Date: Fri, 20 Nov 2020 11:43:23 +0100 Subject: [PATCH 31/57] ccimx8x: add dt overlay for pcie modems Signed-off-by: Francisco Gil Martinez --- meta-digi-arm/conf/machine/ccimx8x-sbc-pro.conf | 1 + 1 file changed, 1 insertion(+) diff --git a/meta-digi-arm/conf/machine/ccimx8x-sbc-pro.conf b/meta-digi-arm/conf/machine/ccimx8x-sbc-pro.conf index 1b3b86f98..62df43636 100644 --- a/meta-digi-arm/conf/machine/ccimx8x-sbc-pro.conf +++ b/meta-digi-arm/conf/machine/ccimx8x-sbc-pro.conf @@ -21,6 +21,7 @@ KERNEL_DEVICETREE ?= " \ digi/_ov_board_lvds1_ccimx8x-sbc-pro.dtbo \ digi/_ov_board_parallel-camera_ccimx8x-sbc-pro.dtbo \ digi/_ov_board_pcie-card_ccimx8x-sbc-pro.dtbo \ + digi/_ov_board_pcie-modem_ccimx8x-sbc-pro.dtbo \ digi/_ov_board_user-leds_ccimx8x-sbc-pro.dtbo \ digi/_ov_board_v1-v3_ccimx8x-sbc-pro.dtbo \ digi/_ov_som_bt_ccimx8x.dtbo \ From 65d184cac386b4a97cdc88428413f00f66abc6e3 Mon Sep 17 00:00:00 2001 From: Hector Bujanda Date: Fri, 20 Nov 2020 16:18:47 +0100 Subject: [PATCH 32/57] busybox: standby: ccimx8x/mn: configure power LED for blinking in standby configure power LED for blinking in standby configure power LED solid on after resume https://jira.digi.com/browse/DEL-7330 Signed-off-by: Hector Bujanda --- .../busybox/busybox/ccimx8mn/standby-actions | 19 +++++++++++++++++++ .../busybox/busybox/ccimx8x/standby-actions | 19 +++++++++++++++++++ 2 files changed, 38 insertions(+) diff --git a/meta-digi-dey/recipes-core/busybox/busybox/ccimx8mn/standby-actions b/meta-digi-dey/recipes-core/busybox/busybox/ccimx8mn/standby-actions index c6bf84654..8d564dc37 100644 --- a/meta-digi-dey/recipes-core/busybox/busybox/ccimx8mn/standby-actions +++ b/meta-digi-dey/recipes-core/busybox/busybox/ccimx8mn/standby-actions @@ -36,6 +36,17 @@ if [ "${1}" == "pre" ]; then systemctl stop bluetooth systemctl stop bluetooth-init fi + + # Configure Power LED for blinking in standby + if [ -d "/sys/class/leds/power:green" ]; then + # Configure LED for blinking + echo timer > /sys/class/leds/power\:green/trigger + # Turn LED on at max brightness + echo 19 > /sys/class/leds/power\:green/brightness + # Configure blinking timings + echo 100 > /sys/class/leds/power\:green/delay_on + echo 1000 > /sys/class/leds/power\:green/delay_off + fi elif [ "${1}" == "post" ]; then # Resume wireless interfaces if [ -d "/proc/device-tree/wireless" ]; then @@ -61,4 +72,12 @@ elif [ "${1}" == "post" ]; then rm -f /tmp/up_bt_on_resume fi fi + + # Configure Power LED solid on after resume + if [ -d "/sys/class/leds/power:green" ]; then + # Reset LED settings by writing 0 to brigtness descriptor + echo 0 > /sys/class/leds/power\:green/brightness + # Turn LED on at max brightness + echo 19 > /sys/class/leds/power\:green/brightness + fi fi diff --git a/meta-digi-dey/recipes-core/busybox/busybox/ccimx8x/standby-actions b/meta-digi-dey/recipes-core/busybox/busybox/ccimx8x/standby-actions index 3d3a4a85d..f3ba254c9 100644 --- a/meta-digi-dey/recipes-core/busybox/busybox/ccimx8x/standby-actions +++ b/meta-digi-dey/recipes-core/busybox/busybox/ccimx8x/standby-actions @@ -36,6 +36,17 @@ if [ "${1}" == "pre" ]; then systemctl stop bluetooth systemctl stop bluetooth-init fi + + # Configure Power LED for blinking in standby + if [ -d "/sys/class/leds/power:green" ]; then + # Configure LED for blinking + echo timer > /sys/class/leds/power\:green/trigger + # Turn LED on at max brightness + echo 19 > /sys/class/leds/power\:green/brightness + # Configure blinking timings + echo 100 > /sys/class/leds/power\:green/delay_on + echo 1000 > /sys/class/leds/power\:green/delay_off + fi elif [ "${1}" == "post" ]; then # Resume wireless interfaces if [ -d "/proc/device-tree/wireless" ]; then @@ -61,4 +72,12 @@ elif [ "${1}" == "post" ]; then rm -f /tmp/up_bt_on_resume fi fi + + # Configure Power LED solid on after resume + if [ -d "/sys/class/leds/power:green" ]; then + # Reset LED settings by writing 0 to brigtness descriptor + echo 0 > /sys/class/leds/power\:green/brightness + # Turn LED on at max brightness + echo 19 > /sys/class/leds/power\:green/brightness + fi fi From 8b3b8b55167aa20d3450d9c665e036a8fbc14e0b Mon Sep 17 00:00:00 2001 From: Arturo Buzarra Date: Tue, 1 Dec 2020 14:30:51 +0100 Subject: [PATCH 33/57] uboot: add script to update firmware from a USB stick Create scripts to install DEY firmware using a USB stick. https://jira.digi.com/browse/DEL-6802 Signed-off-by: Arturo Buzarra --- .../recipes-bsp/u-boot/digi-u-boot.inc | 4 + .../ccimx6qpsbc/install_linux_fw_usb.txt | 168 +++++++++++++++ .../ccimx6sbc/install_linux_fw_usb.txt | 179 +++++++++++++++ .../ccimx6ulsbc/install_linux_fw_usb.txt | 158 ++++++++++++++ .../ccimx6ulstarter/install_linux_fw_usb.txt | 158 ++++++++++++++ .../ccimx8mn-dvk/install_linux_fw_usb.txt | 143 ++++++++++++ .../install_linux_fw_usb.txt | 200 +++++++++++++++++ .../ccimx8x-sbc-pro/install_linux_fw_usb.txt | 204 ++++++++++++++++++ .../classes/dey-image-installer.bbclass | 3 +- 9 files changed, 1216 insertions(+), 1 deletion(-) create mode 100644 meta-digi-arm/recipes-bsp/u-boot/u-boot-dey/ccimx6qpsbc/install_linux_fw_usb.txt create mode 100644 meta-digi-arm/recipes-bsp/u-boot/u-boot-dey/ccimx6sbc/install_linux_fw_usb.txt create mode 100644 meta-digi-arm/recipes-bsp/u-boot/u-boot-dey/ccimx6ulsbc/install_linux_fw_usb.txt create mode 100644 meta-digi-arm/recipes-bsp/u-boot/u-boot-dey/ccimx6ulstarter/install_linux_fw_usb.txt create mode 100644 meta-digi-arm/recipes-bsp/u-boot/u-boot-dey/ccimx8mn-dvk/install_linux_fw_usb.txt create mode 100644 meta-digi-arm/recipes-bsp/u-boot/u-boot-dey/ccimx8x-sbc-express/install_linux_fw_usb.txt create mode 100644 meta-digi-arm/recipes-bsp/u-boot/u-boot-dey/ccimx8x-sbc-pro/install_linux_fw_usb.txt diff --git a/meta-digi-arm/recipes-bsp/u-boot/digi-u-boot.inc b/meta-digi-arm/recipes-bsp/u-boot/digi-u-boot.inc index 922d34d2d..5f459663d 100644 --- a/meta-digi-arm/recipes-bsp/u-boot/digi-u-boot.inc +++ b/meta-digi-arm/recipes-bsp/u-boot/digi-u-boot.inc @@ -24,6 +24,7 @@ SRC_URI = " \ SRC_URI_append = " \ file://boot.txt \ file://install_linux_fw_sd.txt \ + file://install_linux_fw_usb.txt \ ${@oe.utils.conditional('UBOOT_HAS_FASTBOOT', 'true', 'file://install_linux_fw_uuu.sh', '', d)} \ " @@ -152,6 +153,9 @@ do_deploy_append() { sed -i -e 's,##GRAPHICAL_BACKEND##,${GRAPHICAL_BACKEND},g' ${WORKDIR}/install_linux_fw_sd.txt mkimage -T script -n "DEY firmware install script" -C none -d ${WORKDIR}/install_linux_fw_sd.txt ${DEPLOYDIR}/install_linux_fw_sd.scr + sed -i -e 's,##GRAPHICAL_BACKEND##,${GRAPHICAL_BACKEND},g' ${WORKDIR}/install_linux_fw_usb.txt + mkimage -T script -n "DEY firmware install script" -C none -d ${WORKDIR}/install_linux_fw_usb.txt ${DEPLOYDIR}/install_linux_fw_usb.scr + if [ "${@oe.utils.conditional('UBOOT_HAS_FASTBOOT', 'true', 'true', '', d)}" = "true" ]; then # DEY firmware install uuu script sed -i -e 's,##GRAPHICAL_BACKEND##,${GRAPHICAL_BACKEND},g' ${WORKDIR}/install_linux_fw_uuu.sh diff --git a/meta-digi-arm/recipes-bsp/u-boot/u-boot-dey/ccimx6qpsbc/install_linux_fw_usb.txt b/meta-digi-arm/recipes-bsp/u-boot/u-boot-dey/ccimx6qpsbc/install_linux_fw_usb.txt new file mode 100644 index 000000000..a1bae7f76 --- /dev/null +++ b/meta-digi-arm/recipes-bsp/u-boot/u-boot-dey/ccimx6qpsbc/install_linux_fw_usb.txt @@ -0,0 +1,168 @@ +# +# U-Boot script for installing Linux images created by Yocto from a USB stick +# into the eMMC +# + +echo "#######################################################" +echo "# Linux firmware install from USB #" +echo "#######################################################" +echo "" +echo " This process will erase your eMMC and will install a new" +echo " U-Boot and Linux firmware images on the eMMC." +echo "" +echo " Press CTRL+C now if you wish to abort or wait 10 seconds" +echo " to continue." + +sleep 10 +if test $? -eq 1; then + echo "Aborted by user."; + exit; +fi + +# Determine U-Boot file to program basing on module variant +if test -n "${module_variant}"; then + if test "${module_variant}" = "0x01" || test "${module_variant}" = "0x02"; then + setenv INSTALL_UBOOT_FILENAME u-boot-ccimx6qpsbc2GB.imx; + elif test "${module_variant}" = "0x03"; then + setenv INSTALL_UBOOT_FILENAME u-boot-ccimx6qpsbc1GB.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 6 QuadPlus variant:"; + echo " - For a QuadPlus CPU with 2GB DDR3, run:"; + echo " => setenv INSTALL_UBOOT_FILENAME u-boot-ccimx6qpsbc2GB.imx"; + echo " - For a DualPlus CPU with 1GB DDR3, run:"; + echo " => setenv INSTALL_UBOOT_FILENAME u-boot-ccimx6qpsbc1GB.imx"; + echo ""; + echo ""; + echo "2. Run the install script again."; + echo ""; + echo "Aborted"; + echo ""; + exit; +fi; + +setenv INSTALL_USBDEV 0 +setenv INSTALL_LINUX_FILENAME dey-image-qt-##GRAPHICAL_BACKEND##-ccimx6qpsbc.boot.vfat +setenv INSTALL_RECOVERY_FILENAME dey-image-qt-##GRAPHICAL_BACKEND##-ccimx6qpsbc.recovery.vfat +setenv INSTALL_ROOTFS_FILENAME dey-image-qt-##GRAPHICAL_BACKEND##-ccimx6qpsbc.ext4 + +# Check for presence of firmware files on the USB +for install_f in ${INSTALL_UBOOT_FILENAME} ${INSTALL_LINUX_FILENAME} ${INSTALL_RECOVERY_FILENAME} ${INSTALL_ROOTFS_FILENAME}; do + if test ! -e usb ${INSTALL_USBDEV} ${install_f}; then + echo "ERROR: Could not find file ${install_f}"; + install_abort=1; + fi; +done +if test -n "${install_abort}"; then + echo "Aborted."; + exit; +fi + +# Skip user confirmation for U-Boot update +setenv forced_update 1 + +# Set bootdelay to zero so that firmware update is run immediately after +# the first reset. +setenv bootdelay 0 + +# Set target MMC device index to eMMC +setenv mmcdev 0 + +# Update U-Boot +echo "" +echo "" +echo ">> Installing U-Boot boot loader (target will reset)" +echo "" +echo "" +update uboot usb ${INSTALL_USBDEV} fat ${INSTALL_UBOOT_FILENAME} +if test $? -eq 1; then + echo "[ERROR] Failed to update U-Boot boot loader!"; + echo ""; + echo "Aborted."; + exit; +fi + +# Set 'bootcmd' to the second part of the script that will +# - Reset environment to defaults +# - Save the environment +# - Partition the eMMC user data area for Linux +# - Update the 'linux' partition +# - Update the 'recovery' partition +# - Update the 'rootfs' partition +# - Configure recovery to wipe 'update' partition +# - Run 'recovery' and let the system boot after +setenv bootcmd " + env default -a; + saveenv; + echo \"\"; + echo \"\"; + echo \">> Creating Linux partition table on the eMMC\"; + echo \"\"; + echo \"\"; + run partition_mmc_linux; + if test \$? -eq 1; then + echo \"[ERROR] Failed to create Linux partition table!\"; + echo \"\"; + echo \"Aborted.\"; + exit; + fi; + usb start; + echo \"\"; + echo \"\"; + echo \">> Installing Linux kernel and device tree files\"; + echo \"\"; + echo \"\"; + update linux usb ${INSTALL_USBDEV} fat ${INSTALL_LINUX_FILENAME}; + if test \$? -eq 1; then + echo \"[ERROR] Failed to update linux partition!\"; + echo \"\"; + echo \"Aborted.\"; + exit; + fi; + echo \"\"; + echo \"\"; + echo \">> Installing recovery\"; + echo \"\"; + echo \"\"; + update recovery usb ${INSTALL_USBDEV} fat ${INSTALL_RECOVERY_FILENAME}; + if test \$? -eq 1; then + echo \"[ERROR] Failed to update recovery partition!\"; + echo \"\"; + echo \"Aborted.\"; + exit; + fi; + echo \"\"; + echo \"\"; + echo \">> Installing Linux root file system\"; + echo \"\"; + echo \"\"; + update rootfs usb ${INSTALL_USBDEV} fat ${INSTALL_ROOTFS_FILENAME}; + if test \$? -eq 1; then + echo \"[ERROR] Failed to update rootfs partition!\"; + echo \"\"; + echo \"Aborted.\"; + exit; + fi; + echo \"\"; + setenv boot_recovery yes; + setenv recovery_command wipe_update; + saveenv; + echo \"\"; + echo \"\"; + echo \">> Firmware installation complete. Rebooting into recovery mode for final deployment.\"; + echo \"\"; + echo \"\"; + sleep 1; + reset; +" + +saveenv +reset diff --git a/meta-digi-arm/recipes-bsp/u-boot/u-boot-dey/ccimx6sbc/install_linux_fw_usb.txt b/meta-digi-arm/recipes-bsp/u-boot/u-boot-dey/ccimx6sbc/install_linux_fw_usb.txt new file mode 100644 index 000000000..50a814be8 --- /dev/null +++ b/meta-digi-arm/recipes-bsp/u-boot/u-boot-dey/ccimx6sbc/install_linux_fw_usb.txt @@ -0,0 +1,179 @@ +# +# U-Boot script for installing Linux images created by Yocto from a USB stick +# into the eMMC +# + +echo "#######################################################" +echo "# Linux firmware install from USB #" +echo "#######################################################" +echo "" +echo " This process will erase your eMMC and will install a new" +echo " U-Boot and Linux firmware images on the eMMC." +echo "" +echo " Press CTRL+C now if you wish to abort or wait 10 seconds" +echo " to continue." + +sleep 10 +if test $? -eq 1; then + echo "Aborted by user."; + exit; +fi + +# Determine U-Boot file to program basing on module variant +if test -n "${module_variant}"; then + if test "${module_variant}" = "0x12"; then + setenv INSTALL_UBOOT_FILENAME u-boot-ccimx6qsbc2GB.imx; + elif test "${module_variant}" = "0x02" || test "${module_variant}" = "0x04" || test "${module_variant}" = "0x05" || test "${module_variant}" = "0x11" || test "${module_variant}" = "0x14"; then + setenv INSTALL_UBOOT_FILENAME u-boot-ccimx6qsbc.imx; + elif test "${module_variant}" = "0x03" || test "${module_variant}" = "0x0e" || test "${module_variant}" = "0x0f"; then + setenv INSTALL_UBOOT_FILENAME u-boot-ccimx6qsbc512MB.imx; + elif test "${module_variant}" = "0x0b" || test "${module_variant}" = "0x15"; then + setenv INSTALL_UBOOT_FILENAME u-boot-ccimx6dlsbc.imx; + elif test "${module_variant}" = "0x0c" || test "${module_variant}" = "0x13"; then + setenv INSTALL_UBOOT_FILENAME u-boot-ccimx6dlsbc512MB.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 6 variant:"; + echo " - For a Quad/Dual CPU with 2GB DDR3, run:"; + echo " => setenv INSTALL_UBOOT_FILENAME u-boot-ccimx6qsbc2GB.imx"; + echo " - For a Quad/Dual CPU with 1GB DDR3, run:"; + echo " => setenv INSTALL_UBOOT_FILENAME u-boot-ccimx6qsbc.imx"; + echo " - For a Quad/Dual CPU with 512MB DDR3, run:"; + echo " => setenv INSTALL_UBOOT_FILENAME u-boot-ccimx6qsbc512MB.imx"; + echo " - For a DualLite/Solo CPU with 1GB DDR3, run:"; + echo " => setenv INSTALL_UBOOT_FILENAME u-boot-ccimx6dlsbc.imx"; + echo " - For a DualLite/Solo CPU with 512MB DDR3, run:"; + echo " => setenv INSTALL_UBOOT_FILENAME u-boot-ccimx6dlsbc512MB.imx"; + echo ""; + echo "2. Run the install script again."; + echo ""; + echo "Aborted"; + echo ""; + exit; +fi; + +setenv INSTALL_USBDEV 0 +setenv INSTALL_LINUX_FILENAME dey-image-qt-##GRAPHICAL_BACKEND##-ccimx6sbc.boot.vfat +setenv INSTALL_RECOVERY_FILENAME dey-image-qt-##GRAPHICAL_BACKEND##-ccimx6sbc.recovery.vfat +setenv INSTALL_ROOTFS_FILENAME dey-image-qt-##GRAPHICAL_BACKEND##-ccimx6sbc.ext4 + +# Check for presence of firmware files on the USB +for install_f in ${INSTALL_UBOOT_FILENAME} ${INSTALL_LINUX_FILENAME} ${INSTALL_RECOVERY_FILENAME} ${INSTALL_ROOTFS_FILENAME}; do + if test ! -e usb ${INSTALL_USBDEV} ${install_f}; then + echo "ERROR: Could not find file ${install_f}"; + install_abort=1; + fi; +done +if test -n "${install_abort}"; then + echo "Aborted."; + exit; +fi + +# Skip user confirmation for U-Boot update +setenv forced_update 1 + +# Set bootdelay to zero so that firmware update is run immediately after +# the first reset. +setenv bootdelay 0 + +# Set target MMC device index to eMMC +setenv mmcdev 0 + +# Update U-Boot +echo "" +echo "" +echo ">> Installing U-Boot boot loader (target will reset)" +echo "" +echo "" +update uboot usb ${INSTALL_USBDEV} fat ${INSTALL_UBOOT_FILENAME} +if test $? -eq 1; then + echo "[ERROR] Failed to update U-Boot boot loader!"; + echo ""; + echo "Aborted."; + exit; +fi + +# Set 'bootcmd' to the second part of the script that will +# - Reset environment to defaults +# - Save the environment +# - Partition the eMMC user data area for Linux +# - Update the 'linux' partition +# - Update the 'recovery' partition +# - Update the 'rootfs' partition +# - Configure recovery to wipe 'update' partition +# - Run 'recovery' and let the system boot after +setenv bootcmd " + env default -a; + saveenv; + echo \"\"; + echo \"\"; + echo \">> Creating Linux partition table on the eMMC\"; + echo \"\"; + echo \"\"; + run partition_mmc_linux; + if test \$? -eq 1; then + echo \"[ERROR] Failed to create Linux partition table!\"; + echo \"\"; + echo \"Aborted.\"; + exit; + fi; + usb start; + echo \"\"; + echo \"\"; + echo \">> Installing Linux kernel and device tree files\"; + echo \"\"; + echo \"\"; + update linux usb ${INSTALL_USBDEV} fat ${INSTALL_LINUX_FILENAME}; + if test \$? -eq 1; then + echo \"[ERROR] Failed to update linux partition!\"; + echo \"\"; + echo \"Aborted.\"; + exit; + fi; + echo \"\"; + echo \"\"; + echo \">> Installing recovery\"; + echo \"\"; + echo \"\"; + update recovery usb ${INSTALL_USBDEV} fat ${INSTALL_RECOVERY_FILENAME}; + if test \$? -eq 1; then + echo \"[ERROR] Failed to update recovery partition!\"; + echo \"\"; + echo \"Aborted.\"; + exit; + fi; + echo \"\"; + echo \"\"; + echo \">> Installing Linux root file system\"; + echo \"\"; + echo \"\"; + update rootfs usb ${INSTALL_USBDEV} fat ${INSTALL_ROOTFS_FILENAME}; + if test \$? -eq 1; then + echo \"[ERROR] Failed to update rootfs partition!\"; + echo \"\"; + echo \"Aborted.\"; + exit; + fi; + echo \"\"; + setenv boot_recovery yes; + setenv recovery_command wipe_update; + saveenv; + echo \"\"; + echo \"\"; + echo \">> Firmware installation complete. Rebooting into recovery mode for final deployment.\"; + echo \"\"; + echo \"\"; + sleep 1; + reset; +" + +saveenv +reset diff --git a/meta-digi-arm/recipes-bsp/u-boot/u-boot-dey/ccimx6ulsbc/install_linux_fw_usb.txt b/meta-digi-arm/recipes-bsp/u-boot/u-boot-dey/ccimx6ulsbc/install_linux_fw_usb.txt new file mode 100644 index 000000000..f55c8de92 --- /dev/null +++ b/meta-digi-arm/recipes-bsp/u-boot/u-boot-dey/ccimx6ulsbc/install_linux_fw_usb.txt @@ -0,0 +1,158 @@ +# +# U-Boot script for installing Linux images created by Yocto from a USB stick +# into the NAND +# + +echo "#######################################################" +echo "# Linux firmware install from USB #" +echo "#######################################################" +echo "" +echo " This process will erase your NAND and will install a new" +echo " U-Boot and Linux firmware images on the NAND." +echo "" +echo " Press CTRL+C now if you wish to abort or wait 10 seconds" +echo " to continue." + +sleep 10 +if test $? -eq 1; then + echo "Aborted by user."; + 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" || test "${module_variant}" = "0x06" || test "${module_variant}" = "0x0a"; then + setenv INSTALL_UBOOT_FILENAME u-boot-ccimx6ulsbc.imx; + elif test "${module_variant}" = "0x04" || test "${module_variant}" = "0x05" || test "${module_variant}" = "0x07"; then + setenv INSTALL_UBOOT_FILENAME u-boot-ccimx6ulsbc1GB.imx; + elif test "${module_variant}" = "0x08" || test "${module_variant}" = "0x09"; then + setenv INSTALL_UBOOT_FILENAME u-boot-ccimx6ulsbc512MB.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 512MB DDR3, run:"; + echo " => setenv INSTALL_UBOOT_FILENAME u-boot-ccimx6ulsbc512MB.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_USBDEV 0 +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 + +# Check for presence of firmware files on the USB +for install_f in ${INSTALL_UBOOT_FILENAME} ${INSTALL_LINUX_FILENAME} ${INSTALL_RECOVERY_FILENAME} ${INSTALL_ROOTFS_FILENAME}; do + if test ! -e usb ${INSTALL_USBDEV} ${install_f}; then + echo "ERROR: Could not find file ${install_f}"; + install_abort=1; + fi; +done +if test -n "${install_abort}"; then + echo "Aborted."; + exit; +fi + +# Skip user confirmation for U-Boot update +setenv forced_update 1 + +# Set bootdelay to zero so that firmware update is run immediately after +# the first reset. +setenv bootdelay 0 + +# Update U-Boot +echo "" +echo "" +echo ">> Installing U-Boot boot loader (target will reset)" +echo "" +echo "" +update uboot usb ${INSTALL_USBDEV} fat ${INSTALL_UBOOT_FILENAME} +if test $? -eq 1; then + echo "[ERROR] Failed to update U-Boot boot loader!"; + echo ""; + echo "Aborted."; + exit; +fi + +# Set 'bootcmd' to the second part of the script that will +# - Reset environment to defaults +# - Save the environment +# - Update the 'linux' partition +# - Update the 'recovery' partition +# - Update the 'rootfs' partition +# - Configure recovery to wipe 'update' partition +# - Run 'recovery' and let the system boot after +setenv bootcmd " + env default -a; + saveenv; + usb start; + echo \"\"; + echo \"\"; + echo \">> Installing Linux kernel and device tree files\"; + echo \"\"; + echo \"\"; + nand erase.part linux; + update linux usb ${INSTALL_USBDEV} fat ${INSTALL_LINUX_FILENAME}; + if test \$? -eq 1; then + echo \"[ERROR] Failed to update linux partition!\"; + echo \"\"; + echo \"Aborted.\"; + exit; + fi; + echo \"\"; + echo \"\"; + echo \">> Installing recovery\"; + echo \"\"; + echo \"\"; + nand erase.part recovery; + update recovery usb ${INSTALL_USBDEV} fat ${INSTALL_RECOVERY_FILENAME}; + if test \$? -eq 1; then + echo \"[ERROR] Failed to update recovery partition!\"; + echo \"\"; + echo \"Aborted.\"; + exit; + fi; + echo \"\"; + echo \"\"; + echo \">> Installing Linux root file system\"; + echo \"\"; + echo \"\"; + nand erase.part rootfs; + update rootfs usb ${INSTALL_USBDEV} fat ${INSTALL_ROOTFS_FILENAME}; + if test \$? -eq 1; then + echo \"[ERROR] Failed to update rootfs partition!\"; + echo \"\"; + echo \"Aborted.\"; + exit; + fi; + echo \"\"; + setenv boot_recovery yes; + setenv recovery_command wipe_update; + saveenv; + echo \"\"; + echo \"\"; + echo \">> Firmware installation complete. Rebooting into recovery mode for final deployment.\"; + echo \"\"; + echo \"\"; + sleep 1; + reset; +" + +saveenv +reset diff --git a/meta-digi-arm/recipes-bsp/u-boot/u-boot-dey/ccimx6ulstarter/install_linux_fw_usb.txt b/meta-digi-arm/recipes-bsp/u-boot/u-boot-dey/ccimx6ulstarter/install_linux_fw_usb.txt new file mode 100644 index 000000000..8df1b0a20 --- /dev/null +++ b/meta-digi-arm/recipes-bsp/u-boot/u-boot-dey/ccimx6ulstarter/install_linux_fw_usb.txt @@ -0,0 +1,158 @@ +# +# U-Boot script for installing Linux images created by Yocto from a USB stick +# into the NAND +# + +echo "#######################################################" +echo "# Linux firmware install from USB #" +echo "#######################################################" +echo "" +echo " This process will erase your NAND and will install a new" +echo " U-Boot and Linux firmware images on the NAND." +echo "" +echo " Press CTRL+C now if you wish to abort or wait 10 seconds" +echo " to continue." + +sleep 10 +if test $? -eq 1; then + echo "Aborted by user."; + 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" || test "${module_variant}" = "0x06" || test "${module_variant}" = "0x0a"; then + setenv INSTALL_UBOOT_FILENAME u-boot-ccimx6ulstarter.imx; + elif test "${module_variant}" = "0x04" || test "${module_variant}" = "0x05" || test "${module_variant}" = "0x07"; then + setenv INSTALL_UBOOT_FILENAME u-boot-ccimx6ulstarter1GB.imx; + elif test "${module_variant}" = "0x08" || test "${module_variant}" = "0x09"; then + setenv INSTALL_UBOOT_FILENAME u-boot-ccimx6ulstarter512MB.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 512MB DDR3, run:"; + echo " => setenv INSTALL_UBOOT_FILENAME u-boot-ccimx6ulstarter512MB.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_USBDEV 0 +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 + +# Check for presence of firmware files on the USB +for install_f in ${INSTALL_UBOOT_FILENAME} ${INSTALL_LINUX_FILENAME} ${INSTALL_RECOVERY_FILENAME} ${INSTALL_ROOTFS_FILENAME}; do + if test ! -e mmc ${INSTALL_USBDEV} ${install_f}; then + echo "ERROR: Could not find file ${install_f}"; + install_abort=1; + fi; +done +if test -n "${install_abort}"; then + echo "Aborted."; + exit; +fi + +# Skip user confirmation for U-Boot update +setenv forced_update 1 + +# Set bootdelay to zero so that firmware update is run immediately after +# the first reset. +setenv bootdelay 0 + +# Update U-Boot +echo "" +echo "" +echo ">> Installing U-Boot boot loader (target will reset)" +echo "" +echo "" +update uboot usb ${INSTALL_USBDEV} fat ${INSTALL_UBOOT_FILENAME} +if test $? -eq 1; then + echo "[ERROR] Failed to update U-Boot boot loader!"; + echo ""; + echo "Aborted."; + exit; +fi + +# Set 'bootcmd' to the second part of the script that will +# - Reset environment to defaults +# - Save the environment +# - Update the 'linux' partition +# - Update the 'recovery' partition +# - Update the 'rootfs' partition +# - Configure recovery to wipe 'update' partition +# - Run 'recovery' and let the system boot after +setenv bootcmd " + env default -a; + saveenv; + usb start; + echo \"\"; + echo \"\"; + echo \">> Installing Linux kernel and device tree files\"; + echo \"\"; + echo \"\"; + nand erase.part linux; + update linux usb ${INSTALL_USBDEV} fat ${INSTALL_LINUX_FILENAME}; + if test \$? -eq 1; then + echo \"[ERROR] Failed to update linux partition!\"; + echo \"\"; + echo \"Aborted.\"; + exit; + fi; + echo \"\"; + echo \"\"; + echo \">> Installing recovery\"; + echo \"\"; + echo \"\"; + nand erase.part recovery; + update recovery usb ${INSTALL_USBDEV} fat ${INSTALL_RECOVERY_FILENAME}; + if test \$? -eq 1; then + echo \"[ERROR] Failed to update recovery partition!\"; + echo \"\"; + echo \"Aborted.\"; + exit; + fi; + echo \"\"; + echo \"\"; + echo \">> Installing Linux root file system\"; + echo \"\"; + echo \"\"; + nand erase.part rootfs; + update rootfs usb ${INSTALL_USBDEV} fat ${INSTALL_ROOTFS_FILENAME}; + if test \$? -eq 1; then + echo \"[ERROR] Failed to update rootfs partition!\"; + echo \"\"; + echo \"Aborted.\"; + exit; + fi; + echo \"\"; + setenv boot_recovery yes; + setenv recovery_command wipe_update; + saveenv; + echo \"\"; + echo \"\"; + echo \">> Firmware installation complete. Rebooting into recovery mode for final deployment.\"; + echo \"\"; + echo \"\"; + sleep 1; + reset; +" + +saveenv +reset diff --git a/meta-digi-arm/recipes-bsp/u-boot/u-boot-dey/ccimx8mn-dvk/install_linux_fw_usb.txt b/meta-digi-arm/recipes-bsp/u-boot/u-boot-dey/ccimx8mn-dvk/install_linux_fw_usb.txt new file mode 100644 index 000000000..1bc47ae82 --- /dev/null +++ b/meta-digi-arm/recipes-bsp/u-boot/u-boot-dey/ccimx8mn-dvk/install_linux_fw_usb.txt @@ -0,0 +1,143 @@ +# +# U-Boot script for installing Linux images created by Yocto from a USB stick +# into the eMMC +# + +echo "#######################################################" +echo "# Linux firmware install from USB #" +echo "#######################################################" +echo "" +echo " This process will erase your eMMC and will install a new" +echo " U-Boot and Linux firmware images on the eMMC." +echo "" +echo " Press CTRL+C now if you wish to abort or wait 10 seconds" +echo " to continue." + +sleep 10 +if test $? -eq 1; then + echo "Aborted by user."; + exit; +fi + +setenv INSTALL_UBOOT_FILENAME imx-boot-ccimx8mn-dvk.bin; +setenv INSTALL_USBDEV 0 +setenv INSTALL_LINUX_FILENAME dey-image-qt-##GRAPHICAL_BACKEND##-ccimx8mn-dvk.boot.vfat +setenv INSTALL_RECOVERY_FILENAME dey-image-qt-##GRAPHICAL_BACKEND##-ccimx8mn-dvk.recovery.vfat +setenv INSTALL_ROOTFS_FILENAME dey-image-qt-##GRAPHICAL_BACKEND##-ccimx8mn-dvk.ext4 + +# Check for presence of firmware files on the USB +for install_f in ${INSTALL_UBOOT_FILENAME} ${INSTALL_LINUX_FILENAME} ${INSTALL_RECOVERY_FILENAME} ${INSTALL_ROOTFS_FILENAME}; do + if test ! -e usb ${INSTALL_USBDEV} ${install_f}; then + echo "ERROR: Could not find file ${install_f}"; + install_abort=1; + fi; +done +if test -n "${install_abort}"; then + echo "Aborted."; + exit; +fi + +# Skip user confirmation for U-Boot update +setenv forced_update 1 + +# Set bootdelay to zero so that firmware update is run immediately after +# the first reset. +setenv bootdelay 0 + +# Set target MMC device index to eMMC +setenv mmcdev 0 + +# Update U-Boot +echo "" +echo "" +echo ">> Installing U-Boot boot loader (target will reset)" +echo "" +echo "" +update uboot usb ${INSTALL_USBDEV} fat ${INSTALL_UBOOT_FILENAME} +if test $? -eq 1; then + echo "[ERROR] Failed to update U-Boot boot loader!"; + echo ""; + echo "Aborted."; + exit; +fi + +# Set 'bootcmd' to the second part of the script that will +# - Reset environment to defaults +# - Save the environment +# - Force on-the-fly updates to avoid possible verification errors +# - Partition the eMMC user data area for Linux +# - Update the 'linux' partition +# - Update the 'recovery' partition +# - Update the 'rootfs' partition +# - Configure recovery to wipe 'update' partition +# - Disable on-the-fly updates +# - Run 'recovery' and let the system boot after +setenv bootcmd " + env default -a; + saveenv; + setenv otf-update yes; + echo \"\"; + echo \"\"; + echo \">> Creating Linux partition table on the eMMC\"; + echo \"\"; + echo \"\"; + run partition_mmc_linux; + if test \$? -eq 1; then + echo \"[ERROR] Failed to create Linux partition table!\"; + echo \"\"; + echo \"Aborted.\"; + exit; + fi; + usb start; + echo \"\"; + echo \"\"; + echo \">> Installing Linux kernel and device tree files\"; + echo \"\"; + echo \"\"; + update linux usb ${INSTALL_USBDEV} fat ${INSTALL_LINUX_FILENAME}; + if test \$? -eq 1; then + echo \"[ERROR] Failed to update linux partition!\"; + echo \"\"; + echo \"Aborted.\"; + exit; + fi; + echo \"\"; + echo \"\"; + echo \">> Installing recovery\"; + echo \"\"; + echo \"\"; + update recovery usb ${INSTALL_USBDEV} fat ${INSTALL_RECOVERY_FILENAME}; + if test \$? -eq 1; then + echo \"[ERROR] Failed to update recovery partition!\"; + echo \"\"; + echo \"Aborted.\"; + exit; + fi; + echo \"\"; + echo \"\"; + echo \">> Installing Linux root file system\"; + echo \"\"; + echo \"\"; + update rootfs usb ${INSTALL_USBDEV} fat ${INSTALL_ROOTFS_FILENAME}; + if test \$? -eq 1; then + echo \"[ERROR] Failed to update rootfs partition!\"; + echo \"\"; + echo \"Aborted.\"; + exit; + fi; + echo \"\"; + setenv boot_recovery yes; + setenv recovery_command wipe_update; + setenv otf-update; + saveenv; + echo \"\"; + echo \"\"; + echo \">> Firmware installation complete. Rebooting into recovery mode for final deployment.\"; + echo \"\"; + echo \"\"; + sleep 1; + reset; +" + +saveenv +reset diff --git a/meta-digi-arm/recipes-bsp/u-boot/u-boot-dey/ccimx8x-sbc-express/install_linux_fw_usb.txt b/meta-digi-arm/recipes-bsp/u-boot/u-boot-dey/ccimx8x-sbc-express/install_linux_fw_usb.txt new file mode 100644 index 000000000..06c2d0cdb --- /dev/null +++ b/meta-digi-arm/recipes-bsp/u-boot/u-boot-dey/ccimx8x-sbc-express/install_linux_fw_usb.txt @@ -0,0 +1,200 @@ +# +# U-Boot script for installing Linux images created by Yocto from a USB stick +# into the eMMC +# + +echo "######################################################" +echo "# Linux firmware install from USB #" +echo "######################################################" +echo "" +echo " This process will erase your eMMC and will install a new" +echo " U-Boot and Linux firmware images on the eMMC." +echo "" +echo " Press CTRL+C now if you wish to abort or wait 10 seconds" +echo " to continue." + +sleep 10 +if test $? -eq 1; then + echo "Aborted by user."; + exit; +fi + +# Since SOMs with the B0 SOC might have an older U-Boot that doesn't export the +# SOC revision to the environment, use B0 by default +if test -z "${soc_rev}"; then + setenv soc_rev B0 +fi + +# In case this script is used to update to a newer release whose imx-boot file +# is not recognized by the SECO fw check, bypass it by default. The script has +# the necessary logic to choose the correct imx-boot file for the target's SOC. +setenv skip-uboot-check "yes" + +# Determine U-Boot file to program basing on SOM's RAM size and SOC type (linked to bus width) +bus_width="32bit" +if test -n "${module_ram}" && test -n "${soc_type}"; then + if test "${soc_type}" = "imx8dx"; then + bus_width="16bit" + fi + setenv INSTALL_UBOOT_FILENAME imx-boot-ccimx8x-sbc-express-${soc_rev}-${module_ram}_${bus_width}.bin; +else + # Determine U-Boot file to program basing on SOM's variant + if test -n "${module_variant}"; then + if test "${module_variant}" = "0x01"; then + setenv INSTALL_UBOOT_FILENAME imx-boot-ccimx8x-sbc-express-${soc_rev}-1GB_32bit.bin; + elif test "${module_variant}" = "0x02"; then + setenv INSTALL_UBOOT_FILENAME imx-boot-ccimx8x-sbc-express-${soc_rev}-2GB_32bit.bin; + elif test "${module_variant}" = "0x03"; then + setenv INSTALL_UBOOT_FILENAME imx-boot-ccimx8x-sbc-express-${soc_rev}-2GB_32bit.bin; + elif test "${module_variant}" = "0x04"; then + setenv INSTALL_UBOOT_FILENAME imx-boot-ccimx8x-sbc-express-${soc_rev}-1GB_16bit.bin; + elif test "${module_variant}" = "0x05"; then + setenv INSTALL_UBOOT_FILENAME imx-boot-ccimx8x-sbc-express-${soc_rev}-1GB_16bit.bin; + fi + fi +fi + +# Use 'test -n ...' because 'test -z ...' does not work well on old versions of +# u-boot when the checked value is empty. +if test -n "${INSTALL_UBOOT_FILENAME}"; then + 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 8X variant:"; + echo " - For a QuadXPlus CPU with 1GB LPDDR4, run:"; + echo " => setenv INSTALL_UBOOT_FILENAME imx-boot-ccimx8x-sbc-express-${soc_rev}-1GB_32bit.bin"; + echo " - For a QuadXPlus CPU with 2GB LPDDR4, run:"; + echo " => setenv INSTALL_UBOOT_FILENAME imx-boot-ccimx8x-sbc-express-${soc_rev}-2GB_32bit.bin"; + echo " - For a DualX CPU with 1GB LPDDR4, run:"; + echo " => setenv INSTALL_UBOOT_FILENAME imx-boot-ccimx8x-sbc-express-${soc_rev}-1GB_16bit.bin"; + echo ""; + echo "2. Run the install script again."; + echo ""; + echo "Aborted"; + echo ""; + exit; +fi; + +setenv INSTALL_USBDEV 0 +setenv INSTALL_LINUX_FILENAME dey-image-qt-##GRAPHICAL_BACKEND##-ccimx8x-sbc-express.boot.vfat +setenv INSTALL_RECOVERY_FILENAME dey-image-qt-##GRAPHICAL_BACKEND##-ccimx8x-sbc-express.recovery.vfat +setenv INSTALL_ROOTFS_FILENAME dey-image-qt-##GRAPHICAL_BACKEND##-ccimx8x-sbc-express.ext4 + +# Check for presence of firmware files on the USB +for install_f in ${INSTALL_UBOOT_FILENAME} ${INSTALL_LINUX_FILENAME} ${INSTALL_RECOVERY_FILENAME} ${INSTALL_ROOTFS_FILENAME}; do + if test ! -e mmc ${INSTALL_USBDEV} ${install_f}; then + echo "ERROR: Could not find file ${install_f}"; + install_abort=1; + fi; +done +if test -n "${install_abort}"; then + echo "Aborted."; + exit; +fi + +# Skip user confirmation for U-Boot update +setenv forced_update 1 + +# Set bootdelay to zero so that firmware update is run immediately after +# the first reset. +setenv bootdelay 0 + +# Set target MMC device index to eMMC +setenv mmcdev 0 + +# Update U-Boot +echo "" +echo "" +echo ">> Installing U-Boot boot loader (target will reset)" +echo "" +echo "" +update uboot usb ${INSTALL_USBDEV} fat ${INSTALL_UBOOT_FILENAME} +if test $? -eq 1; then + echo "[ERROR] Failed to update U-Boot boot loader!"; + echo ""; + echo "Aborted."; + exit; +fi + +# Set 'bootcmd' to the second part of the script that will +# - Reset environment to defaults +# - Save the environment +# - Force on-the-fly updates to avoid possible verification errors +# - Partition the eMMC user data area for Linux +# - Update the 'linux' partition +# - Update the 'recovery' partition +# - Update the 'rootfs' partition +# - Configure recovery to wipe 'update' partition +# - Disable on-the-fly updates +# - Run 'recovery' and let the system boot after +setenv bootcmd " + env default -a; + saveenv; + setenv otf-update yes; + echo \"\"; + echo \"\"; + echo \">> Creating Linux partition table on the eMMC\"; + echo \"\"; + echo \"\"; + run partition_mmc_linux; + if test \$? -eq 1; then + echo \"[ERROR] Failed to create Linux partition table!\"; + echo \"\"; + echo \"Aborted.\"; + exit; + fi; + usb start; + echo \"\"; + echo \"\"; + echo \">> Installing Linux kernel and device tree files\"; + echo \"\"; + echo \"\"; + update linux usb ${INSTALL_USBDEV} fat ${INSTALL_LINUX_FILENAME}; + if test \$? -eq 1; then + echo \"[ERROR] Failed to update linux partition!\"; + echo \"\"; + echo \"Aborted.\"; + exit; + fi; + echo \"\"; + echo \"\"; + echo \">> Installing recovery\"; + echo \"\"; + echo \"\"; + update recovery usb ${INSTALL_USBDEV} fat ${INSTALL_RECOVERY_FILENAME}; + if test \$? -eq 1; then + echo \"[ERROR] Failed to update recovery partition!\"; + echo \"\"; + echo \"Aborted.\"; + exit; + fi; + echo \"\"; + echo \"\"; + echo \">> Installing Linux root file system\"; + echo \"\"; + echo \"\"; + update rootfs usb ${INSTALL_USBDEV} fat ${INSTALL_ROOTFS_FILENAME}; + if test \$? -eq 1; then + echo \"[ERROR] Failed to update rootfs partition!\"; + echo \"\"; + echo \"Aborted.\"; + exit; + fi; + echo \"\"; + setenv boot_recovery yes; + setenv recovery_command wipe_update; + setenv otf-update; + saveenv; + echo \"\"; + echo \"\"; + echo \">> Firmware installation complete. Rebooting into recovery mode for final deployment.\"; + echo \"\"; + echo \"\"; + sleep 1; + reset; +" + +saveenv +reset diff --git a/meta-digi-arm/recipes-bsp/u-boot/u-boot-dey/ccimx8x-sbc-pro/install_linux_fw_usb.txt b/meta-digi-arm/recipes-bsp/u-boot/u-boot-dey/ccimx8x-sbc-pro/install_linux_fw_usb.txt new file mode 100644 index 000000000..6ee27817a --- /dev/null +++ b/meta-digi-arm/recipes-bsp/u-boot/u-boot-dey/ccimx8x-sbc-pro/install_linux_fw_usb.txt @@ -0,0 +1,204 @@ +# +# U-Boot script for installing Linux images created by Yocto from a USB stick +# into the eMMC +# + +echo "######################################################" +echo "# Linux firmware install from USB #" +echo "######################################################" +echo "" +echo " This process will erase your eMMC and will install a new" +echo " U-Boot and Linux firmware images on the eMMC." +echo "" +echo " Press CTRL+C now if you wish to abort or wait 10 seconds" +echo " to continue." + +sleep 10 +if test $? -eq 1; then + echo "Aborted by user."; + exit; +fi + +# Since SOMs with the B0 SOC might have an older U-Boot that doesn't export the +# SOC revision to the environment, use B0 by default +if test -z "${soc_rev}"; then + setenv soc_rev B0 +fi + +# In case this script is used to update to a newer release whose imx-boot file +# is not recognized by the SECO fw check, bypass it by default. The script has +# the necessary logic to choose the correct imx-boot file for the target's SOC. +setenv skip-uboot-check "yes" + +# Determine U-Boot file to program basing on SOM's RAM size and SOC type (linked to bus width) +bus_width="32bit" +if test -n "${module_ram}" && test -n "${soc_type}"; then + if test "${soc_type}" = "imx8dx"; then + bus_width="16bit" + fi + setenv INSTALL_UBOOT_FILENAME imx-boot-ccimx8x-sbc-pro-${soc_rev}-${module_ram}_${bus_width}.bin; +else + # Determine U-Boot file to program basing on SOM's variant + if test -n "${module_variant}"; then + if test "${module_variant}" = "0x01"; then + setenv INSTALL_UBOOT_FILENAME imx-boot-ccimx8x-sbc-pro-${soc_rev}-1GB_32bit.bin; + elif test "${module_variant}" = "0x02"; then + setenv INSTALL_UBOOT_FILENAME imx-boot-ccimx8x-sbc-pro-${soc_rev}-2GB_32bit.bin; + elif test "${module_variant}" = "0x03"; then + setenv INSTALL_UBOOT_FILENAME imx-boot-ccimx8x-sbc-pro-${soc_rev}-2GB_32bit.bin; + elif test "${module_variant}" = "0x04"; then + setenv INSTALL_UBOOT_FILENAME imx-boot-ccimx8x-sbc-pro-${soc_rev}-1GB_16bit.bin; + elif test "${module_variant}" = "0x05"; then + setenv INSTALL_UBOOT_FILENAME imx-boot-ccimx8x-sbc-pro-${soc_rev}-1GB_16bit.bin; + elif test "${module_variant}" = "0x06"; then + setenv INSTALL_UBOOT_FILENAME imx-boot-ccimx8x-sbc-pro-${soc_rev}-512MB_16bit.bin; + fi + fi +fi + +# Use 'test -n ...' because 'test -z ...' does not work well on old versions of +# u-boot when the checked value is empty. +if test -n "${INSTALL_UBOOT_FILENAME}"; then + 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 8X variant:"; + echo " - For a QuadXPlus CPU with 1GB LPDDR4, run:"; + echo " => setenv INSTALL_UBOOT_FILENAME imx-boot-ccimx8x-sbc-pro-${soc_rev}-1GB_32bit.bin"; + echo " - For a QuadXPlus CPU with 2GB LPDDR4, run:"; + echo " => setenv INSTALL_UBOOT_FILENAME imx-boot-ccimx8x-sbc-pro-${soc_rev}-2GB_32bit.bin"; + echo " - For a DualX CPU with 1GB LPDDR4, run:"; + echo " => setenv INSTALL_UBOOT_FILENAME imx-boot-ccimx8x-sbc-pro-${soc_rev}-1GB_16bit.bin"; + echo " - For a DualX CPU with 512MB LPDDR4, run:"; + echo " => setenv INSTALL_UBOOT_FILENAME imx-boot-ccimx8x-sbc-pro-${soc_rev}-512MB_16bit.bin"; + echo ""; + echo "2. Run the install script again."; + echo ""; + echo "Aborted"; + echo ""; + exit; +fi; + +setenv INSTALL_USBDEV 0 +setenv INSTALL_LINUX_FILENAME dey-image-qt-##GRAPHICAL_BACKEND##-ccimx8x-sbc-pro.boot.vfat +setenv INSTALL_RECOVERY_FILENAME dey-image-qt-##GRAPHICAL_BACKEND##-ccimx8x-sbc-pro.recovery.vfat +setenv INSTALL_ROOTFS_FILENAME dey-image-qt-##GRAPHICAL_BACKEND##-ccimx8x-sbc-pro.ext4 + +# Check for presence of firmware files on the USB +for install_f in ${INSTALL_UBOOT_FILENAME} ${INSTALL_LINUX_FILENAME} ${INSTALL_RECOVERY_FILENAME} ${INSTALL_ROOTFS_FILENAME}; do + if test ! -e usb ${INSTALL_USBDEV} ${install_f}; then + echo "ERROR: Could not find file ${install_f}"; + install_abort=1; + fi; +done +if test -n "${install_abort}"; then + echo "Aborted."; + exit; +fi + +# Skip user confirmation for U-Boot update +setenv forced_update 1 + +# Set bootdelay to zero so that firmware update is run immediately after +# the first reset. +setenv bootdelay 0 + +# Set target MMC device index to eMMC +setenv mmcdev 0 + +# Update U-Boot +echo "" +echo "" +echo ">> Installing U-Boot boot loader (target will reset)" +echo "" +echo "" +update uboot usb ${INSTALL_USBDEV} fat ${INSTALL_UBOOT_FILENAME} +if test $? -eq 1; then + echo "[ERROR] Failed to update U-Boot boot loader!"; + echo ""; + echo "Aborted."; + exit; +fi + +# Set 'bootcmd' to the second part of the script that will +# - Reset environment to defaults +# - Save the environment +# - Force on-the-fly updates to avoid possible verification errors +# - Partition the eMMC user data area for Linux +# - Update the 'linux' partition +# - Update the 'recovery' partition +# - Update the 'rootfs' partition +# - Configure recovery to wipe 'update' partition +# - Disable on-the-fly updates +# - Run 'recovery' and let the system boot after +setenv bootcmd " + env default -a; + saveenv; + setenv otf-update yes; + echo \"\"; + echo \"\"; + echo \">> Creating Linux partition table on the eMMC\"; + echo \"\"; + echo \"\"; + run partition_mmc_linux; + if test \$? -eq 1; then + echo \"[ERROR] Failed to create Linux partition table!\"; + echo \"\"; + echo \"Aborted.\"; + exit; + fi; + usb start; + echo \"\"; + echo \"\"; + echo \">> Installing Linux kernel and device tree files\"; + echo \"\"; + echo \"\"; + update linux usb ${INSTALL_USBDEV} fat ${INSTALL_LINUX_FILENAME}; + if test \$? -eq 1; then + echo \"[ERROR] Failed to update linux partition!\"; + echo \"\"; + echo \"Aborted.\"; + exit; + fi; + echo \"\"; + echo \"\"; + echo \">> Installing recovery\"; + echo \"\"; + echo \"\"; + update recovery usb ${INSTALL_USBDEV} fat ${INSTALL_RECOVERY_FILENAME}; + if test \$? -eq 1; then + echo \"[ERROR] Failed to update recovery partition!\"; + echo \"\"; + echo \"Aborted.\"; + exit; + fi; + echo \"\"; + echo \"\"; + echo \">> Installing Linux root file system\"; + echo \"\"; + echo \"\"; + update rootfs usb ${INSTALL_USBDEV} fat ${INSTALL_ROOTFS_FILENAME}; + if test \$? -eq 1; then + echo \"[ERROR] Failed to update rootfs partition!\"; + echo \"\"; + echo \"Aborted.\"; + exit; + fi; + echo \"\"; + setenv boot_recovery yes; + setenv recovery_command wipe_update; + setenv otf-update; + saveenv; + echo \"\"; + echo \"\"; + echo \">> Firmware installation complete. Rebooting into recovery mode for final deployment.\"; + echo \"\"; + echo \"\"; + sleep 1; + reset; +" + +saveenv +reset diff --git a/meta-digi-dey/classes/dey-image-installer.bbclass b/meta-digi-dey/classes/dey-image-installer.bbclass index 048b82173..17ad6ed7c 100644 --- a/meta-digi-dey/classes/dey-image-installer.bbclass +++ b/meta-digi-dey/classes/dey-image-installer.bbclass @@ -21,7 +21,8 @@ FSTYPES_WHITELIST = " \ generate_installer_zip () { # Get list of files to pack - INSTALLER_FILELIST="${DEPLOY_DIR_IMAGE}/install_linux_fw_sd.scr" + INSTALLER_FILELIST="${DEPLOY_DIR_IMAGE}/install_linux_fw_sd.scr \ + ${DEPLOY_DIR_IMAGE}/install_linux_fw_usb.scr" # Get UUU installation script if readlink -e "${DEPLOY_DIR_IMAGE}/install_linux_fw_uuu.sh"; then INSTALLER_FILELIST="${INSTALLER_FILELIST} ${DEPLOY_DIR_IMAGE}/install_linux_fw_uuu.sh" From f91cb8d6bd0ec463d1165ab73e895a785c942292 Mon Sep 17 00:00:00 2001 From: Gabriel Valcazar Date: Wed, 9 Dec 2020 16:28:07 +0100 Subject: [PATCH 34/57] Add support for the dey-image-webkit image This image is very similar to dey-image-qt, but it includes the WebKit packagegroup instead of the Qt one. Said packagegroup contains all of the elements needed to run a WebKit-based browser environment in DEY. This image requires the meta-webkit layer, so include it in our default bblayers template. For now, include all WebKit related recipes in a dynamic layer, because the ccimx6ul doesn't support WebKit and its projects don't need meta-webkit at all. https://jira.digi.com/browse/DEL-7339 Signed-off-by: Gabriel Valcazar --- meta-digi-dey/conf/distro/dey.conf | 1 + meta-digi-dey/conf/layer.conf | 8 +-- .../packagegroups/packagegroup-dey-webkit.bb | 13 ++++ .../recipes-core/images/dey-image-webkit.bb | 10 +++ .../swu-images/dey-image-webkit-swu.bb | 8 +++ .../images/dey-image-graphical.inc | 64 +++++++++++++++++++ .../recipes-core/images/dey-image-qt.bb | 62 ++---------------- sdk/build-github.sh | 3 +- sdk/build.sh | 13 ++-- sdk/config/ccimx6qpsbc/bblayers.conf.sample | 1 + sdk/config/ccimx6qpsbc/conf-notes.txt | 5 ++ sdk/config/ccimx6sbc/bblayers.conf.sample | 1 + sdk/config/ccimx6sbc/conf-notes.txt | 5 ++ sdk/config/ccimx8mn-dvk/bblayers.conf.sample | 1 + sdk/config/ccimx8mn-dvk/conf-notes.txt | 5 ++ .../ccimx8x-sbc-express/bblayers.conf.sample | 1 + sdk/config/ccimx8x-sbc-express/conf-notes.txt | 5 ++ .../ccimx8x-sbc-pro/bblayers.conf.sample | 1 + sdk/config/ccimx8x-sbc-pro/conf-notes.txt | 5 ++ 19 files changed, 143 insertions(+), 69 deletions(-) create mode 100644 meta-digi-dey/dynamic-layers/webkit/recipes-browser/packagegroups/packagegroup-dey-webkit.bb create mode 100644 meta-digi-dey/dynamic-layers/webkit/recipes-core/images/dey-image-webkit.bb create mode 100644 meta-digi-dey/dynamic-layers/webkit/recipes-digi/swu-images/dey-image-webkit-swu.bb create mode 100644 meta-digi-dey/recipes-core/images/dey-image-graphical.inc diff --git a/meta-digi-dey/conf/distro/dey.conf b/meta-digi-dey/conf/distro/dey.conf index d42c93df6..9461bc4c1 100644 --- a/meta-digi-dey/conf/distro/dey.conf +++ b/meta-digi-dey/conf/distro/dey.conf @@ -42,6 +42,7 @@ FEATURE_PACKAGES_dey-gstreamer = "packagegroup-dey-gstreamer" FEATURE_PACKAGES_dey-network = "packagegroup-dey-network" FEATURE_PACKAGES_dey-qt = "packagegroup-dey-qt" FEATURE_PACKAGES_dey-trustfence = "packagegroup-dey-trustfence" +FEATURE_PACKAGES_dey-webkit = "packagegroup-dey-webkit" FEATURE_PACKAGES_dey-wireless = "packagegroup-dey-wireless" # Our layer only provides version 5.41, which we want to keep because diff --git a/meta-digi-dey/conf/layer.conf b/meta-digi-dey/conf/layer.conf index 91a959614..0027cf474 100644 --- a/meta-digi-dey/conf/layer.conf +++ b/meta-digi-dey/conf/layer.conf @@ -5,10 +5,10 @@ BBPATH .= ":${LAYERDIR}" BBFILES += "${LAYERDIR}/recipes-*/*/*.bb \ ${LAYERDIR}/recipes-*/*/*.bbappend" -# Let us add layer-specific bbappends which are only applied when that -# layer is included in our configuration -BBFILES += "${@' '.join('${LAYERDIR}/other-layers/%s/recipes*/*/*.bbappend' % layer \ - for layer in BBFILE_COLLECTIONS.split())}" +BBFILES_DYNAMIC += " \ + webkit:${LAYERDIR}/dynamic-layers/webkit/*/*/*.bb \ + webkit:${LAYERDIR}/dynamic-layers/webkit/*/*/*.bbappend \ +" BBFILE_COLLECTIONS += "digi-dey" BBFILE_PATTERN_digi-dey := "^${LAYERDIR}/" diff --git a/meta-digi-dey/dynamic-layers/webkit/recipes-browser/packagegroups/packagegroup-dey-webkit.bb b/meta-digi-dey/dynamic-layers/webkit/recipes-browser/packagegroups/packagegroup-dey-webkit.bb new file mode 100644 index 000000000..51810b718 --- /dev/null +++ b/meta-digi-dey/dynamic-layers/webkit/recipes-browser/packagegroups/packagegroup-dey-webkit.bb @@ -0,0 +1,13 @@ +# +# Copyright (C) 2020, Digi International Inc. +# +SUMMARY = "WebKit packagegroup for DEY image" + +PACKAGE_ARCH = "${MACHINE_ARCH}" +inherit packagegroup + +# Include WPE WebKit and launcher (cog) +RDEPENDS_${PN} += " \ + cog \ + wpewebkit \ +" diff --git a/meta-digi-dey/dynamic-layers/webkit/recipes-core/images/dey-image-webkit.bb b/meta-digi-dey/dynamic-layers/webkit/recipes-core/images/dey-image-webkit.bb new file mode 100644 index 000000000..3c1d26f76 --- /dev/null +++ b/meta-digi-dey/dynamic-layers/webkit/recipes-core/images/dey-image-webkit.bb @@ -0,0 +1,10 @@ +# +# Copyright (C) 2020 Digi International. +# +require recipes-core/images/dey-image-graphical.inc + +DESCRIPTION = "DEY image with WebKit browser engine support" + +GRAPHICAL_CORE = "webkit" + +COMPATIBLE_MACHINE = "(ccimx8x|ccimx8m|ccimx6$)" diff --git a/meta-digi-dey/dynamic-layers/webkit/recipes-digi/swu-images/dey-image-webkit-swu.bb b/meta-digi-dey/dynamic-layers/webkit/recipes-digi/swu-images/dey-image-webkit-swu.bb new file mode 100644 index 000000000..0d5933099 --- /dev/null +++ b/meta-digi-dey/dynamic-layers/webkit/recipes-digi/swu-images/dey-image-webkit-swu.bb @@ -0,0 +1,8 @@ +# Copyright (C) 2020 Digi International Inc. + +require recipes-digi/swu-images/swu.inc + +# Point to the SRC_URI files in the original swu-images directory +FILESEXTRAPATHS_prepend := "${THISDIR}/../../../../recipes-digi/swu-images/files:" + +IMG_NAME = "${@get_baseimg_pn(d)}-${GRAPHICAL_BACKEND}" diff --git a/meta-digi-dey/recipes-core/images/dey-image-graphical.inc b/meta-digi-dey/recipes-core/images/dey-image-graphical.inc new file mode 100644 index 000000000..1542bc7f7 --- /dev/null +++ b/meta-digi-dey/recipes-core/images/dey-image-graphical.inc @@ -0,0 +1,64 @@ +# +# Copyright (C) 2016-2020 Digi International. +# +DESCRIPTION = "DEY image with graphical libraries" +LICENSE = "MIT" + +GRAPHICAL_CORE ??= "qt" + +SOC_PACKAGES = "" +SOC_PACKAGES_ccimx6 = "imx-gpu-viv-demos imx-gpu-viv-tools" + +IMAGE_INSTALL = " \ + packagegroup-dey-core \ + ${CORE_IMAGE_EXTRA_INSTALL} \ + ${SOC_PACKAGES} \ +" + +IMAGE_FEATURES += " \ + dey-network \ + dey-${GRAPHICAL_CORE} \ + eclipse-debug \ + package-management \ + ssh-server-dropbear \ + ${@bb.utils.contains('DISTRO_FEATURES', 'wayland', '', \ + bb.utils.contains('DISTRO_FEATURES', 'x11', 'x11-base x11-sato', \ + '', d), d)} \ + ${@bb.utils.contains('MACHINE_FEATURES', 'accel-video', 'dey-gstreamer', '', d)} \ + ${@bb.utils.contains('MACHINE_FEATURES', 'alsa', 'dey-audio', '', d)} \ + ${@bb.utils.contains('MACHINE_FEATURES', 'bluetooth', 'dey-bluetooth', '', d)} \ + ${@bb.utils.contains('MACHINE_FEATURES', 'wifi', 'dey-wireless', '', d)} \ +" + +# Separately add 'dey-gstreamer' to ccimx6ulsbc platform. +# This platform does not have 'accel-video' but we want gstreamer for using +# it with video/camera +IMAGE_FEATURES_append_ccimx6ulsbc = " dey-gstreamer" + +# Remove some features to reduce the rootfs size to fit in the internal storage. +IMAGE_FEATURES_remove_ccimx6ul = "package-management" + +# SDK features (for toolchains generated from an image with populate_sdk) +SDKIMAGE_FEATURES ?= "dev-pkgs dbg-pkgs staticdev-pkgs" + +IMAGE_LINGUAS = "" + +inherit core-image +inherit dey-image +inherit distro_features_check + +CONFLICT_DISTRO_FEATURES = "directfb" + +IMAGE_ROOTFS_SIZE = "8192" + +# Do not install udev-cache +BAD_RECOMMENDATIONS += "udev-cache" +BAD_RECOMMENDATIONS += "eudev-hwdb" + +export IMAGE_BASENAME = "dey-image-${GRAPHICAL_CORE}-${GRAPHICAL_BACKEND}" + +CORE_IMAGE_EXTRA_INSTALL += " \ + ${@bb.utils.contains('DISTRO_FEATURES', 'wayland', 'weston-init weston-examples gtk+3-demo clutter-1.0-examples', '', d)} \ + ${@bb.utils.contains('DISTRO_FEATURES', 'x11 wayland', 'weston-xwayland xterm', '', d)} \ + dey-examples-digiapix \ +" diff --git a/meta-digi-dey/recipes-core/images/dey-image-qt.bb b/meta-digi-dey/recipes-core/images/dey-image-qt.bb index 3d4560298..0842c0daa 100644 --- a/meta-digi-dey/recipes-core/images/dey-image-qt.bb +++ b/meta-digi-dey/recipes-core/images/dey-image-qt.bb @@ -1,62 +1,8 @@ # -# Copyright (C) 2016-2018 Digi International. +# Copyright (C) 2016-2020 Digi International. # +require dey-image-graphical.inc + DESCRIPTION = "DEY image with QT graphical libraries" -LICENSE = "MIT" -SOC_PACKAGES = "" -SOC_PACKAGES_ccimx6 = "imx-gpu-viv-demos imx-gpu-viv-tools" - -IMAGE_INSTALL = " \ - packagegroup-dey-core \ - ${CORE_IMAGE_EXTRA_INSTALL} \ - ${SOC_PACKAGES} \ -" - -IMAGE_FEATURES += " \ - dey-network \ - dey-qt \ - eclipse-debug \ - package-management \ - ssh-server-dropbear \ - ${@bb.utils.contains('DISTRO_FEATURES', 'wayland', '', \ - bb.utils.contains('DISTRO_FEATURES', 'x11', 'x11-base x11-sato', \ - '', d), d)} \ - ${@bb.utils.contains('MACHINE_FEATURES', 'accel-video', 'dey-gstreamer', '', d)} \ - ${@bb.utils.contains('MACHINE_FEATURES', 'alsa', 'dey-audio', '', d)} \ - ${@bb.utils.contains('MACHINE_FEATURES', 'bluetooth', 'dey-bluetooth', '', d)} \ - ${@bb.utils.contains('MACHINE_FEATURES', 'wifi', 'dey-wireless', '', d)} \ -" - -# Separately add 'dey-gstreamer' to ccimx6ulsbc platform. -# This platform does not have 'accel-video' but we want gstreamer for using -# it with video/camera -IMAGE_FEATURES_append_ccimx6ulsbc = " dey-gstreamer" - -# Remove some features to reduce the rootfs size to fit in the internal storage. -IMAGE_FEATURES_remove_ccimx6ul = "package-management" - -# SDK features (for toolchains generated from an image with populate_sdk) -SDKIMAGE_FEATURES ?= "dev-pkgs dbg-pkgs staticdev-pkgs" - -IMAGE_LINGUAS = "" - -inherit core-image -inherit dey-image -inherit distro_features_check - -CONFLICT_DISTRO_FEATURES = "directfb" - -IMAGE_ROOTFS_SIZE = "8192" - -# Do not install udev-cache -BAD_RECOMMENDATIONS += "udev-cache" -BAD_RECOMMENDATIONS += "eudev-hwdb" - -export IMAGE_BASENAME = "dey-image-qt-${GRAPHICAL_BACKEND}" - -CORE_IMAGE_EXTRA_INSTALL += " \ - ${@bb.utils.contains('DISTRO_FEATURES', 'wayland', 'weston-init weston-examples gtk+3-demo clutter-1.0-examples', '', d)} \ - ${@bb.utils.contains('DISTRO_FEATURES', 'x11 wayland', 'weston-xwayland xterm', '', d)} \ - dey-examples-digiapix \ -" +GRAPHICAL_CORE = "qt" diff --git a/sdk/build-github.sh b/sdk/build-github.sh index c4213b974..83d8bbc19 100755 --- a/sdk/build-github.sh +++ b/sdk/build-github.sh @@ -29,7 +29,7 @@ MANIFEST_URL="https://github.com/digi-embedded/dey-manifest.git" RM_WORK_CFG=" INHERIT += \"rm_work\" # Exclude rm_work for some key packages (for debugging purposes) -RM_WORK_EXCLUDE += \"dey-image-qt linux-dey qtbase u-boot-dey\" +RM_WORK_EXCLUDE += \"dey-image-qt dey-image-webkit linux-dey qtbase u-boot-dey\" " ZIP_INSTALLER_CFG=" @@ -91,6 +91,7 @@ purge_sstate() { packagegroup-dey-gstreamer \ packagegroup-dey-network \ packagegroup-dey-qt \ + packagegroup-dey-webkit \ packagegroup-dey-wireless \ " bitbake -k -c cleansstate ${PURGE_PKGS} >/dev/null 2>&1 || true diff --git a/sdk/build.sh b/sdk/build.sh index bdb10d345..538dc0927 100755 --- a/sdk/build.sh +++ b/sdk/build.sh @@ -42,7 +42,7 @@ BB_GENERATE_MIRROR_TARBALLS = \"1\" RM_WORK_CFG=" INHERIT += \"rm_work\" # Exclude rm_work for some key packages (for debugging purposes) -RM_WORK_EXCLUDE += \"dey-image-qt linux-dey qtbase u-boot-dey\" +RM_WORK_EXCLUDE += \"dey-image-qt dey-image-webkit linux-dey qtbase u-boot-dey\" " ZIP_INSTALLER_CFG=" @@ -109,6 +109,7 @@ purge_sstate() { packagegroup-dey-gstreamer \ packagegroup-dey-network \ packagegroup-dey-qt \ + packagegroup-dey-webkit \ packagegroup-dey-wireless \ " bitbake -k -c cleansstate ${PURGE_PKGS} >/dev/null 2>&1 || true @@ -173,11 +174,11 @@ while read _pl _var _tgt; do eval "${_pl//-/_}_var=\"${_var//,/ }\"" eval "${_pl//-/_}_tgt=\"${_tgt//,/ }\"" done<<-_EOF_ - ccimx8mn-dvk DONTBUILDVARIANTS dey-image-qt,dey-image-aws - ccimx8x-sbc-pro DONTBUILDVARIANTS dey-image-qt,dey-image-aws - ccimx8x-sbc-express DONTBUILDVARIANTS dey-image-qt,dey-image-aws - ccimx6qpsbc DONTBUILDVARIANTS dey-image-qt,dey-image-aws - ccimx6sbc DONTBUILDVARIANTS dey-image-qt,dey-image-aws + ccimx8mn-dvk DONTBUILDVARIANTS dey-image-qt,dey-image-webkit,dey-image-aws + ccimx8x-sbc-pro DONTBUILDVARIANTS dey-image-qt,dey-image-webkit,dey-image-aws + ccimx8x-sbc-express DONTBUILDVARIANTS dey-image-qt,dey-image-webkit,dey-image-aws + ccimx6qpsbc DONTBUILDVARIANTS dey-image-qt,dey-image-webkit,dey-image-aws + ccimx6sbc DONTBUILDVARIANTS dey-image-qt,dey-image-webkit,dey-image-aws ccimx6ulsbc DONTBUILDVARIANTS dey-image-qt,dey-image-aws ccimx6ulstarter DONTBUILDVARIANTS core-image-base,dey-image-aws ccimx6ulsom DONTBUILDVARIANTS dey-image-mft-module-min diff --git a/sdk/config/ccimx6qpsbc/bblayers.conf.sample b/sdk/config/ccimx6qpsbc/bblayers.conf.sample index bc2ef9645..b639b6828 100644 --- a/sdk/config/ccimx6qpsbc/bblayers.conf.sample +++ b/sdk/config/ccimx6qpsbc/bblayers.conf.sample @@ -17,6 +17,7 @@ BBLAYERS ?= " \ ##DIGIBASE##/meta-swupdate \ ##DIGIBASE##/meta-freescale \ ##DIGIBASE##/meta-fsl-demos \ + ##DIGIBASE##/meta-webkit \ ##DIGIBASE##/meta-digi/meta-digi-arm \ ##DIGIBASE##/meta-digi/meta-digi-dey \ " diff --git a/sdk/config/ccimx6qpsbc/conf-notes.txt b/sdk/config/ccimx6qpsbc/conf-notes.txt index e42d80e4f..d10d418c4 100644 --- a/sdk/config/ccimx6qpsbc/conf-notes.txt +++ b/sdk/config/ccimx6qpsbc/conf-notes.txt @@ -10,6 +10,11 @@ Digi Embedded Yocto provides the following image recipes: DISTRO_FEATURES_remove = "x11 wayland" + * dey-image-webkit: graphical WebKit image + + By default the image is XWayland-based so it provides a full Weston + desktop environment. + * dey-image-aws: console-only image supporting Amazon Web Services IoT This image includes the AWS Greengrass Core and an AWS IoT platform diff --git a/sdk/config/ccimx6sbc/bblayers.conf.sample b/sdk/config/ccimx6sbc/bblayers.conf.sample index bc2ef9645..b639b6828 100644 --- a/sdk/config/ccimx6sbc/bblayers.conf.sample +++ b/sdk/config/ccimx6sbc/bblayers.conf.sample @@ -17,6 +17,7 @@ BBLAYERS ?= " \ ##DIGIBASE##/meta-swupdate \ ##DIGIBASE##/meta-freescale \ ##DIGIBASE##/meta-fsl-demos \ + ##DIGIBASE##/meta-webkit \ ##DIGIBASE##/meta-digi/meta-digi-arm \ ##DIGIBASE##/meta-digi/meta-digi-dey \ " diff --git a/sdk/config/ccimx6sbc/conf-notes.txt b/sdk/config/ccimx6sbc/conf-notes.txt index e42d80e4f..d10d418c4 100644 --- a/sdk/config/ccimx6sbc/conf-notes.txt +++ b/sdk/config/ccimx6sbc/conf-notes.txt @@ -10,6 +10,11 @@ Digi Embedded Yocto provides the following image recipes: DISTRO_FEATURES_remove = "x11 wayland" + * dey-image-webkit: graphical WebKit image + + By default the image is XWayland-based so it provides a full Weston + desktop environment. + * dey-image-aws: console-only image supporting Amazon Web Services IoT This image includes the AWS Greengrass Core and an AWS IoT platform diff --git a/sdk/config/ccimx8mn-dvk/bblayers.conf.sample b/sdk/config/ccimx8mn-dvk/bblayers.conf.sample index bc2ef9645..b639b6828 100644 --- a/sdk/config/ccimx8mn-dvk/bblayers.conf.sample +++ b/sdk/config/ccimx8mn-dvk/bblayers.conf.sample @@ -17,6 +17,7 @@ BBLAYERS ?= " \ ##DIGIBASE##/meta-swupdate \ ##DIGIBASE##/meta-freescale \ ##DIGIBASE##/meta-fsl-demos \ + ##DIGIBASE##/meta-webkit \ ##DIGIBASE##/meta-digi/meta-digi-arm \ ##DIGIBASE##/meta-digi/meta-digi-dey \ " diff --git a/sdk/config/ccimx8mn-dvk/conf-notes.txt b/sdk/config/ccimx8mn-dvk/conf-notes.txt index 6085b7217..39ed1c407 100644 --- a/sdk/config/ccimx8mn-dvk/conf-notes.txt +++ b/sdk/config/ccimx8mn-dvk/conf-notes.txt @@ -10,6 +10,11 @@ Digi Embedded Yocto provides the following image recipes: DISTRO_FEATURES_remove = "x11 wayland vulkan" + * dey-image-webkit: graphical WebKit image + + By default the image is XWayland-based so it provides a full Weston + desktop environment. + * dey-image-aws: console-only image supporting Amazon Web Services IoT This image includes the AWS Greengrass Core and an AWS IoT platform diff --git a/sdk/config/ccimx8x-sbc-express/bblayers.conf.sample b/sdk/config/ccimx8x-sbc-express/bblayers.conf.sample index bc2ef9645..b639b6828 100644 --- a/sdk/config/ccimx8x-sbc-express/bblayers.conf.sample +++ b/sdk/config/ccimx8x-sbc-express/bblayers.conf.sample @@ -17,6 +17,7 @@ BBLAYERS ?= " \ ##DIGIBASE##/meta-swupdate \ ##DIGIBASE##/meta-freescale \ ##DIGIBASE##/meta-fsl-demos \ + ##DIGIBASE##/meta-webkit \ ##DIGIBASE##/meta-digi/meta-digi-arm \ ##DIGIBASE##/meta-digi/meta-digi-dey \ " diff --git a/sdk/config/ccimx8x-sbc-express/conf-notes.txt b/sdk/config/ccimx8x-sbc-express/conf-notes.txt index 6085b7217..39ed1c407 100644 --- a/sdk/config/ccimx8x-sbc-express/conf-notes.txt +++ b/sdk/config/ccimx8x-sbc-express/conf-notes.txt @@ -10,6 +10,11 @@ Digi Embedded Yocto provides the following image recipes: DISTRO_FEATURES_remove = "x11 wayland vulkan" + * dey-image-webkit: graphical WebKit image + + By default the image is XWayland-based so it provides a full Weston + desktop environment. + * dey-image-aws: console-only image supporting Amazon Web Services IoT This image includes the AWS Greengrass Core and an AWS IoT platform diff --git a/sdk/config/ccimx8x-sbc-pro/bblayers.conf.sample b/sdk/config/ccimx8x-sbc-pro/bblayers.conf.sample index bc2ef9645..b639b6828 100644 --- a/sdk/config/ccimx8x-sbc-pro/bblayers.conf.sample +++ b/sdk/config/ccimx8x-sbc-pro/bblayers.conf.sample @@ -17,6 +17,7 @@ BBLAYERS ?= " \ ##DIGIBASE##/meta-swupdate \ ##DIGIBASE##/meta-freescale \ ##DIGIBASE##/meta-fsl-demos \ + ##DIGIBASE##/meta-webkit \ ##DIGIBASE##/meta-digi/meta-digi-arm \ ##DIGIBASE##/meta-digi/meta-digi-dey \ " diff --git a/sdk/config/ccimx8x-sbc-pro/conf-notes.txt b/sdk/config/ccimx8x-sbc-pro/conf-notes.txt index 6085b7217..39ed1c407 100644 --- a/sdk/config/ccimx8x-sbc-pro/conf-notes.txt +++ b/sdk/config/ccimx8x-sbc-pro/conf-notes.txt @@ -10,6 +10,11 @@ Digi Embedded Yocto provides the following image recipes: DISTRO_FEATURES_remove = "x11 wayland vulkan" + * dey-image-webkit: graphical WebKit image + + By default the image is XWayland-based so it provides a full Weston + desktop environment. + * dey-image-aws: console-only image supporting Amazon Web Services IoT This image includes the AWS Greengrass Core and an AWS IoT platform From b13339839e5f74715200146bf3c7c626f8d262a8 Mon Sep 17 00:00:00 2001 From: Gabriel Valcazar Date: Wed, 9 Dec 2020 16:36:34 +0100 Subject: [PATCH 35/57] cog: fix crash due to EGL library errors The EGL library provided by NXP in the v5.4.47 BSP has a bug where a NULL pointer is returned by eglGetProcAddress() when trying to obtain the entrypoint for a specific function used throughout the cog code. This caused cog to crash immediately after launching it. Recently, a fix was made available in the cog repo, so backport it to the latest available revision of cog in meta-webkit and apply it. https://jira.digi.com/browse/DEL-7311 https://jira.digi.com/browse/DEL-7312 https://jira.digi.com/browse/DEL-7339 Signed-off-by: Gabriel Valcazar --- ...ommon-EGL-proc-address-loader-with-d.patch | 84 +++++++++++++++++++ ...-proc-address.h-add-a-license-header.patch | 23 +++++ .../recipes-browser/cog/cog_0.7.1.bbappend | 8 ++ 3 files changed, 115 insertions(+) create mode 100644 meta-digi-dey/dynamic-layers/webkit/recipes-browser/cog/cog/0001-platform-add-a-common-EGL-proc-address-loader-with-d.patch create mode 100644 meta-digi-dey/dynamic-layers/webkit/recipes-browser/cog/cog/0002-egl-proc-address.h-add-a-license-header.patch create mode 100644 meta-digi-dey/dynamic-layers/webkit/recipes-browser/cog/cog_0.7.1.bbappend diff --git a/meta-digi-dey/dynamic-layers/webkit/recipes-browser/cog/cog/0001-platform-add-a-common-EGL-proc-address-loader-with-d.patch b/meta-digi-dey/dynamic-layers/webkit/recipes-browser/cog/cog/0001-platform-add-a-common-EGL-proc-address-loader-with-d.patch new file mode 100644 index 000000000..ed1d3b057 --- /dev/null +++ b/meta-digi-dey/dynamic-layers/webkit/recipes-browser/cog/cog/0001-platform-add-a-common-EGL-proc-address-loader-with-d.patch @@ -0,0 +1,84 @@ +From: Zan Dobersek +Date: Tue, 10 Nov 2020 09:23:16 +0100 +Subject: [PATCH 1/4] platform: add a common EGL proc address loader with dlsym + fallback + +Provide a common EGL proc address loader function that incorporates +a dlsym-based fallback in case eglGetProcAddress() refuses to find +an otherwise-existing entrypoint. + +This should avoid some drivers that fail to handle proc address +requests for specific entrypoints, but have those entrypoints +exported as regular symbols loadable through dlsym(). +--- + platform/cog-platform-drm.c | 4 +++- + platform/cog-platform-fdo.c | 4 +++- + platform/common/egl-proc-address.h | 15 +++++++++++++++ + 3 files changed, 21 insertions(+), 2 deletions(-) + create mode 100644 platform/common/egl-proc-address.h + +diff --git a/platform/cog-platform-drm.c b/platform/cog-platform-drm.c +index 6fa4a25..27b4521 100644 +--- a/platform/cog-platform-drm.c ++++ b/platform/cog-platform-drm.c +@@ -16,6 +16,8 @@ + #include + #include + ++#include "common/egl-proc-address.h" ++ + + #if !defined(EGL_EXT_platform_base) + typedef EGLDisplay (EGLAPIENTRYP PFNEGLGETPLATFORMDISPLAYEXTPROC) (EGLenum platform, void *native_display, const EGLint *attrib_list); +@@ -379,7 +381,7 @@ init_egl (void) + { + static PFNEGLGETPLATFORMDISPLAYEXTPROC s_eglGetPlatformDisplay = NULL; + if (!s_eglGetPlatformDisplay) +- s_eglGetPlatformDisplay = (PFNEGLGETPLATFORMDISPLAYEXTPROC) eglGetProcAddress ("eglGetPlatformDisplayEXT"); ++ s_eglGetPlatformDisplay = (PFNEGLGETPLATFORMDISPLAYEXTPROC) load_egl_proc_address ("eglGetPlatformDisplayEXT"); + + if (s_eglGetPlatformDisplay) + egl_data.display = s_eglGetPlatformDisplay (EGL_PLATFORM_GBM_KHR, gbm_data.device, NULL); +diff --git a/platform/cog-platform-fdo.c b/platform/cog-platform-fdo.c +index 960bc98..7bdf075 100644 +--- a/platform/cog-platform-fdo.c ++++ b/platform/cog-platform-fdo.c +@@ -32,6 +32,8 @@ + #include + #include + ++#include "common/egl-proc-address.h" ++ + #include "xdg-shell-client.h" + #include "fullscreen-shell-unstable-v1-client.h" + #include "presentation-time-client.h" +@@ -1586,7 +1588,7 @@ on_export_fdo_egl_image(void *data, struct wpe_fdo_egl_exported_image *image) + s_eglCreateWaylandBufferFromImageWL; + if (s_eglCreateWaylandBufferFromImageWL == NULL) { + s_eglCreateWaylandBufferFromImageWL = (PFNEGLCREATEWAYLANDBUFFERFROMIMAGEWL) +- eglGetProcAddress ("eglCreateWaylandBufferFromImageWL"); ++ load_egl_proc_address ("eglCreateWaylandBufferFromImageWL"); + g_assert (s_eglCreateWaylandBufferFromImageWL); + } + +diff --git a/platform/common/egl-proc-address.h b/platform/common/egl-proc-address.h +new file mode 100644 +index 0000000..44dd6a9 +--- /dev/null ++++ b/platform/common/egl-proc-address.h +@@ -0,0 +1,15 @@ ++#pragma once ++ ++#define __USE_GNU ++#include ++ ++#include ++ ++static void* ++load_egl_proc_address (const char *name) ++{ ++ void *proc_address = eglGetProcAddress (name); ++ if (!proc_address) ++ proc_address = dlsym (RTLD_NEXT, name); ++ return proc_address; ++} diff --git a/meta-digi-dey/dynamic-layers/webkit/recipes-browser/cog/cog/0002-egl-proc-address.h-add-a-license-header.patch b/meta-digi-dey/dynamic-layers/webkit/recipes-browser/cog/cog/0002-egl-proc-address.h-add-a-license-header.patch new file mode 100644 index 000000000..bfbfadb4b --- /dev/null +++ b/meta-digi-dey/dynamic-layers/webkit/recipes-browser/cog/cog/0002-egl-proc-address.h-add-a-license-header.patch @@ -0,0 +1,23 @@ +From: Zan Dobersek +Date: Tue, 10 Nov 2020 09:42:01 +0100 +Subject: [PATCH 2/4] egl-proc-address.h: add a license header. + +--- + platform/common/egl-proc-address.h | 7 +++++++ + 1 file changed, 7 insertions(+) + +diff --git a/platform/common/egl-proc-address.h b/platform/common/egl-proc-address.h +index 44dd6a9..83ad90a 100644 +--- a/platform/common/egl-proc-address.h ++++ b/platform/common/egl-proc-address.h +@@ -1,3 +1,10 @@ ++/* ++ * egl-proc-address.h ++ * Copyright (C) 2020 Igalia S.L. ++ * ++ * Distributed under terms of the MIT license. ++ */ ++ + #pragma once + + #define __USE_GNU diff --git a/meta-digi-dey/dynamic-layers/webkit/recipes-browser/cog/cog_0.7.1.bbappend b/meta-digi-dey/dynamic-layers/webkit/recipes-browser/cog/cog_0.7.1.bbappend new file mode 100644 index 000000000..32d03d065 --- /dev/null +++ b/meta-digi-dey/dynamic-layers/webkit/recipes-browser/cog/cog_0.7.1.bbappend @@ -0,0 +1,8 @@ +# Copyright 2020, Digi International Inc. + +FILESEXTRAPATHS_prepend := "${THISDIR}/${BPN}:" + +SRC_URI_append = " \ + file://0001-platform-add-a-common-EGL-proc-address-loader-with-d.patch \ + file://0002-egl-proc-address.h-add-a-license-header.patch \ +" From 3a3ca20ec22834ffc78b8ff1a7d1be4288883238 Mon Sep 17 00:00:00 2001 From: Gabriel Valcazar Date: Wed, 9 Dec 2020 16:47:03 +0100 Subject: [PATCH 36/57] wpewebkit: add patch to fix video playback on the ccimx8x The i.MX8X video decoder requires a specific NXP video converter, otherwise videos will appear with several glitches. This patch adds said plugin in the WPE webkit's internal gstreamer pipeline. https://jira.digi.com/browse/DEL-7311 https://jira.digi.com/browse/DEL-7339 Signed-off-by: Gabriel Valcazar --- ...ert_g2d-plugin-in-gstreamer-pipeline.patch | 42 +++++++++++++++++++ .../wpewebkit/wpewebkit_2.28.1.bbappend | 5 +++ 2 files changed, 47 insertions(+) create mode 100644 meta-digi-dey/dynamic-layers/webkit/recipes-browser/wpewebkit/wpewebkit/0001-Use-imxvideoconvert_g2d-plugin-in-gstreamer-pipeline.patch create mode 100644 meta-digi-dey/dynamic-layers/webkit/recipes-browser/wpewebkit/wpewebkit_2.28.1.bbappend diff --git a/meta-digi-dey/dynamic-layers/webkit/recipes-browser/wpewebkit/wpewebkit/0001-Use-imxvideoconvert_g2d-plugin-in-gstreamer-pipeline.patch b/meta-digi-dey/dynamic-layers/webkit/recipes-browser/wpewebkit/wpewebkit/0001-Use-imxvideoconvert_g2d-plugin-in-gstreamer-pipeline.patch new file mode 100644 index 000000000..dc726fe46 --- /dev/null +++ b/meta-digi-dey/dynamic-layers/webkit/recipes-browser/wpewebkit/wpewebkit/0001-Use-imxvideoconvert_g2d-plugin-in-gstreamer-pipeline.patch @@ -0,0 +1,42 @@ +From: Gabriel Valcazar +Date: Wed, 21 Oct 2020 17:14:43 +0200 +Subject: [PATCH] Use imxvideoconvert_g2d plugin in gstreamer pipeline + +This element is necessary to view videos correctly on the i.MX8X + +Signed-off-by: Gabriel Valcazar +--- + .../platform/graphics/gstreamer/GLVideoSinkGStreamer.cpp | 8 +++++--- + 1 file changed, 5 insertions(+), 3 deletions(-) + +diff --git a/Source/WebCore/platform/graphics/gstreamer/GLVideoSinkGStreamer.cpp b/Source/WebCore/platform/graphics/gstreamer/GLVideoSinkGStreamer.cpp +index 8d8f3822..3e047ebb 100644 +--- a/Source/WebCore/platform/graphics/gstreamer/GLVideoSinkGStreamer.cpp ++++ b/Source/WebCore/platform/graphics/gstreamer/GLVideoSinkGStreamer.cpp +@@ -93,11 +93,13 @@ static void webKitGLVideoSinkConstructed(GObject* object) + ASSERT(sink->priv->appSink); + g_object_set(sink->priv->appSink.get(), "enable-last-sample", FALSE, "emit-signals", TRUE, "max-buffers", 1, nullptr); + ++ GstElement* imxconvert = gst_element_factory_make("imxvideoconvert_g2d", nullptr); ++ GstElement* queue = gst_element_factory_make("queue", nullptr); + GstElement* upload = gst_element_factory_make("glupload", nullptr); + GstElement* colorconvert = gst_element_factory_make("glcolorconvert", nullptr); + ASSERT(upload); + ASSERT(colorconvert); +- gst_bin_add_many(GST_BIN_CAST(sink), upload, colorconvert, sink->priv->appSink.get(), nullptr); ++ gst_bin_add_many(GST_BIN_CAST(sink), imxconvert, queue, upload, colorconvert, sink->priv->appSink.get(), nullptr); + + // Workaround until we can depend on GStreamer 1.16.2. + // https://gitlab.freedesktop.org/gstreamer/gst-plugins-base/commit/8d32de090554cf29fe359f83aa46000ba658a693 +@@ -121,9 +123,9 @@ static void webKitGLVideoSinkConstructed(GObject* object) + gst_caps_set_features(caps.get(), 0, gst_caps_features_new(GST_CAPS_FEATURE_MEMORY_GL_MEMORY, nullptr)); + g_object_set(sink->priv->appSink.get(), "caps", caps.get(), nullptr); + +- gst_element_link_many(upload, colorconvert, sink->priv->appSink.get(), nullptr); ++ gst_element_link_many(imxconvert, queue, upload, colorconvert, sink->priv->appSink.get(), nullptr); + +- GRefPtr pad = adoptGRef(gst_element_get_static_pad(upload, "sink")); ++ GRefPtr pad = adoptGRef(gst_element_get_static_pad(imxconvert, "sink")); + gst_element_add_pad(GST_ELEMENT_CAST(sink), gst_ghost_pad_new("sink", pad.get())); + } + diff --git a/meta-digi-dey/dynamic-layers/webkit/recipes-browser/wpewebkit/wpewebkit_2.28.1.bbappend b/meta-digi-dey/dynamic-layers/webkit/recipes-browser/wpewebkit/wpewebkit_2.28.1.bbappend new file mode 100644 index 000000000..ff5d2b62b --- /dev/null +++ b/meta-digi-dey/dynamic-layers/webkit/recipes-browser/wpewebkit/wpewebkit_2.28.1.bbappend @@ -0,0 +1,5 @@ +# Copyright 2020, Digi International Inc. + +FILESEXTRAPATHS_prepend := "${THISDIR}/${BPN}:" + +SRC_URI_append_ccimx8x = " file://0001-Use-imxvideoconvert_g2d-plugin-in-gstreamer-pipeline.patch" From 590b824967e05898ccf485ee8f29e88a4e51ae92 Mon Sep 17 00:00:00 2001 From: Gabriel Valcazar Date: Wed, 9 Dec 2020 16:49:58 +0100 Subject: [PATCH 37/57] wpewebkit: make sure the webkit can only be built for graphical images The WebKit is not supported on framebuffer images yet. While at it, set wpebackend-fdo as the default WPE backend. https://jira.digi.com/browse/DEL-7311 https://jira.digi.com/browse/DEL-7339 Signed-off-by: Gabriel Valcazar --- meta-digi-dey/conf/distro/dey.conf | 3 +++ .../recipes-browser/wpewebkit/wpewebkit_2.28.1.bbappend | 6 ++++++ 2 files changed, 9 insertions(+) diff --git a/meta-digi-dey/conf/distro/dey.conf b/meta-digi-dey/conf/distro/dey.conf index 9461bc4c1..0792479f0 100644 --- a/meta-digi-dey/conf/distro/dey.conf +++ b/meta-digi-dey/conf/distro/dey.conf @@ -70,6 +70,9 @@ PREFERRED_VERSION_libsoc = "git" # recipe in case there are NXP-specific changes in it PREFERRED_PROVIDER_opencl-headers ?= "imx-gpu-viv" +# Use the FDO backend for WPE WebKit +PREFERRED_PROVIDER_virtual/wpebackend = "wpebackend-fdo" + SDK_NAME = "${DISTRO}-${TCLIBC}-${SDKMACHINE}-${IMAGE_BASENAME}-${TUNE_PKGARCH}-${MACHINE}" SDKPATH = "/opt/${DISTRO}/${SDK_VERSION}/${MACHINE}" diff --git a/meta-digi-dey/dynamic-layers/webkit/recipes-browser/wpewebkit/wpewebkit_2.28.1.bbappend b/meta-digi-dey/dynamic-layers/webkit/recipes-browser/wpewebkit/wpewebkit_2.28.1.bbappend index ff5d2b62b..8e769e292 100644 --- a/meta-digi-dey/dynamic-layers/webkit/recipes-browser/wpewebkit/wpewebkit_2.28.1.bbappend +++ b/meta-digi-dey/dynamic-layers/webkit/recipes-browser/wpewebkit/wpewebkit_2.28.1.bbappend @@ -3,3 +3,9 @@ FILESEXTRAPATHS_prepend := "${THISDIR}/${BPN}:" SRC_URI_append_ccimx8x = " file://0001-Use-imxvideoconvert_g2d-plugin-in-gstreamer-pipeline.patch" + +# We can't build the WebKit with fb images, so force wayland as a required +# distro feature. +inherit distro_features_check + +REQUIRED_DISTRO_FEATURES = "wayland" From cfa11005ee0560325a88a0c8b4820b9a527a4877 Mon Sep 17 00:00:00 2001 From: Gabriel Valcazar Date: Wed, 9 Dec 2020 16:53:02 +0100 Subject: [PATCH 38/57] cog: add small usability improvements Add two patches to improve user experience, such as making the browser fullscreen and removing the otherwise necessary --platform parameter. Also, make www.digi.com the default URI to avoid having to explicitly pass a URI when launching cog. https://jira.digi.com/browse/DEL-7311 https://jira.digi.com/browse/DEL-7339 Signed-off-by: Gabriel Valcazar --- ...latform-parameter-and-hardcode-the-F.patch | 66 ++++++++++++++++++ ...tform-fdo-always-use-fullscreen-mode.patch | 67 +++++++++++++++++++ .../recipes-browser/cog/cog_0.7.1.bbappend | 4 ++ 3 files changed, 137 insertions(+) create mode 100644 meta-digi-dey/dynamic-layers/webkit/recipes-browser/cog/cog/0003-cog-remove-the-platform-parameter-and-hardcode-the-F.patch create mode 100644 meta-digi-dey/dynamic-layers/webkit/recipes-browser/cog/cog/0004-cog-platform-fdo-always-use-fullscreen-mode.patch diff --git a/meta-digi-dey/dynamic-layers/webkit/recipes-browser/cog/cog/0003-cog-remove-the-platform-parameter-and-hardcode-the-F.patch b/meta-digi-dey/dynamic-layers/webkit/recipes-browser/cog/cog/0003-cog-remove-the-platform-parameter-and-hardcode-the-F.patch new file mode 100644 index 000000000..693fb3700 --- /dev/null +++ b/meta-digi-dey/dynamic-layers/webkit/recipes-browser/cog/cog/0003-cog-remove-the-platform-parameter-and-hardcode-the-F.patch @@ -0,0 +1,66 @@ +From: Gabriel Valcazar +Date: Tue, 10 Nov 2020 16:32:15 +0100 +Subject: [PATCH 3/4] cog: remove the --platform parameter and hardcode the FDO + platform + +We don't want users to accidentally generate errors by using different +platforms, so always use the FDO one by default. + +Signed-off-by: Gabriel Valcazar +--- + cog.c | 27 ++++----------------------- + 1 file changed, 4 insertions(+), 23 deletions(-) + +diff --git a/cog.c b/cog.c +index 950b14d..5f47d87 100644 +--- a/cog.c ++++ b/cog.c +@@ -43,10 +43,7 @@ static struct { + GStrv arguments; + char *background_color; + #if !COG_USE_WEBKITGTK +- union { +- char *platform_name; +- CogPlatform *platform; +- }; ++ CogPlatform *platform; + #endif // !COG_USE_WEBKITGTK + union { + char *action_name; +@@ -95,11 +92,6 @@ static GOptionEntry s_cli_options[] = + { "bg-color", 'b', 0, G_OPTION_ARG_STRING, &s_options.background_color, + "Background color, as a CSS name or in #RRGGBBAA hex syntax (default: white)", + "BG_COLOR" }, +-#if !COG_USE_WEBKITGTK +- { "platform", 'P', 0, G_OPTION_ARG_STRING, &s_options.platform_name, +- "Platform plug-in to use.", +- "NAME" }, +-#endif // !COG_USE_WEBKITGTK + { "web-extensions-dir", '\0', 0, G_OPTION_ARG_STRING, &s_options.web_extensions_dir, + "Load Web Extensions from given directory.", + "PATH"}, +@@ -301,21 +293,10 @@ platform_setup (CogShell *shell) + * a given platform. + */ + +- g_debug ("%s: Platform name: %s", __func__, s_options.platform_name); +- +- if (!s_options.platform_name) +- return FALSE; +- +- g_autofree char *platform_soname = +- g_strdup_printf ("libcogplatform-%s.so", s_options.platform_name); +- g_clear_pointer (&s_options.platform_name, g_free); +- +- g_debug ("%s: Platform plugin: %s", __func__, platform_soname); +- + g_autoptr(CogPlatform) platform = cog_platform_new (); +- if (!cog_platform_try_load (platform, platform_soname)) { +- g_warning ("Could not load: %s (possible cause: %s).\n", +- platform_soname, strerror (errno)); ++ if (!cog_platform_try_load (platform, "libcogplatform-fdo.so")) { ++ g_warning ("Could not load: libcogplatform-fdo.so (possible cause: %s).\n", ++ strerror (errno)); + return FALSE; + } + diff --git a/meta-digi-dey/dynamic-layers/webkit/recipes-browser/cog/cog/0004-cog-platform-fdo-always-use-fullscreen-mode.patch b/meta-digi-dey/dynamic-layers/webkit/recipes-browser/cog/cog/0004-cog-platform-fdo-always-use-fullscreen-mode.patch new file mode 100644 index 000000000..7ea9720f9 --- /dev/null +++ b/meta-digi-dey/dynamic-layers/webkit/recipes-browser/cog/cog/0004-cog-platform-fdo-always-use-fullscreen-mode.patch @@ -0,0 +1,67 @@ +From: Gabriel Valcazar +Date: Tue, 10 Nov 2020 16:36:21 +0100 +Subject: [PATCH 4/4] cog-platform-fdo: always use fullscreen mode + +Otherwise, the browser will spawn on a random place on the desktop every time. + +Signed-off-by: Gabriel Valcazar +--- + platform/cog-platform-fdo.c | 44 ++++++++++--------------------------- + 1 file changed, 12 insertions(+), 32 deletions(-) + +diff --git a/platform/cog-platform-fdo.c b/platform/cog-platform-fdo.c +index 7bdf075..08b0b21 100644 +--- a/platform/cog-platform-fdo.c ++++ b/platform/cog-platform-fdo.c +@@ -1911,39 +1911,19 @@ create_window (GError **error) + configure_surface_geometry (0, 0); + } + +- const char* env_var; +- if ((env_var = g_getenv ("COG_PLATFORM_FDO_VIEW_FULLSCREEN")) && +- g_ascii_strtoll (env_var, NULL, 10) > 0) +- { +- win_data.is_maximized = false; +- win_data.is_fullscreen = true; +- +- if (wl_data.xdg_shell != NULL) { +- xdg_toplevel_set_fullscreen (win_data.xdg_toplevel, NULL); +- } else if (wl_data.shell != NULL) { +- wl_shell_surface_set_fullscreen (win_data.shell_surface, +- WL_SHELL_SURFACE_FULLSCREEN_METHOD_SCALE, +- 0, +- NULL); +- } else { +- g_warning ("No available shell capable of fullscreening."); +- win_data.is_fullscreen = false; +- } +- } +- else if ((env_var = g_getenv ("COG_PLATFORM_FDO_VIEW_MAXIMIZE")) && +- g_ascii_strtoll (env_var, NULL, 10) > 0) +- { +- win_data.is_maximized = true; +- win_data.is_fullscreen = false; ++ win_data.is_maximized = false; ++ win_data.is_fullscreen = true; + +- if (wl_data.xdg_shell != NULL) { +- xdg_toplevel_set_maximized (win_data.xdg_toplevel); +- } else if (wl_data.shell != NULL) { +- wl_shell_surface_set_maximized (win_data.shell_surface, NULL); +- } else { +- g_warning ("No available shell capable of maximizing."); +- win_data.is_maximized = false; +- } ++ if (wl_data.xdg_shell != NULL) { ++ xdg_toplevel_set_fullscreen (win_data.xdg_toplevel, NULL); ++ } else if (wl_data.shell != NULL) { ++ wl_shell_surface_set_fullscreen (win_data.shell_surface, ++ WL_SHELL_SURFACE_FULLSCREEN_METHOD_SCALE, ++ 0, ++ NULL); ++ } else { ++ g_warning ("No available shell capable of fullscreening."); ++ win_data.is_fullscreen = false; + } + + return TRUE; diff --git a/meta-digi-dey/dynamic-layers/webkit/recipes-browser/cog/cog_0.7.1.bbappend b/meta-digi-dey/dynamic-layers/webkit/recipes-browser/cog/cog_0.7.1.bbappend index 32d03d065..c3aea60c5 100644 --- a/meta-digi-dey/dynamic-layers/webkit/recipes-browser/cog/cog_0.7.1.bbappend +++ b/meta-digi-dey/dynamic-layers/webkit/recipes-browser/cog/cog_0.7.1.bbappend @@ -5,4 +5,8 @@ FILESEXTRAPATHS_prepend := "${THISDIR}/${BPN}:" SRC_URI_append = " \ file://0001-platform-add-a-common-EGL-proc-address-loader-with-d.patch \ file://0002-egl-proc-address.h-add-a-license-header.patch \ + file://0003-cog-remove-the-platform-parameter-and-hardcode-the-F.patch \ + file://0004-cog-platform-fdo-always-use-fullscreen-mode.patch \ " + +EXTRA_OECMAKE += "-DCOG_HOME_URI=www.digi.com" From 4b94979d986400d84567b3b11e277bbcc60ae7bf Mon Sep 17 00:00:00 2001 From: Gabriel Valcazar Date: Wed, 9 Dec 2020 16:58:16 +0100 Subject: [PATCH 39/57] digi-webkit-examples: create recipe for WebGL samples This recipe installs a subset of the samples available at https://webglsamples.org/ onto the target's web server, to be able to run said examples locally without needing internet access. Make sure not to install any source files to avoid making the package too large. https://jira.digi.com/browse/DEL-7314 https://jira.digi.com/browse/DEL-7339 Signed-off-by: Gabriel Valcazar --- .../digi-webkit-examples/webglsamples_git.bb | 71 +++++++++++++++++++ 1 file changed, 71 insertions(+) create mode 100644 meta-digi-dey/dynamic-layers/webkit/recipes-browser/digi-webkit-examples/webglsamples_git.bb diff --git a/meta-digi-dey/dynamic-layers/webkit/recipes-browser/digi-webkit-examples/webglsamples_git.bb b/meta-digi-dey/dynamic-layers/webkit/recipes-browser/digi-webkit-examples/webglsamples_git.bb new file mode 100644 index 000000000..6ed09f180 --- /dev/null +++ b/meta-digi-dey/dynamic-layers/webkit/recipes-browser/digi-webkit-examples/webglsamples_git.bb @@ -0,0 +1,71 @@ +# Copyright (C) 2020 Digi International. + +SUMMARY = "A collection of WebGL samples" +DESCRIPTION = "This repo contains several examples of the WebGL JavaScript API, which allows web browsers to render 2D and 3D graphics with direct access to the system's GPU." +HOMEPAGE = "https://webglsamples.org/" +LICENSE = "BSD-3-Clause" +LIC_FILES_CHKSUM = "file://LICENSE.md;md5=e20489d49c9f8517c8f8f3317844e7da" + +WEBGL_SAMPLES_SRC ?= "git://github.com/WebGLSamples/WebGLSamples.github.io.git;protocol=https" +SRCBRANCH = "master" + +SRC_URI = "${WEBGL_SAMPLES_SRC};branch=${SRCBRANCH}" +SRCREV = "dc4428bdc6ef2177f71d9e7bab164c43f9e29302" +S = "${WORKDIR}/git" + +# By default, use the Busybox HTTP daemon as the webserver for the examples. +WEBSERVER_PACKAGE ?= "busybox-httpd" +WEBSERVER_ROOT ?= "srv/www" + +# List of samples we want accesible via the landing page +WEBGL_SAMPLES = " \ + aquarium \ + blob \ + dynamic-cubemap \ + electricflower \ + field \ + multiple-views \ + spacerocks \ + toon-shading \ +" +# Folders containing elements required by the samples we've selected +WEBGL_SAMPLE_DEPS = " \ + colorpicker \ + css \ + fishtank \ + fonts \ + gradient-editor \ + images \ + jquery-ui-1.8.2.custom \ + js \ + lots-o-objects \ + shared \ + tdl \ +" + +WEBGL_REQUIRED = " \ + ${WEBGL_SAMPLES} \ + ${WEBGL_SAMPLE_DEPS} \ +" + +# The package contains static webpages, no need to configure or compile +do_configure[noexec] = "1" +do_compile[noexec] = "1" + +do_install() { + install -d ${D}/${WEBSERVER_ROOT} + + cd ${S} + + # All we need to do is copy the folders we want to the webserver root + # path. Make sure not to copy any source assets, since they're quite + # heavy. + for sample in ${WEBGL_REQUIRED}; do + find ${sample} -path *source_assets* -prune -false -o -type f \ + -exec install -Dm 644 "{}" "${D}/${WEBSERVER_ROOT}/{}" \; + done +} + +FILES_${PN} = "/${WEBSERVER_ROOT}/*" + +PACKAGES = "${PN}" From f7c86fb0a43e38419d657bf08a1592023f59b599 Mon Sep 17 00:00:00 2001 From: Gabriel Valcazar Date: Wed, 9 Dec 2020 17:04:21 +0100 Subject: [PATCH 40/57] busybox: remove default http homepage elements We're going to be using the busybox http server to house the WebKit examples, so we need to get rid of any files that might interfere with it. Keep the files for the ccimx6ul, since it doesn't support WebKit. https://jira.digi.com/browse/DEL-7314 https://jira.digi.com/browse/DEL-7339 Signed-off-by: Gabriel Valcazar --- .../busybox/busybox_1.31.%.bbappend | 17 +++++++++++++---- 1 file changed, 13 insertions(+), 4 deletions(-) diff --git a/meta-digi-dey/recipes-core/busybox/busybox_1.31.%.bbappend b/meta-digi-dey/recipes-core/busybox/busybox_1.31.%.bbappend index b1aabfeb7..4d1640831 100644 --- a/meta-digi-dey/recipes-core/busybox/busybox_1.31.%.bbappend +++ b/meta-digi-dey/recipes-core/busybox/busybox_1.31.%.bbappend @@ -6,8 +6,6 @@ SRC_URI += "file://standby \ file://standby-actions \ file://standby-systemd \ file://busybox-ntpd \ - file://index.html \ - file://digi-logo.png \ file://busybox-httpd.service.in \ file://nm \ file://busybox-acpid \ @@ -17,6 +15,10 @@ SRC_URI += "file://standby \ file://bridgeifupdown \ " +SRC_URI_append_ccimx6ul = " file://index.html \ + file://digi-logo.png \ + " + HAS_SYSTEMD = "${@bb.utils.contains('DISTRO_FEATURES', 'systemd', 'true', 'false', d)}" # hwclock bootscript init parameters @@ -54,8 +56,6 @@ do_install_append() { fi if grep "CONFIG_HTTPD=y" ${WORKDIR}/defconfig; then install -d ${D}/srv/www/cgi-bin - install -m 0644 ${WORKDIR}/index.html ${D}/srv/www/ - install -m 0644 ${WORKDIR}/digi-logo.png ${D}/srv/www/ install -m 0755 ${WORKDIR}/nm ${D}/srv/www/cgi-bin/ if ${HAS_SYSTEMD}; then install -d ${D}${systemd_unitdir}/system @@ -93,4 +93,13 @@ do_install_append() { fi } +do_install_append_ccimx6ul() { + install -d ${D}/srv/www + if grep "CONFIG_HTTPD=y" ${WORKDIR}/defconfig; then + install -m 0644 ${WORKDIR}/index.html ${D}/srv/www/ + install -m 0644 ${WORKDIR}/digi-logo.png ${D}/srv/www/ + + fi +} + PACKAGE_ARCH = "${MACHINE_ARCH}" From 04cd7aafe7acb3e661b16349601dcc33c9366c79 Mon Sep 17 00:00:00 2001 From: Gabriel Valcazar Date: Wed, 9 Dec 2020 17:06:49 +0100 Subject: [PATCH 41/57] digi-webkit-examples: add recipe for main landing page This recipe installs the main page of the WebKit examples, from which all other examples can be accessed. For now, only include the WebGL examples. Since the landing page recipe needs to know which WebGL demos are being installed and the webserver path where everything is installed, move some of the variables used in the webglsamples recipe into an *.inc file to be able to re-use said variables in different recipes. Use the Digi embedded documentation CSS file for now, so the landing page looks more on-brand. https://jira.digi.com/browse/DEL-7314 https://jira.digi.com/browse/DEL-7339 Signed-off-by: Gabriel Valcazar --- .../digi-webkit-examples.bb | 44 + .../digi-webkit-examples.inc | 43 + .../digi-webkit-examples/digi.css | 1617 +++++++++++++++++ .../digi-webkit-examples/index.html | 29 + .../digi-webkit-examples/webglsamples_git.bb | 39 +- 5 files changed, 1734 insertions(+), 38 deletions(-) create mode 100644 meta-digi-dey/dynamic-layers/webkit/recipes-browser/digi-webkit-examples/digi-webkit-examples.bb create mode 100644 meta-digi-dey/dynamic-layers/webkit/recipes-browser/digi-webkit-examples/digi-webkit-examples.inc create mode 100644 meta-digi-dey/dynamic-layers/webkit/recipes-browser/digi-webkit-examples/digi-webkit-examples/digi.css create mode 100644 meta-digi-dey/dynamic-layers/webkit/recipes-browser/digi-webkit-examples/digi-webkit-examples/index.html diff --git a/meta-digi-dey/dynamic-layers/webkit/recipes-browser/digi-webkit-examples/digi-webkit-examples.bb b/meta-digi-dey/dynamic-layers/webkit/recipes-browser/digi-webkit-examples/digi-webkit-examples.bb new file mode 100644 index 000000000..c5048c89b --- /dev/null +++ b/meta-digi-dey/dynamic-layers/webkit/recipes-browser/digi-webkit-examples/digi-webkit-examples.bb @@ -0,0 +1,44 @@ +# Copyright (C) 2020 Digi International. + +SUMMARY = "A webpage containing several examples for the WPE WebKit on Digi embedded devices" +DESCRIPTION = "This webpage provides examples that show how the WPE WebKit leverages the hardware capabilities of Digi embedded devices for improved performance" +LICENSE = "MPL-2.0" +LIC_FILES_CHKSUM = "file://${COMMON_LICENSE_DIR}/MPL-2.0;md5=815ca599c9df247a0c7f619bab123dad" + +SRC_URI = " \ + file://index.html \ + file://digi.css \ +" + +S = "${WORKDIR}" + +require digi-webkit-examples.inc + +RDEPENDS_${PN} = " \ + cog \ + webglsamples \ + ${WEBSERVER_PACKAGE} \ +" + +# The package contains static webpages, no need to configure or compile +do_configure[noexec] = "1" +do_compile[noexec] = "1" + +do_install() { + install -d ${D}/${WEBSERVER_ROOT} + install -m 644 ${S}/index.html ${D}/${WEBSERVER_ROOT} + install -m 644 ${S}/digi.css ${D}/${WEBSERVER_ROOT} + + # Most entry points for the WebGL samples have the same format: + # /.html. Since we might define different sample lists per + # platform, we should generate the list of samples dynamically. + SAMPLE_LIST="" + ENTRY='
  • _name_

  • ' + for sample in ${WEBGL_SAMPLES}; do + SAMPLE_LIST="${SAMPLE_LIST}\n$(echo ${ENTRY} | sed s/_name_/${sample}/g)" + done + + SAMPLE_LIST="${SAMPLE_LIST}\n" + + sed -i s,##WEBGL_SAMPLE_LIST##,"${SAMPLE_LIST}",g ${D}/${WEBSERVER_ROOT}/index.html +} diff --git a/meta-digi-dey/dynamic-layers/webkit/recipes-browser/digi-webkit-examples/digi-webkit-examples.inc b/meta-digi-dey/dynamic-layers/webkit/recipes-browser/digi-webkit-examples/digi-webkit-examples.inc new file mode 100644 index 000000000..0289cdcc6 --- /dev/null +++ b/meta-digi-dey/dynamic-layers/webkit/recipes-browser/digi-webkit-examples/digi-webkit-examples.inc @@ -0,0 +1,43 @@ +# Copyright (C) 2020 Digi International. + +# By default, use the Busybox HTTP daemon as the webserver for the examples. +WEBSERVER_PACKAGE ?= "busybox-httpd" +WEBSERVER_ROOT ?= "srv/www" + +# List of samples we want accesible via the landing page +WEBGL_SAMPLES = " \ + aquarium \ + blob \ + dynamic-cubemap \ + electricflower \ + field \ + multiple-views \ + spacerocks \ + toon-shading \ +" +# Folders containing elements required by the samples we've selected +WEBGL_SAMPLE_DEPS = " \ + colorpicker \ + css \ + fishtank \ + fonts \ + gradient-editor \ + images \ + jquery-ui-1.8.2.custom \ + js \ + lots-o-objects \ + shared \ + tdl \ +" +# List of all folders that need to be installed +WEBGL_REQUIRED = " \ + ${WEBGL_SAMPLES} \ + ${WEBGL_SAMPLE_DEPS} \ +" + +# All packages involved in the webkit examples install their files in the +# webserver directory +FILES_${PN} = "/${WEBSERVER_ROOT}/*" + +# Don't generate dbg or dev packages +PACKAGES = "${PN}" diff --git a/meta-digi-dey/dynamic-layers/webkit/recipes-browser/digi-webkit-examples/digi-webkit-examples/digi.css b/meta-digi-dey/dynamic-layers/webkit/recipes-browser/digi-webkit-examples/digi-webkit-examples/digi.css new file mode 100644 index 000000000..6d04ea977 --- /dev/null +++ b/meta-digi-dey/dynamic-layers/webkit/recipes-browser/digi-webkit-examples/digi-webkit-examples/digi.css @@ -0,0 +1,1617 @@ +/*************************************************/ +/*************** General Design **************/ +/*************************************************/ +@font-face { + font-family: 'Open Sans'; + src: url('../fonts/OpenSans-Regular.ttf') format('truetype'); +} + +body, .controls a.navbar-brand { + font-family: "Open Sans", Arial, "sans serif"; + word-break: break-word; +} + +h1, #content h1 > a.link, +h2, h2 > a.link, +h3, h3 > a.link, +h4, h4 > a.link, +h5, h5 > a.link, +h6, h6 > a.link, +#toctitle, #toctitle > a.link, +.sidebarblock > .content > .title, +.sidebarblock > .content > .title > a.link { + color: #84C361; +} + +@media only screen and (min-width: 768px) { + h1 { + font-size: 2.5em; + } +} + +.admonitionblock td.content > .title, +.audioblock > .title, .exampleblock > .title, +.imageblock > .title, .listingblock > .title, +.literalblock > .title, .stemblock > .title, +.openblock > .title, .paragraph > .title, +.quoteblock > .title, table.tableblock > .title, +.verseblock > .title, .videoblock > .title, +.dlist > .title, .olist > .title, .ulist > .title, +.qlist > .title, .hdlist > .title { + font-family: "Open Sans", Arial, "sans serif"; + color: #646466; +} + +table { + table-layout: fixed; + width: 100%; +} + +/* Source code tables (auto width for proper line number rendering) */ +table.pyhltable { + width: auto; +} + +table > thead > tr > th { + background-color: #717474; + font-weight: bold; +} + +table.tableblock { + font-size: 14px; +} + +table.tableblock td > p, +table.tableblock td > p:last-child { + margin-top: 0px; + margin-bottom: 0px; +} + +table > tbody > tr:nth-of-type(odd), +table > tbody > tr:nth-of-type(even) { + background: transparent; +} + +pre.pygments.highlight { + margin: 0px; +} + +pre { + margin: 0px; +} + +.literalblock pre, .literalblock pre[class], +.listingblock pre, .listingblock pre[class] { + -webkit-border-radius: 0px; + border-radius: 0px; + border-width: 0px; + background: #F7F7F8; +} + +.listingblock > .title { + font-size: 15px; + margin-top: 30px; + background-color: #717474; + color: white; + padding: 8px 10px; + margin-bottom: 0px; + font-style: normal; +} + +.listingblock > .content > pre > code, +.literalblock > .content > pre > code, +.listingblock > .content > pre, +.literalblock > .content > pre { + white-space: pre; + font-size: 14px; +} + +.listingblock > .content > pre, +.literalblock > .content > pre { + word-break: keep-all; + word-wrap: normal; + /*padding-top: 30px;*/ +} + +h1[id], h2[id], h3[id], h4[id], h5[id], h6[id], dt[id] { + padding-top: 10px; +} + +.sect1, .sect2, .sect3, .sect4 { + padding-top: 50px; +} + +.sect1 + .sect1 { + border-top: 0px; +} + +a:link, a:visited, a:active { + text-decoration: none; + outline: none !important; +} + +#tg-sb-content a:link, #tg-sb-content a:visited, #tg-sb-content a:active, +#topic-platform a:link, #topic-platform a:visited, #topic-platform a:active { + color: #0074A2; +} + +#tg-sb-content a:hover, footer .links a:hover, #topic-platform a:hover { + color: #00B7FF; +} + +p, blockquote, dt, td.content, span.alt, +.admonitionblock > table td.content, +p.lead, .paragraph.lead > p, +#preamble > .sectionbody > .paragraph:first-of-type p { + font-size: 16px; +} + +p, .admonitionblock > table td.content, +p.lead, .paragraph.lead > p, +#preamble > .sectionbody > .paragraph:first-of-type p { + line-height: 26px; +} + +.paragraph.lead > p, +#preamble > .sectionbody > .paragraph:first-of-type p { + color: inherit; +} + +.nav li a { + line-height: 24px; +} + +.nav > li > ul > li > a { + font-size: 12px; + line-height: 22px; +} + +.scroll-line { + top: 0px; + position: fixed; + height: 4px; + background: #84C361; + width: 0%; + z-index: 2000; +} +/* +.copy-button:before { + content: ''; + display: inline-block; + width: 18px; + height: 18px; + margin-right: 3px; + background-size: contain; + background-image: url(../../assets/images/clipboard.png); + background-repeat: no-repeat; + position: relative; + top: 3px; +} + +.copy-button:hover:before { + background-image: url(../../assets/images/clipboard_white.png); +} + +.copy-button { + cursor: pointer; + border: 0; + font-size: 14px; + text-transform: uppercase; + font-weight: 500; + padding: 2px 4px 4px; + color: #646466; + background-color: transparent; + position: absolute; + top: 0; + right: 0; +} + +.copy-button:hover, .copy-button:active, .copy-button:focus { + outline: 0; +} + +.copy-button:hover { + background-color: #84C361; + color: #FFFFFF; +} + +.copy-button:active{ + background-color: #EEEEEE; +}*/ + +.listingblock code[data-lang]:before, +.listingblock:hover code[data-lang]:before { + display: none; + /*bottom: 0.425rem; + top: auto; + font-size: 16px; + text-transform: uppercase; + font-weight: 500;*/ +} + +/* Math formulae */ +.MathJax { + font-size: 85% !important; +} + +/* Rotated-cell text (for narrow columns) */ +.rotated-cell { + writing-mode: sideways-lr; + text-align: right !important; +} + +/********************************************************/ +/**************** Expand/Collapse elements **************/ +/********************************************************/ + +a.collapser, a.collapser:link, a.collapser:hover, +a.collapser:visited, a.collapser:active { + outline: none; +} + +div .collapse, div .collapsing { + padding-left: 25px; + padding-right: 25px; +} + +i.clps.arrow { + border: solid #717174; + border-width: 0 3px 3px 0; + display: inline-block; + padding: 3px; + margin-top: 8px; + margin-right: 15px; +} + +.clps.arrow.right { + transform: rotate(-45deg); + -webkit-transform: rotate(-45deg); + float: left !important; +} + +.clps.arrow.left { + transform: rotate(135deg); + -webkit-transform: rotate(135deg); + float: left !important; +} + +.clps.arrow.up { + transform: rotate(-135deg); + -webkit-transform: rotate(-135deg); + float: left !important; +} + +.clps.arrow.down { + transform: rotate(45deg); + -webkit-transform: rotate(45deg); + float: left !important; +} + +/********************************************************/ +/*** Note, Tip, Warning, Caution and Important blocks ***/ +/********************************************************/ +.admonitionblock > table { + border-collapse: collapse; + border: solid; + border-color: #EEEEEE; + border-width: 1px; + width: 100%; +} + +.admonitionblock > table thead > tr > th, +.admonitionblock > table > tbody > tr > th, +.admonitionblock > table > tfoot > tr > th, +.admonitionblock > table > thead > tr > td, +.admonitionblock > table > tbody > tr > td, +.admonitionblock > table > tfoot > tr > td { + border-top: none; +} + +.admonitionblock > table > tbody > tr { + background-color: #FFFFFF; + border-left-style: solid; + border-left-width: 6px; +} + +.admonitionblock > table td.icon { + font-size: 20px; + padding: 10px 15px !important; + text-align: left; + width: 60px; +} + +.admonitionblock > table td.content { + padding-left: 0px; +} + +/* Note Block */ +.admonitionblock td.icon .icon-note:before { + content: "\F05A"; + text-shadow: none; + color: #00B7FF; +} +.admonitionblock.note > table > tbody > tr { + border-left-color: #00B7FF; +} + +/* Tip Block */ +.admonitionblock td.icon .icon-tip:before { + content: "\F058"; + text-shadow: none; + color: #669900; +} +.admonitionblock.tip > table > tbody > tr { + border-left-color: #669900; +} + +/* Warning Block */ +.admonitionblock td.icon .icon-warning:before { + content: "\F06A"; + text-shadow: none; + color: #E67300; +} +.admonitionblock.warning > table > tbody > tr { + border-left-color: #E67300; +} + +/* Caution Block */ +.admonitionblock td.icon .icon-caution:before { + content: "\F071"; + text-shadow: none; + color: #D14124; +} +.admonitionblock.caution > table > tbody > tr { + border-left-color: #D14124; +} + +/* Important Block */ +.admonitionblock td.icon .icon-important:before { + content: "\F024"; + text-shadow: none; + color: #CC0000; +} +.admonitionblock.important > table > tbody > tr { + border-left-color: #CC0000; +} + +/*************************************************/ +/**************** Top Banner *****************/ +/*************************************************/ +.banner { + background-color: #717174; + z-index: 1000; +} + +#banner-digi, #banner-digi img { + height: 70px; +} + +#banner-digi img { + float: left; + padding: 15px 0px; + cursor: pointer; +} + +#banner-text { + color: #FFFFFF; + font-weight: bold; + font-size: 20px; + padding-top: 34px; + float: left; + margin-bottom: 0px; +} + +#banner-preliminary { + color: #FFFFFF; + font-size: 14px; + font-style: italic; + float: right; + margin-bottom: 0px; + text-align: right; +} + +/*************************************************/ +/****************** Footer *******************/ +/*************************************************/ +footer { + clear: both; + background-color: #717174; + margin: 50px 0px 0px 0px; +} + +footer .row { + margin-right: 0px; + margin-left: 0px; +} + +footer .links { + column-count: 3; + -webkit-column-count: 3; + text-align: left; + padding: 20px 0px; + padding-left: 20px; +} + +footer .links a { + display: inline-block; + width: 120%; + padding: 4px 5px; + color: white; + font-size: 14px; + line-height: 1.5em; +} + +footer .links a[href^="http://"]:after, +footer .links a[href^="https://"]:after { + content: none; +} + +footer .copyright { + font-size: 15px; + color: white; + padding: 25px 0px; + display: flex; + flex-wrap: wrap; + justify-content: flex-end; +} + +footer .copyright-info { + line-height: 1.4; + padding-top: 2px; +} + +footer .footer-icon { + padding-left: 20px; + padding-top: 8px; +} + +footer .footer-icon img { + height: 30px; +} + +/*This section is to make the footer sticky*/ +#main-container { + display: flex; + flex-direction: column; +} + +.container { + flex: 1 0 auto; +} + +footer { + flex-shrink: 0; +} + +.scrollup { + position: fixed; + bottom: 40px; + right: 40px; + display: none; + background: #84C361; + width: 60px; + height: 60px; + border-radius: 50px; + text-align: center; + z-index: 100; +} + +@media (max-width: 576px) { + .scrollup { + width: 40px; + height: 40px; + bottom: 20px; + right: 20px; + } +} + +.scrollup:focus { + outline: 0; +} + +.scrollup:hover { + opacity: 0.8; +} + +.scrollup img { + margin-top: 14px; +} + +@media (max-width: 576px) { + .scrollup img { + margin-top: 11px; + width: 18px; + height: 18px; + } +} + +/*************************************************/ +/************** Navigation bar ***************/ +/*************************************************/ +.navbar { + min-height: 40px; +} + +.navbar-inverse { + background-color: #DDDDDD; + border: none; +} + +.navbar-inverse .navbar-toggle:focus{ + background-color: transparent; +} + +.navbar-inverse .navbar-toggle:active, +.navbar-inverse .navbar-toggle:hover { + background-color: #84C361; +} + +.navbar-inverse .navbar-nav>li>a, +.navbar-inverse .navbar-brand { + color: #717174; +} + +.navbar-inverse .navbar-toggle { + border-color: #717174; +} + +.navbar-inverse .navbar-toggle .icon-bar { + background-color: #717174; +} + +.navbar-toggle { + margin-top: 3px; + margin-bottom: 3px; +} + +.navbar-brand { + height: 40px; + padding: 10px 15px; +} + +.navbar-inverse .navbar-nav > li > a { + margin-top: 0px; + padding: 8px 10px; +} + +.navbar-inverse .navbar-nav > li > a:visited, +.navbar-inverse .navbar-nav > li > a:active { + color: #717174; +} + +.navbar-inverse .navbar-nav > li > a:hover { + color: #00B7FF; +} + +#tg-sb-link { + margin-left: -5px; + padding-top: 8px; + height: 40px; +} + +@media (max-width: 1000px){ + .navbar-nav>li { + float: left; + } + + .navbar-nav { + float: right !important; + } + + .navbar-left, .navbar-right { + float: right !important; + } + + #search-input { + width: 16em; + } + + #tg-sb-toc { + max-width: none !important; + } +} + +/*************************************************/ +/************* General Container *************/ +/*************************************************/ +@media (min-width: 300px) { + /* All column types have the same with because with this resoulution only the + content is shown. We don't know what type of column it will be assigned, so + we set all of them to the same value to avoid problems. This is related to + the javascript in the toc.html file.*/ + .col-md-2 { + width: 290px; + } + .col-md-8 { + width: 290px; + } + .col-md-10 { + width: 290px; + } + .col-md-12 { + width: 290px; + } + + #banner-preliminary { + width: 100px; + margin-top: 10px; + } +} + +@media (min-width: 400px) { + /* All column types have the same with because with this resoulution only the + content is shown. We don't know what type of column it will be assigned, so + we set all of them to the same value to avoid problems. This is related to + the javascript in the toc.html file.*/ + .col-md-2 { + width: 380px; + } + .col-md-8 { + width: 380px; + } + .col-md-10 { + width: 380px; + } + .col-md-12 { + width: 380px; + } +} + +@media (min-width: 470px) { + /* All column types have the same with because with this resoulution only the + content is shown. We don't know what type of column it will be assigned, so + we set all of them to the same value to avoid problems. This is related to + the javascript in the toc.html file.*/ + .col-md-2 { + width: 450px; + } + .col-md-8 { + width: 450px; + } + .col-md-10 { + width: 450px; + } + .col-md-12 { + width: 450px; + } + #tg-sb-content .tab-panel .nav-tabs > li > a { + width: auto; + min-width: 125px; + max-width: 250px; + } +} + +/* Small devices (landscape phones, 576px and up) */ +@media (min-width: 576px) { + .container { + width: 550px; + } + /* All column types have the same with because with this resoulution only the + content is shown. We don't know what type of column it will be assigned, so + we set all of them to the same value to avoid problems. This is related to + the javascript in the toc.html file.*/ + .col-md-2 { + width: 100%; + } + .col-md-8 { + width: 100%; + } + .col-md-10 { + width: 100%; + } + .col-md-12 { + width: 100%; + } + #tg-sb-content .tab-panel .nav-tabs > li > a { + width: auto; + min-width: 125px; + max-width: 250px; + } +} + +/* Medium devices (tablets, 768px and up) */ +@media (min-width: 768px) { + .container { + width: 750px; + } + .controls > a { + height: 40px; + padding: 8px 30px; + } + .navbar>.container .navbar-brand, + .navbar>.container-fluid .navbar-brand { + margin-left: 0px; + } + .aa-input-search { + width: 115px; + } + .aa-dropdown-menu { + width: 180px; + } +} + +/* Large devices (desktops, 992px and up) */ +@media (min-width: 992px) { + .aa-input-search { + width: 262px; + } + .aa-dropdown-menu { + width: 360px; + } +} +@media (min-width: 993px) { + /* With big displays, set the different column types to the specific + values they should have.*/ + .col-md-2 { + width: 20%; + } + .col-md-8 { + width: 60%; + } + .col-md-10 { + width: 80%; + } + .col-md-12 { + width: 100%; + } + .container { + width: 960px; + } + #banner-preliminary { + width: 180px; + margin-top: 38px; + } +} + +@media (min-width: 1000px) { + .container { + width: 920px; + } +} + +@media (min-width: 1100px) { + .container { + width: 1000px; + } +} + +/* Extra large devices */ +@media (min-width: 1200px) { + .container { + width: 1100px; + } +} + +/* Extra extra large devices (large desktops, 1500px and up) */ +@media (min-width: 1500px) { + .container { + width: 1400px; + } +} + +.container { + max-width: 1500px; +} + +/*************************************************/ +/****************** Content ******************/ +/*************************************************/ +#tg-sb-content { + padding-left: 35px; + padding-right: 35px; +} + +/*************************************************/ +/****************** Sidebar ******************/ +/*************************************************/ +#tg-sb-sidebar, #tg-sb-toc { + padding-left: 0px; + padding-right: 0px; + max-width: 280px; +} + +ul#mysidebar { + border-right: 5px solid #DDDDDD; + width: 100%; + max-width: 300px; + margin-top: 10px; +} + +.sb-toc-title { + color: #8D8D8D; + margin-top: 10px; + margin-bottom: 0px; + padding: 0px; + font-size: 20px; +} + +.sb-toc-title > a { + color: #8D8D8D; +} + +.sb-toc-title > a:hover { + color: #717174; +} + +.nav li { + margin: 0px; +} + +/* First level (main folders)*/ +.nav li.sb-folders a { + padding-left: 10px; + margin: 0px; + background-color: transparent; + border: 0px; +} + +/* Rest of levels (even the nested ones)*/ +.nav li.sb-folders > ul li { + padding-left: 20px; + margin: 0px; + background-color: transparent; + border: 0px; +} + +.nav li.sb-folders a:hover, .nav li a.sb-section:hover, +.nav li a.sb-subsection:hover, .nav li.active a.sb-section:hover, +.nav li.active a.sb-subsection:hover { + background-color: #717174; + color: white; +} + +.nav li a.sb-section { + font-size: 14px; + padding-left: 10px; +} + +.nav li a.sb-subsection { + background-color: transparent; + font-size: 12px; + border: 0px; + padding-left: 20px; +} + +.nav .navbar-nav .navbar-right { + border: 0px; +} + +.nav li.active > a > span:after, +.nav li > a > span:after { + color: #717174; +} + +.nav li.active > a:hover > span:after, +.nav li > a:hover > span:after { + color: white; +} + +/*************************************************/ +/************* Table of Contents *************/ +/*************************************************/ +#toc { + border-bottom: 0px solid transparent; + padding: 10px 5px; +} + +div#toc ul li { + margin: 0px; + font-size: 90%; + list-style: none; +} + +div#toc ul { + background-color: transparent; + margin-bottom: 0px; + padding: 0px; +} + +div#toc > ul::before { + content: none; +} + +div#toc > .nav li > a { + color: #333; + border-left: 5px solid #DDDDDD; + background-color: transparent; + padding-top: 5px; + padding-bottom: 5px; +} + +div#toc > .nav li > a:hover { + border-left: 5px solid #717174; +} + +div#toc > .nav > li.active > a { + border-left: 5px solid #84C361; + font-weight: bold; +} + +div#toc > .nav > li.active > a:hover { + border-left: 5px solid #717174; + font-weight: bold; +} + +div#toc > .nav li > a:active { + text-decoration: none; +} + +div#toc > .nav ul li a { + border-top: 0px; +} + +div#toc ul li ul li::before { + content: none; +} + +div#toc ul li ul { + padding-left: 0px; +} + +div#toc ul li ul li a { + padding-left: 25px; +} + +div#toc ul li ul li.active a { + border-left: 5px solid #717174; + font-weight: bold; +} + +div#toc ul li ul, div#toc ul li ul li { + margin: 0px; +} + +/* Remove background color and borders when rendering code with line numbers. */ +.pygments table.pyhltable tbody tr td { + border: 0px; +} +.pygments table.pyhltable tbody tr { + background-color: transparent; +} + +/*************************************************/ +/*************** Platform topic **************/ +/*************************************************/ +#topic-container { + border-bottom: 0px solid transparent; + padding: 10px; +} + +#topic-platform { + margin-top: 20px; + margin-bottom: 20px; + margin-right: 10px; + background-color: #EEEEEE; +} + +.topic-platform-title { + font-weight: bold; + color: #646466; + margin-bottom: 10px; + float: left; + max-width: 80%; +} + +#topic-platform ul { + list-style: none; + margin-bottom: 0px; + margin-left: 0px; +} + +#topic-platform li::before { + content: "•"; + color: #646466; + margin-right: 10px; + font-size: 1.4em; + line-height: 0px; +} + +#help { + float: left; + margin-top: 4px; + margin-right: 6px; +} + +#topic-container .topic-list { + clear: both; + padding: 0px 10px; +} + +/*************************************************/ +/*********** Menu navigation TOC **************/ +/*************************************************/ +.navbar-inverse .navbar-collapse, .navbar-inverse .navbar-form { + border-color: #646466 !important; + background-color: #DDDDDD; + overflow: hidden; +} + +.menu-nav-title { + color: #646466; + margin: 15px 0px; + padding: 0px; + padding-left: 20px; + font-size: 24px; + width: fit-content; +} + +.menu-nav-title a:hover { + color: #00B7FF; +} + +.menu-nav-contents { + background-color: #EEEEEE; +} + +.menu-nav a { + color: #646466; + display: block; + outline: none; + text-decoration: none; +} + +.menu-nav ul { + padding: 0; + margin: 0px; +} + +.menu-nav li, .menu-nav li li { + margin: 0px; +} + +.menu-nav, .menu-nav ul, .menu-nav li { + list-style: none; +} + +.menu-nav li.sb-folders a { + padding-left: 60px; + font-size: 18px; + margin: 0px; + background-color: transparent; + border: 0px; + padding-top: 2px; + padding-bottom: 2px; +} + +.menu-nav-contents li.sb-folders a, +.menu-nav-contents li.sb-folders > ul li { + padding-left: 30px; + margin: 0px; + background-color: transparent; + border: 0px; +} + +.nav li.active > a, +.menu-nav-contents li.active > a { + color: #333; + font-weight: bold; + border-top: 1px; + border-style: solid; +} + +.nav li.super-active > a, +.menu-nav-contents li.super-active > a { + background: rgba(132, 195, 97, .25); +} + +.nav li.active > a { + border-color: white; +} + +.menu-nav-contents li.active > a { + border-color: #EEEEEE; +} + +.menu-nav li.sb-folders a:hover { + background-color: #8D8D8D; + color: white; +} + +.menu-nav li .sb-section { + background-color: #DDDDDD; + color: #646466; + font-size: 24px; + border: 0px; + padding: 5px 0px; + padding-left: 40px; +} + +.menu-nav li .sb-subsection { + background-color: #EEEEEE; + font-size: 22px; + border: 0px; + padding-left: 60px; +} + +/*************************************************/ +/************** Navigation bar ***************/ +/*************************************************/ +.navbar-collapse { + margin: 0px; + padding: 0px; +} + +.navbar-inverse { + border: 0px; +} + +.navbar-brand > img { + width: 24px; + height: 24px; +} + +.controls .control-icon-selected { + background-color: #84C361; + height: 5px; + margin-top: 3px; + margin-left: -10px; + margin-right: -10px; + vertical-align: bottom; +} + +.controls > a { + float: left; + padding: 8px 10px; + outline 0; +} + +.controls a.navbar-brand { + font-size: 16px; +} + +.controls { + margin-right: 10px; + margin-left: 10px; + height: 40px; + float: left; +} + +@media (max-width: 768px) { + .controls { + margin-left: 0px; + } +} + +.controls a:link, .controls a:visited, .controls a:active { + color: #717174; +} + +.controls a:hover, .controls a.navbar-brand:hover { + color: #00B7FF; +} + +#search { + margin: 10px 10px; +} + +/*************************************************/ +/***** Genaral purpose show/hide classes ******/ +/*************************************************/ +.display-on { + display: block; +} +.display-off { + display: none; +} + +/*************************************************/ +/******************** TABS *******************/ +/*************************************************/ +#tg-sb-content .tab-panel { + margin-bottom: 20px; + margin-top: 25px; +} + +#tg-sb-content .tab-panel .nav-tabs { + margin-bottom: 0px; + border-bottom: 1px solid #ddd; +} + +#tg-sb-content .tab-panel .nav-tabs > li { + margin: 0px; + margin-bottom: -1px; + margin-right: 5px; +} + +#tg-sb-content .tab-panel .nav-tabs > li > a { + background-color: #ddd; + color: #646466; + border: none; + border-bottom: 1px solid #ddd; +} + +#tg-sb-content .tab-panel .nav-tabs > li > a:hover { + background-color: #646466; + color: white; + border-bottom: 1px solid #646466; +} + +#tg-sb-content .tab-panel .nav-tabs > li.active > a, +#tg-sb-content .tab-panel .nav-tabs > li.active > a:hover { + color: #646466; + background-color: white; + font-weight: bold; + border: 1px solid #ddd; + border-bottom-color: transparent; +} + +#tg-sb-content .tab-panel .tab-content { + padding: 10px; + background-color: transparent; + border-left: 1px solid #ddd; + border-bottom: 1px solid #ddd; + border-right: 1px solid #ddd; + -webkit-box-shadow: 2px 2px 4px #e0e0dc; + box-shadow: 2px 2px 4px #e0e0dc; +} + +.tab-content > .exampleblock .content { + background-color: white; + border: none; + -webkit-box-shadow: none; + box-shadow: none; +} + +/********************************************************/ +/******************* Instant Search *****************/ +/********************************************************/ + +.aa-input-container { + display: inline-block; + position: relative; +} + +.aa-input-search { + padding: 6px 26px 6px 10px; + border: 2px solid #DDDDDD; + border-radius: 4px; + -webkit-transition: .2s; + transition: .2s; + font-size: 13px; + box-sizing: border-box; + color: #333; + -webkit-appearance: none; + -moz-appearance: none; + appearance: none; + margin-top: 3px; +} + +.aa-input-search::-webkit-search-decoration, +.aa-input-search::-webkit-search-cancel-button, +.aa-input-search::-webkit-search-results-button, +.aa-input-search::-webkit-search-results-decoration { + display: none; +} + +.aa-input-search:focus { + outline: 0; + border-color: #84C361; +} + +input::placeholder { /* Chrome, Firefox, Opera, Safari 10.1+ */ + color: #999999; + opacity: 1; /* Firefox */ +} +input::-webkit-input-placeholder { /* WebKit, Blink, Edge */ + color: #999999; +} +input:-moz-placeholder { /* Mozilla Firefox 4 to 18 */ + color: #999999; + opacity: 1; +} +input::-moz-placeholder { /* Mozilla Firefox 19+ */ + color: #999999; + opacity: 1; +} +input:-ms-input-placeholder { /* Internet Explorer 10-11 */ + color: #999999; +} +input::-ms-input-placeholder { /* Microsoft Edge */ + color: #999999; +} + +.aa-input-icon { + height: 16px; + width: 16px; + position: absolute; + top: 20px; + right: 16px; + -webkit-transform: translateY(-50%); + transform: translateY(-50%); + fill: #CCCCCC; +} + +.aa-hint { + color: #DDDDDD; +} + +.aa-dropdown-menu { + background-color: white; + border: 2px solid rgba(228, 228, 228, 0.6); + border-top-width: 1px; + margin-top: 2px; + font-size: 13px; + border-radius: 4px; + box-sizing: border-box; +} + +.aa-suggestion { + border-top: 1px solid rgba(228, 228, 228, 0.6); + cursor: pointer; + -webkit-transition: .2s; + transition: .2s; + display: -webkit-box; + display: -ms-flexbox; + display: flex; + -webkit-box-pack: justify; + -ms-flex-pack: justify; + justify-content: space-between; + -webkit-box-align: center; + -ms-flex-align: center; + align-items: center; +} + +.aa-suggestion .suggestion-link { + padding: 12px; + background-color: transparent; + width: 100%; +} + +.aa-suggestion .suggestion-link:after { + content: ""; +} + +.aa-suggestion .suggestion-link:hover, +.aa-cursor .suggestion-link { + background-color: rgba(132, 195, 97, .25) !important; +} + +.aa-suggestion .suggestion-link > span:first-child, +#show-more-link { + color: #333; + font-size: 14px; + display: block; +} + +#show-more-link { + text-align: center; + font-size: 16px; +} + +.aa-suggestion .suggestion-link > span:last-child { + color: #999999; + text-align: right; + overflow: hidden; + text-overflow: ellipsis; + height: 200px; +} + +.aa-suggestion .suggestion-link > span:last-child p { + font-size: 13px; +} + +.aa-suggestion .suggestion-link > span:first-child em, +.aa-suggestion .suggestion-link > span:last-child em { + font-weight: 700; + font-style: normal; + background-color: yellow; + padding: 2px 0 2px 2px; +} + +/********************************************************/ +/******************* Search Results *****************/ +/********************************************************/ + +/* INPUT */ +header { + position: relative; + height: 80px; + margin-top: 40px; +} + +/* INPUT */ +header .aa-input-search { + width: 600px; + padding: 15px 30px 15px 15px; + border: 2px solid #DDDDDD; + border-radius: 4px; + -webkit-transition: .2s; + transition: .2s; + font-size: 18px; + box-sizing: border-box; + -webkit-appearance: none; + -moz-appearance: none; + appearance: none; +} + +header .aa-input-icon { + height: 20px; + width: 20px; + position: absolute; + top: 50%; + right: 16px; + -webkit-transform: translateY(-50%); + transform: translateY(-50%); + fill: #CCCCCC; +} + +/* HITS */ +#hits { + margin: 4px 0; + padding: 10px 0; + border-top: 2px solid #eee; +} + +.hit { + font-size: 0; + padding: 15px 0; + border-bottom: 1px solid #eee; +} + +.hit-name { + margin: 0; +} + +.search-item { + font-size: 14px; + font-weight: 300; + display: inline-block; + vertical-align: top; +} + +.search-item em { + font-style: normal; + background-color: yellow; +} + +.search-item p { + font-size: 13px; +} + +/* PAGINATION */ +#pagination { + margin-top: 60px; +} + +#pagination ul { + font-size: 0; + list-style-type: none; + text-align: center; +} + +#pagination li { + font-size: 14px; + display: inline; +} +#pagination a { + padding: 8px 12px; + text-decoration: none; + color: #000; + border: 1px solid #eee; +} + +#pagination a:hover { + background: #f5f5f5; +} + +#pagination li:first-child a { + border-top-left-radius: 4px; + border-bottom-left-radius: 4px; +} + +#pagination li:last-child a { + border-right: 1px solid #eee; + border-top-right-radius: 4px; + border-bottom-right-radius: 4px; +} + +#pagination li.ais-pagination--item__active a { + color: white; + border-color: #84C361; + background: #84C361; +} + +#pagination li.ais-pagination--item__active a:hover { + cursor: default; +} + +#pagination li.ais-pagination--item__disabled a { + cursor: not-allowed; +} + +#pagination li.ais-pagination--item__disabled a:hover { + background: none; +} + +/* NO RESULTS */ +.no-results #pagination, .no-results #sort-by, .no-results #stats, .no-results #facets { + display: none; +} + +.ais-hits__empty { + font-size: 16px; + font-weight: bold; + padding-top: 10px; +} + +/*SEARCH RESULTS*/ +a.clear-all { + font-size: 12px; + line-height: 1; + display: inline-block; + margin: 10px; + padding: 8px 12px; + text-decoration: none; + color: black; + border: 2px solid #ddd; + border-radius: 4px; +} + +a.clear-all:hover { + transition: border-color .3s ease-in; + border-color: #999; +} + +.search-item { + padding-top: 15px; + padding-bottom: 15px; + line-height: 25px; +} + +.search-item .search-title a { + font-size: 18px; +} + +.search-item .search-title a:hover { + text-decoration: underline; +} + +.search-item .search-title a:after { + content: ""; +} + +.search-item .search-link { + color: #CCCCCC; + font-size: 14px; +} + +/********************************************************/ +/****************** Version selector ****************/ +/********************************************************/ + +#version-container-toc { + margin-top: 10px; + background-color: #DDDDDD; + padding: 5px; + text-align: right; + margin-bottom: -10px; +} + +#version-container-toc span { + font-size: 14px; +} + +#version-container-toc select { + width: auto; + font-size: 14px; +} + +#version-container-nav { + margin-top: 10px; + background-color: #DDDDDD; + padding: 5px; + text-align: right; +} + +#version-container-nav span { + font-size: 16px; +} + +#version-container-nav select { + width: auto; + font-size: 14px; +} + +#version-container-nav a { + display: unset; +} diff --git a/meta-digi-dey/dynamic-layers/webkit/recipes-browser/digi-webkit-examples/digi-webkit-examples/index.html b/meta-digi-dey/dynamic-layers/webkit/recipes-browser/digi-webkit-examples/digi-webkit-examples/index.html new file mode 100644 index 000000000..8a60d920f --- /dev/null +++ b/meta-digi-dey/dynamic-layers/webkit/recipes-browser/digi-webkit-examples/digi-webkit-examples/index.html @@ -0,0 +1,29 @@ + + +Digi WebKit examples + + + +

    Digi WebKit examples

    +

    This page contains a series of examples that showcase some of the main +features of the WPE WebKit.

    + +

    The main focus of this web engine is to leverage the hardware +capabilities of embedded systems to make browsing as efficient and as +lightweight as possible. You can find more information about the WPE WebKit at +https://wpewebkit.org/.

    + +

    When running an example, you can always come back to this page by executing +"cogctl previous" in the command line.

    + +

    WebGL examples

    + +

    WPE WebKit supports WebGL, a JavaScript library that allows +browsers to use the system's GPU to render 2D and 3D graphics. The following +examples have been obtained from +https://webglsamples.org/:

    + +
      ##WEBGL_SAMPLE_LIST##
    + + + diff --git a/meta-digi-dey/dynamic-layers/webkit/recipes-browser/digi-webkit-examples/webglsamples_git.bb b/meta-digi-dey/dynamic-layers/webkit/recipes-browser/digi-webkit-examples/webglsamples_git.bb index 6ed09f180..05293f767 100644 --- a/meta-digi-dey/dynamic-layers/webkit/recipes-browser/digi-webkit-examples/webglsamples_git.bb +++ b/meta-digi-dey/dynamic-layers/webkit/recipes-browser/digi-webkit-examples/webglsamples_git.bb @@ -13,40 +13,7 @@ SRC_URI = "${WEBGL_SAMPLES_SRC};branch=${SRCBRANCH}" SRCREV = "dc4428bdc6ef2177f71d9e7bab164c43f9e29302" S = "${WORKDIR}/git" -# By default, use the Busybox HTTP daemon as the webserver for the examples. -WEBSERVER_PACKAGE ?= "busybox-httpd" -WEBSERVER_ROOT ?= "srv/www" - -# List of samples we want accesible via the landing page -WEBGL_SAMPLES = " \ - aquarium \ - blob \ - dynamic-cubemap \ - electricflower \ - field \ - multiple-views \ - spacerocks \ - toon-shading \ -" -# Folders containing elements required by the samples we've selected -WEBGL_SAMPLE_DEPS = " \ - colorpicker \ - css \ - fishtank \ - fonts \ - gradient-editor \ - images \ - jquery-ui-1.8.2.custom \ - js \ - lots-o-objects \ - shared \ - tdl \ -" - -WEBGL_REQUIRED = " \ - ${WEBGL_SAMPLES} \ - ${WEBGL_SAMPLE_DEPS} \ -" +require digi-webkit-examples.inc # The package contains static webpages, no need to configure or compile do_configure[noexec] = "1" @@ -65,7 +32,3 @@ do_install() { -exec install -Dm 644 "{}" "${D}/${WEBSERVER_ROOT}/{}" \; done } - -FILES_${PN} = "/${WEBSERVER_ROOT}/*" - -PACKAGES = "${PN}" From 1d58cb6c7f6c6edd023b7a0d346f51fb7a7eb132 Mon Sep 17 00:00:00 2001 From: Gabriel Valcazar Date: Wed, 9 Dec 2020 17:09:51 +0100 Subject: [PATCH 42/57] packagegroup-dey-webkit: include digi-webkit-examples by default While at it, change cog's home page to the examples' landing page. https://jira.digi.com/browse/DEL-7314 https://jira.digi.com/browse/DEL-7339 Signed-off-by: Gabriel Valcazar --- .../webkit/recipes-browser/cog/cog_0.7.1.bbappend | 2 +- .../recipes-browser/packagegroups/packagegroup-dey-webkit.bb | 3 ++- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/meta-digi-dey/dynamic-layers/webkit/recipes-browser/cog/cog_0.7.1.bbappend b/meta-digi-dey/dynamic-layers/webkit/recipes-browser/cog/cog_0.7.1.bbappend index c3aea60c5..954f8d9f8 100644 --- a/meta-digi-dey/dynamic-layers/webkit/recipes-browser/cog/cog_0.7.1.bbappend +++ b/meta-digi-dey/dynamic-layers/webkit/recipes-browser/cog/cog_0.7.1.bbappend @@ -9,4 +9,4 @@ SRC_URI_append = " \ file://0004-cog-platform-fdo-always-use-fullscreen-mode.patch \ " -EXTRA_OECMAKE += "-DCOG_HOME_URI=www.digi.com" +EXTRA_OECMAKE += "-DCOG_HOME_URI=http://127.0.0.1/" diff --git a/meta-digi-dey/dynamic-layers/webkit/recipes-browser/packagegroups/packagegroup-dey-webkit.bb b/meta-digi-dey/dynamic-layers/webkit/recipes-browser/packagegroups/packagegroup-dey-webkit.bb index 51810b718..3376ddf22 100644 --- a/meta-digi-dey/dynamic-layers/webkit/recipes-browser/packagegroups/packagegroup-dey-webkit.bb +++ b/meta-digi-dey/dynamic-layers/webkit/recipes-browser/packagegroups/packagegroup-dey-webkit.bb @@ -6,8 +6,9 @@ SUMMARY = "WebKit packagegroup for DEY image" PACKAGE_ARCH = "${MACHINE_ARCH}" inherit packagegroup -# Include WPE WebKit and launcher (cog) +# Include WPE WebKit, launcher (cog) and examples RDEPENDS_${PN} += " \ cog \ + digi-webkit-examples \ wpewebkit \ " From 0fd7e03fc8baba020aad756e015727689ebcf230 Mon Sep 17 00:00:00 2001 From: Gabriel Valcazar Date: Wed, 9 Dec 2020 17:11:59 +0100 Subject: [PATCH 43/57] digi-webkit-examples: add recipe for video examples This recipe installs some videos that can be used to test the WebKit's hardware acceleration during video decoding. Modify the landing page to be able to access these videos. https://jira.digi.com/browse/DEL-7314 https://jira.digi.com/browse/DEL-7339 Signed-off-by: Gabriel Valcazar --- .../digi-webkit-examples.bb | 20 +++++++++++++ .../digi-webkit-examples.inc | 6 ++++ .../digi-webkit-examples/index.html | 9 ++++++ .../video-examples_0.1.bb | 28 +++++++++++++++++++ 4 files changed, 63 insertions(+) create mode 100644 meta-digi-dey/dynamic-layers/webkit/recipes-browser/digi-webkit-examples/video-examples_0.1.bb diff --git a/meta-digi-dey/dynamic-layers/webkit/recipes-browser/digi-webkit-examples/digi-webkit-examples.bb b/meta-digi-dey/dynamic-layers/webkit/recipes-browser/digi-webkit-examples/digi-webkit-examples.bb index c5048c89b..2225dd129 100644 --- a/meta-digi-dey/dynamic-layers/webkit/recipes-browser/digi-webkit-examples/digi-webkit-examples.bb +++ b/meta-digi-dey/dynamic-layers/webkit/recipes-browser/digi-webkit-examples/digi-webkit-examples.bb @@ -16,10 +16,14 @@ require digi-webkit-examples.inc RDEPENDS_${PN} = " \ cog \ + video-examples \ webglsamples \ ${WEBSERVER_PACKAGE} \ " +VPU_NOTE = "This means that, if the video format is supported by the VPU, WebKit will use the VPU to decode the video." +VPU_NOTE_ccimx8mn = "Since the ConnectCore 8M Nano doesn't have a VPU, WebKit will decode the videos using gstreamer software." + # The package contains static webpages, no need to configure or compile do_configure[noexec] = "1" do_compile[noexec] = "1" @@ -41,4 +45,20 @@ do_install() { SAMPLE_LIST="${SAMPLE_LIST}\n" sed -i s,##WEBGL_SAMPLE_LIST##,"${SAMPLE_LIST}",g ${D}/${WEBSERVER_ROOT}/index.html + + # Add a note regarding the video decoding process, which depends on the + # platform. + sed -i s/##VPU_NOTE##/"${VPU_NOTE}"/g ${D}/${WEBSERVER_ROOT}/index.html + + # Use the same method to dynamically generate the list of video + # examples. + SAMPLE_LIST="" + ENTRY='
  • _name_

  • ' + for sample in ${VIDEO_SAMPLES}; do + SAMPLE_LIST="${SAMPLE_LIST}\n$(echo ${ENTRY} | sed s/_name_/${sample}/g)" + done + + SAMPLE_LIST="${SAMPLE_LIST}\n" + + sed -i s,##VIDEO_SAMPLE_LIST##,"${SAMPLE_LIST}",g ${D}/${WEBSERVER_ROOT}/index.html } diff --git a/meta-digi-dey/dynamic-layers/webkit/recipes-browser/digi-webkit-examples/digi-webkit-examples.inc b/meta-digi-dey/dynamic-layers/webkit/recipes-browser/digi-webkit-examples/digi-webkit-examples.inc index 0289cdcc6..8638a1950 100644 --- a/meta-digi-dey/dynamic-layers/webkit/recipes-browser/digi-webkit-examples/digi-webkit-examples.inc +++ b/meta-digi-dey/dynamic-layers/webkit/recipes-browser/digi-webkit-examples/digi-webkit-examples.inc @@ -35,6 +35,12 @@ WEBGL_REQUIRED = " \ ${WEBGL_SAMPLE_DEPS} \ " +# List of video samples +VIDEO_SAMPLES = " \ + big_buck_bunny.mov \ + big_buck_bunny.webm \ +" + # All packages involved in the webkit examples install their files in the # webserver directory FILES_${PN} = "/${WEBSERVER_ROOT}/*" diff --git a/meta-digi-dey/dynamic-layers/webkit/recipes-browser/digi-webkit-examples/digi-webkit-examples/index.html b/meta-digi-dey/dynamic-layers/webkit/recipes-browser/digi-webkit-examples/digi-webkit-examples/index.html index 8a60d920f..5e49dbb68 100644 --- a/meta-digi-dey/dynamic-layers/webkit/recipes-browser/digi-webkit-examples/digi-webkit-examples/index.html +++ b/meta-digi-dey/dynamic-layers/webkit/recipes-browser/digi-webkit-examples/digi-webkit-examples/index.html @@ -25,5 +25,14 @@ examples have been obtained from
      ##WEBGL_SAMPLE_LIST##
    +

    Video playback examples

    + +

    WPE WebKit uses gstreamer for multimedia playback. +##VPU_NOTE##

    + +

    You can test video playback with different formats using the links +below:

    + +
      ##VIDEO_SAMPLE_LIST##
    diff --git a/meta-digi-dey/dynamic-layers/webkit/recipes-browser/digi-webkit-examples/video-examples_0.1.bb b/meta-digi-dey/dynamic-layers/webkit/recipes-browser/digi-webkit-examples/video-examples_0.1.bb new file mode 100644 index 000000000..b0ee5f197 --- /dev/null +++ b/meta-digi-dey/dynamic-layers/webkit/recipes-browser/digi-webkit-examples/video-examples_0.1.bb @@ -0,0 +1,28 @@ +# Copyright (C) 2020 Digi International. + +SUMMARY = "Short videos to demonstrate video playback on the WPE WebKit" +DESCRIPTION = "This package contains fragments of the short film 'Big Buck Bunny', which are used to demonstrate how WebKit makes use of hardware acceleration for video decoding" +HOMEPAGE = "https://peach.blender.org/" +LICENSE = "CC-BY-3.0" +LIC_FILES_CHKSUM = "file://${COMMON_LICENSE_DIR}/CC-BY-3.0;md5=dfa02b5755629022e267f10b9c0a2ab7" + +SRC_URI = "${DIGI_PKG_SRC}/${BPN}-${PV}.tar.gz" + +SRC_URI[md5sum] = "d22cc0fa20fde187455b27a799d2f9e6" +SRC_URI[sha256sum] = "97389f33d98c52d4311117366f0aa8dc78d00f51a787697af349de4668ccdbf6" + +S = "${WORKDIR}/${PN}-${PV}" + +require digi-webkit-examples.inc + +# The package contains video files, no need to configure or compile +do_configure[noexec] = "1" +do_compile[noexec] = "1" + +do_install() { + install -d ${D}/${WEBSERVER_ROOT}/videos + + for sample in ${VIDEO_SAMPLES}; do + install -m 644 ${S}/${sample} ${D}/${WEBSERVER_ROOT}/videos + done +} From 142c1e2fcf1908ee4f2f2a9f65fb96cb851009f2 Mon Sep 17 00:00:00 2001 From: Gabriel Valcazar Date: Wed, 9 Dec 2020 17:14:57 +0100 Subject: [PATCH 44/57] wpewebkit: remove qtwpe from PACKAGECONFIG The Qt WPE plugin has an implicit dependency with libgbm, which is only available on i.MX8 platforms. Also, it pulls in several Qt dependencies, increasing the total rootfs image size by about 50MiB. Remove said plugin to completely separate Qt and WebKit functionality. https://jira.digi.com/browse/DEL-7339 Signed-off-by: Gabriel Valcazar --- .../recipes-browser/wpewebkit/wpewebkit_2.28.1.bbappend | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/meta-digi-dey/dynamic-layers/webkit/recipes-browser/wpewebkit/wpewebkit_2.28.1.bbappend b/meta-digi-dey/dynamic-layers/webkit/recipes-browser/wpewebkit/wpewebkit_2.28.1.bbappend index 8e769e292..3bd4f2170 100644 --- a/meta-digi-dey/dynamic-layers/webkit/recipes-browser/wpewebkit/wpewebkit_2.28.1.bbappend +++ b/meta-digi-dey/dynamic-layers/webkit/recipes-browser/wpewebkit/wpewebkit_2.28.1.bbappend @@ -4,6 +4,10 @@ FILESEXTRAPATHS_prepend := "${THISDIR}/${BPN}:" SRC_URI_append_ccimx8x = " file://0001-Use-imxvideoconvert_g2d-plugin-in-gstreamer-pipeline.patch" +# The Qt WPE plugin depends on libgbm, which isn't available for i.MX6 +# platforms. It also pulls in some fairly large Qt dependencies, so remove it. +PACKAGECONFIG_remove = "qtwpe" + # We can't build the WebKit with fb images, so force wayland as a required # distro feature. inherit distro_features_check From eb76c33166ae0837ef89af4622f6950d2c1e91cb Mon Sep 17 00:00:00 2001 From: Gonzalo Ruiz Date: Wed, 16 Dec 2020 14:26:17 +0100 Subject: [PATCH 45/57] trustfence-cst: build CST using libcrypto from SDK CST was being built linking to the openssl libcrypto library from the host. When the openssl version in the host didn't match the version in the SDK, the SDK build failed like this: Error: Problem 1: package nativesdk-packagegroup-sdk-host-1.0-r12.0.x86_64_nativesdk requires nativesdk-trustfence-cst, but none of the providers can be installed - conflicting requests - nothing provides libcrypto.so.1.0.0()(64bit) needed by nativesdk-trustfence-cst-3.3.1-r0.0.x86_64_nativesdk - nothing provides libcrypto.so.1.0.0(OPENSSL_1.0.0)(64bit) needed by nativesdk-trustfence-cst-3.3.1-r0.0.x86_64_nativesdk - nothing provides libcrypto.so.1.0.0(OPENSSL_1.0.1)(64bit) needed by nativesdk-trustfence-cst-3.3.1-r0.0.x86_64_nativesdk Problem 2: package nativesdk-packagegroup-qt5-toolchain-host-1.0-r0.0.x86_64_nativesdk requires nativesdk-packagegroup-sdk-host, but none of the providers can be installed - package nativesdk-packagegroup-sdk-host-1.0-r12.0.x86_64_nativesdk requires nativesdk-trustfence-cst, but none of the providers can be installed - conflicting requests - nothing provides libcrypto.so.1.0.0()(64bit) needed by nativesdk-trustfence-cst-3.3.1-r0.0.x86_64_nativesdk - nothing provides libcrypto.so.1.0.0(OPENSSL_1.0.0)(64bit) needed by nativesdk-trustfence-cst-3.3.1-r0.0.x86_64_nativesdk - nothing provides libcrypto.so.1.0.0(OPENSSL_1.0.1)(64bit) needed by nativesdk-trustfence-cst-3.3.1-r0.0.x86_64_nativesdk Fix that by adding the native dependencies include and lib folders to the CST build. Also add openssl-native as a dependency for the SDK build, otherwise it wont link to the SDK libcrypto library. Additionally, to allow running CST in a host machine where the openssl version does not match the version in the SDK, libcrypto library is statically linked. https://jira.digi.com/browse/DEL-7346 Signed-off-by: Gonzalo Ruiz (cherry picked from commit a95b3ad60252f636dea9edca8d83fed34d5a67a7) --- .../trustfence-cst/trustfence-cst.inc | 7 ++++- ...7-Makefile-statically-link-libcrypto.patch | 27 +++++++++++++++++++ 2 files changed, 33 insertions(+), 1 deletion(-) create mode 100644 meta-digi-arm/recipes-bsp/trustfence-cst/trustfence-cst/0007-Makefile-statically-link-libcrypto.patch diff --git a/meta-digi-arm/recipes-bsp/trustfence-cst/trustfence-cst.inc b/meta-digi-arm/recipes-bsp/trustfence-cst/trustfence-cst.inc index dae46cd48..e7e038103 100644 --- a/meta-digi-arm/recipes-bsp/trustfence-cst/trustfence-cst.inc +++ b/meta-digi-arm/recipes-bsp/trustfence-cst/trustfence-cst.inc @@ -10,7 +10,9 @@ DEPENDS = "openssl byacc flex" # Explicitly add byacc-native as a dependency when building the package for the # SDK, otherwise, it won't get installed in the sysroot, causing a compilation # error. -DEPENDS_append_class-nativesdk = " byacc-native" +# Explicitly add openssl-native for the SDK build to correctly link to the +# openssl libraries in the native dependencies folder. +DEPENDS_append_class-nativesdk = " byacc-native openssl-native" SRC_URI = " \ ${@oe.utils.conditional('TRUSTFENCE_SIGN', '1', 'file://cst-${PV}.tgz', '', d)} \ @@ -20,6 +22,7 @@ SRC_URI = " \ file://0004-hab4_pki_tree.sh-usa-a-random-password-for-the-defau.patch \ file://0005-ahab_pki_tree.sh-automate-script.patch \ file://0006-ahab_pki_tree.sh-use-a-random-password-for-the-defau.patch \ + file://0007-Makefile-statically-link-libcrypto.patch \ " # Usually local files (with file:// protocol) are not checked for @@ -36,6 +39,8 @@ python() { S = "${WORKDIR}/cst-${PV}/" do_compile() { + export LDLIBPATH=-L${WORKDIR}/recipe-sysroot-native/usr/lib + export COPTIONS=-I${WORKDIR}/recipe-sysroot-native/usr/include cd ${S}/code/cst oe_runmake OSTYPE=linux64 clean oe_runmake OSTYPE=linux64 rel_bin diff --git a/meta-digi-arm/recipes-bsp/trustfence-cst/trustfence-cst/0007-Makefile-statically-link-libcrypto.patch b/meta-digi-arm/recipes-bsp/trustfence-cst/trustfence-cst/0007-Makefile-statically-link-libcrypto.patch new file mode 100644 index 000000000..8cdde4006 --- /dev/null +++ b/meta-digi-arm/recipes-bsp/trustfence-cst/trustfence-cst/0007-Makefile-statically-link-libcrypto.patch @@ -0,0 +1,27 @@ +From: Gonzalo Ruiz +Date: Tue, 15 Dec 2020 17:01:45 +0100 +Subject: [PATCH] Makefile: statically link libcrypto + +Statically link libcrypto so the host machine does not require to have +installed the same openssl version that was used to build the binaries. + +This requires dynamically linking the libpthread and libdl libraries. + +Signed-off-by: Gonzalo Ruiz +--- + code/cst/code/build/make/gcc.mk | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/code/cst/code/build/make/gcc.mk b/code/cst/code/build/make/gcc.mk +index 0394f5a..cc57f6b 100755 +--- a/code/cst/code/build/make/gcc.mk ++++ b/code/cst/code/build/make/gcc.mk +@@ -28,7 +28,7 @@ COPTIONS += -std=c99 -D_POSIX_C_SOURCE=200809L -Wall -Werror -pedantic -fPIC -g + #============================================================================== + LDOPTIONS += -g + +-LDLIBS := -lcrypto ++LDLIBS := -Wl,-Bstatic -lcrypto -Wl,-Bdynamic -lpthread -ldl + + # Archiver flags + #============================================================================== From 85e3325e75aada3e0c2116373d2bd92408ca14f1 Mon Sep 17 00:00:00 2001 From: Gonzalo Ruiz Date: Fri, 18 Dec 2020 17:15:56 +0100 Subject: [PATCH 46/57] firmware-qualcomm: Add CTL tables to CC8MN US BDF Add Compliance Test Limits (CTL) information for FCC, CE and TELEC certifications to the CC8MN US Board Data File. The rest of the file (calibration, target power levels, etc.) remains intact. Updated file: - bdwlan30_US.bin (MD5SUM: f9600f7bf4d601494b9bbe1ccbe94d6a) https://jira.digi.com/browse/DEL-7359 Signed-off-by: Gonzalo Ruiz --- .../ccimx8mn/bdwlan30_US.bin | Bin 8124 -> 8124 bytes 1 file changed, 0 insertions(+), 0 deletions(-) diff --git a/meta-digi-arm/recipes-bsp/firmware-qualcomm/firmware-qualcomm/ccimx8mn/bdwlan30_US.bin b/meta-digi-arm/recipes-bsp/firmware-qualcomm/firmware-qualcomm/ccimx8mn/bdwlan30_US.bin index 468e69e2b57ff06bef1a335eb76284af89ab59fc..402a1d22cfba4318b073d841fb768f4c1f65788b 100644 GIT binary patch delta 255 zcmdmEzsH_skGxRoMwS8&4~Yl~2^ba&6B7fmVYEVmf&w}g2oMke$-~sZ=*@=wER35E za7OUehlqrPh=>45DDA<)0Yn@eEKq+)R@V7&#a3kzxe^&=V@) delta 255 zcmdmEzsH_skGxRnMwS8&51Ser8*1RqhWspyn-6eC@YUDY)Bp_yl5iSq0ni=@Ko Date: Fri, 18 Dec 2020 17:11:11 +0100 Subject: [PATCH 47/57] trustfence-cst: fetch cst tarball from Digi FTP Since cst-3.3.1 is now distributed with a BSD-3-Clause license, it is allowed to distribute its source code from the Digi FTP. Fetch the tarball from that location. Signed-off-by: Gonzalo Ruiz --- .../recipes-bsp/trustfence-cst/trustfence-cst.inc | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/meta-digi-arm/recipes-bsp/trustfence-cst/trustfence-cst.inc b/meta-digi-arm/recipes-bsp/trustfence-cst/trustfence-cst.inc index e7e038103..88b3ca832 100644 --- a/meta-digi-arm/recipes-bsp/trustfence-cst/trustfence-cst.inc +++ b/meta-digi-arm/recipes-bsp/trustfence-cst/trustfence-cst.inc @@ -3,7 +3,8 @@ SUMMARY = "NXP Code signing Tool for the High Assurance Boot library" DESCRIPTION = "Provides software code signing support designed for use with \ i.MX processors that integrate the HAB library in the internal boot ROM." HOMEPAGE = "https://www.nxp.com/webapp/Download?colCode=IMX_CST_TOOL" -LICENSE = "CLOSED" +LICENSE = "BSD-3-Clause" +LIC_FILES_CHKSUM = "file://LICENSE.bsd3;md5=1fbcd66ae51447aa94da10cbf6271530" DEPENDS = "openssl byacc flex" @@ -15,7 +16,7 @@ DEPENDS = "openssl byacc flex" DEPENDS_append_class-nativesdk = " byacc-native openssl-native" SRC_URI = " \ - ${@oe.utils.conditional('TRUSTFENCE_SIGN', '1', 'file://cst-${PV}.tgz', '', d)} \ + ${@oe.utils.conditional('TRUSTFENCE_SIGN', '1', '${DIGI_PKG_SRC}/cst-${PV}.tgz', '', d)} \ file://0001-gen_auth_encrypted_data-reuse-existing-DEK-file.patch \ file://0002-hab4_pki_tree.sh-automate-script.patch \ file://0003-openssl_helper-use-dev-urandom-as-seed-source.patch \ @@ -25,6 +26,9 @@ SRC_URI = " \ file://0007-Makefile-statically-link-libcrypto.patch \ " +SRC_URI[md5sum] = "27ba9c8bc0b8a7f14d23185775c53794" +SRC_URI[sha256sum] = "8b7e44e3e126f814f5caf8a634646fe64021405302ca59ff02f5c8f3b9a5abb9" + # Usually local files (with file:// protocol) are not checked for # premirrors. But in this case we want to be able to download the 'cst' # package from a premirror in case it's not already in the DL_DIR, so prepend From 379ab894c388aefa9028f78ae5514a74fcea6a2f Mon Sep 17 00:00:00 2001 From: Gonzalo Ruiz Date: Mon, 21 Dec 2020 17:36:40 +0100 Subject: [PATCH 48/57] trustfence-cst: remove *.inc file Since there is only 1 supported version of cst, the include file is only used once. Move all the recipe implementation to the *.bb recipe and remove the *.inc file. Signed-off-by: Gonzalo Ruiz --- .../trustfence-cst/trustfence-cst.inc | 73 ------------------ .../trustfence-cst/trustfence-cst_3.3.1.bb | 74 ++++++++++++++++++- 2 files changed, 72 insertions(+), 75 deletions(-) delete mode 100644 meta-digi-arm/recipes-bsp/trustfence-cst/trustfence-cst.inc diff --git a/meta-digi-arm/recipes-bsp/trustfence-cst/trustfence-cst.inc b/meta-digi-arm/recipes-bsp/trustfence-cst/trustfence-cst.inc deleted file mode 100644 index 88b3ca832..000000000 --- a/meta-digi-arm/recipes-bsp/trustfence-cst/trustfence-cst.inc +++ /dev/null @@ -1,73 +0,0 @@ -# Copyright (C) 2017-2019 Digi International -SUMMARY = "NXP Code signing Tool for the High Assurance Boot library" -DESCRIPTION = "Provides software code signing support designed for use with \ -i.MX processors that integrate the HAB library in the internal boot ROM." -HOMEPAGE = "https://www.nxp.com/webapp/Download?colCode=IMX_CST_TOOL" -LICENSE = "BSD-3-Clause" -LIC_FILES_CHKSUM = "file://LICENSE.bsd3;md5=1fbcd66ae51447aa94da10cbf6271530" - -DEPENDS = "openssl byacc flex" - -# Explicitly add byacc-native as a dependency when building the package for the -# SDK, otherwise, it won't get installed in the sysroot, causing a compilation -# error. -# Explicitly add openssl-native for the SDK build to correctly link to the -# openssl libraries in the native dependencies folder. -DEPENDS_append_class-nativesdk = " byacc-native openssl-native" - -SRC_URI = " \ - ${@oe.utils.conditional('TRUSTFENCE_SIGN', '1', '${DIGI_PKG_SRC}/cst-${PV}.tgz', '', d)} \ - file://0001-gen_auth_encrypted_data-reuse-existing-DEK-file.patch \ - file://0002-hab4_pki_tree.sh-automate-script.patch \ - file://0003-openssl_helper-use-dev-urandom-as-seed-source.patch \ - file://0004-hab4_pki_tree.sh-usa-a-random-password-for-the-defau.patch \ - file://0005-ahab_pki_tree.sh-automate-script.patch \ - file://0006-ahab_pki_tree.sh-use-a-random-password-for-the-defau.patch \ - file://0007-Makefile-statically-link-libcrypto.patch \ -" - -SRC_URI[md5sum] = "27ba9c8bc0b8a7f14d23185775c53794" -SRC_URI[sha256sum] = "8b7e44e3e126f814f5caf8a634646fe64021405302ca59ff02f5c8f3b9a5abb9" - -# Usually local files (with file:// protocol) are not checked for -# premirrors. But in this case we want to be able to download the 'cst' -# package from a premirror in case it's not already in the DL_DIR, so prepend -# a premirror for the 'file://' protocol. -python() { - source_mirror_url = d.getVar('SOURCE_MIRROR_URL', True) - if source_mirror_url: - premirrors = d.getVar('PREMIRRORS', True) - d.setVar('PREMIRRORS', "file://cst.* %s \\n %s" % (source_mirror_url, premirrors)) -} - -S = "${WORKDIR}/cst-${PV}/" - -do_compile() { - export LDLIBPATH=-L${WORKDIR}/recipe-sysroot-native/usr/lib - export COPTIONS=-I${WORKDIR}/recipe-sysroot-native/usr/include - cd ${S}/code/cst - oe_runmake OSTYPE=linux64 clean - oe_runmake OSTYPE=linux64 rel_bin -} - -do_install() { - install -d ${D}${bindir} - install -m 0755 $(find ${S}/code/cst/release/linux64 -type f -name cst) ${D}${bindir}/cst - install -m 0755 $(find ${S}/code/cst/release/linux64 -type f -name srktool) ${D}${bindir}/srktool - if [ "${TRUSTFENCE_SIGN_MODE}" = "AHAB" ]; then - install -m 0755 keys/ahab_pki_tree.sh ${D}${bindir}/trustfence-gen-pki.sh - elif [ "${TRUSTFENCE_SIGN_MODE}" = "HAB" ]; then - install -m 0755 keys/hab4_pki_tree.sh ${D}${bindir}/trustfence-gen-pki.sh - else - bberror "Unkown TRUSTFENCE_SIGN_MODE value" - exit 1 - fi - install -m 0755 ca/openssl.cnf ${D}${bindir}/openssl.cnf - install -m 0755 ca/v3_ca.cnf ${D}${bindir}/v3_ca.cnf - install -m 0755 ca/v3_usr.cnf ${D}${bindir}/v3_usr.cnf -} - -INSANE_SKIP_${PN} += "already-stripped" - -FILES_${PN} = "${bindir}" -BBCLASSEXTEND = "native nativesdk" diff --git a/meta-digi-arm/recipes-bsp/trustfence-cst/trustfence-cst_3.3.1.bb b/meta-digi-arm/recipes-bsp/trustfence-cst/trustfence-cst_3.3.1.bb index 04796598f..531514254 100644 --- a/meta-digi-arm/recipes-bsp/trustfence-cst/trustfence-cst_3.3.1.bb +++ b/meta-digi-arm/recipes-bsp/trustfence-cst/trustfence-cst_3.3.1.bb @@ -1,3 +1,73 @@ -# Copyright (C) 2019 Digi International +# Copyright (C) 2017-2020 Digi International +SUMMARY = "NXP Code signing Tool for the High Assurance Boot library" +DESCRIPTION = "Provides software code signing support designed for use with \ +i.MX processors that integrate the HAB library in the internal boot ROM." +HOMEPAGE = "https://www.nxp.com/webapp/Download?colCode=IMX_CST_TOOL" +LICENSE = "BSD-3-Clause" +LIC_FILES_CHKSUM = "file://LICENSE.bsd3;md5=1fbcd66ae51447aa94da10cbf6271530" -require trustfence-cst.inc +DEPENDS = "openssl byacc flex" + +# Explicitly add byacc-native as a dependency when building the package for the +# SDK, otherwise, it won't get installed in the sysroot, causing a compilation +# error. +# Explicitly add openssl-native for the SDK build to correctly link to the +# openssl libraries in the native dependencies folder. +DEPENDS_append_class-nativesdk = " byacc-native openssl-native" + +SRC_URI = " \ + ${@oe.utils.conditional('TRUSTFENCE_SIGN', '1', '${DIGI_PKG_SRC}/cst-${PV}.tgz', '', d)} \ + file://0001-gen_auth_encrypted_data-reuse-existing-DEK-file.patch \ + file://0002-hab4_pki_tree.sh-automate-script.patch \ + file://0003-openssl_helper-use-dev-urandom-as-seed-source.patch \ + file://0004-hab4_pki_tree.sh-usa-a-random-password-for-the-defau.patch \ + file://0005-ahab_pki_tree.sh-automate-script.patch \ + file://0006-ahab_pki_tree.sh-use-a-random-password-for-the-defau.patch \ + file://0007-Makefile-statically-link-libcrypto.patch \ +" + +SRC_URI[md5sum] = "27ba9c8bc0b8a7f14d23185775c53794" +SRC_URI[sha256sum] = "8b7e44e3e126f814f5caf8a634646fe64021405302ca59ff02f5c8f3b9a5abb9" + +# Usually local files (with file:// protocol) are not checked for +# premirrors. But in this case we want to be able to download the 'cst' +# package from a premirror in case it's not already in the DL_DIR, so prepend +# a premirror for the 'file://' protocol. +python() { + source_mirror_url = d.getVar('SOURCE_MIRROR_URL', True) + if source_mirror_url: + premirrors = d.getVar('PREMIRRORS', True) + d.setVar('PREMIRRORS', "file://cst.* %s \\n %s" % (source_mirror_url, premirrors)) +} + +S = "${WORKDIR}/cst-${PV}/" + +do_compile() { + export LDLIBPATH=-L${WORKDIR}/recipe-sysroot-native/usr/lib + export COPTIONS=-I${WORKDIR}/recipe-sysroot-native/usr/include + cd ${S}/code/cst + oe_runmake OSTYPE=linux64 clean + oe_runmake OSTYPE=linux64 rel_bin +} + +do_install() { + install -d ${D}${bindir} + install -m 0755 $(find ${S}/code/cst/release/linux64 -type f -name cst) ${D}${bindir}/cst + install -m 0755 $(find ${S}/code/cst/release/linux64 -type f -name srktool) ${D}${bindir}/srktool + if [ "${TRUSTFENCE_SIGN_MODE}" = "AHAB" ]; then + install -m 0755 keys/ahab_pki_tree.sh ${D}${bindir}/trustfence-gen-pki.sh + elif [ "${TRUSTFENCE_SIGN_MODE}" = "HAB" ]; then + install -m 0755 keys/hab4_pki_tree.sh ${D}${bindir}/trustfence-gen-pki.sh + else + bberror "Unkown TRUSTFENCE_SIGN_MODE value" + exit 1 + fi + install -m 0755 ca/openssl.cnf ${D}${bindir}/openssl.cnf + install -m 0755 ca/v3_ca.cnf ${D}${bindir}/v3_ca.cnf + install -m 0755 ca/v3_usr.cnf ${D}${bindir}/v3_usr.cnf +} + +INSANE_SKIP_${PN} += "already-stripped" + +FILES_${PN} = "${bindir}" +BBCLASSEXTEND = "native nativesdk" From f91a1d5ebe540d5f6fe1475c969874d1e7ab9c38 Mon Sep 17 00:00:00 2001 From: Gonzalo Ruiz Date: Mon, 21 Dec 2020 17:42:05 +0100 Subject: [PATCH 49/57] trustfence-cst: remove premirror for cst tarball Tarball file is going to be present in the DIGI FTP, so there is no need for premirrors. Signed-off-by: Gonzalo Ruiz --- .../trustfence-cst/trustfence-cst_3.3.1.bb | 11 ----------- 1 file changed, 11 deletions(-) diff --git a/meta-digi-arm/recipes-bsp/trustfence-cst/trustfence-cst_3.3.1.bb b/meta-digi-arm/recipes-bsp/trustfence-cst/trustfence-cst_3.3.1.bb index 531514254..143827899 100644 --- a/meta-digi-arm/recipes-bsp/trustfence-cst/trustfence-cst_3.3.1.bb +++ b/meta-digi-arm/recipes-bsp/trustfence-cst/trustfence-cst_3.3.1.bb @@ -29,17 +29,6 @@ SRC_URI = " \ SRC_URI[md5sum] = "27ba9c8bc0b8a7f14d23185775c53794" SRC_URI[sha256sum] = "8b7e44e3e126f814f5caf8a634646fe64021405302ca59ff02f5c8f3b9a5abb9" -# Usually local files (with file:// protocol) are not checked for -# premirrors. But in this case we want to be able to download the 'cst' -# package from a premirror in case it's not already in the DL_DIR, so prepend -# a premirror for the 'file://' protocol. -python() { - source_mirror_url = d.getVar('SOURCE_MIRROR_URL', True) - if source_mirror_url: - premirrors = d.getVar('PREMIRRORS', True) - d.setVar('PREMIRRORS', "file://cst.* %s \\n %s" % (source_mirror_url, premirrors)) -} - S = "${WORKDIR}/cst-${PV}/" do_compile() { From 5a1f6a416716228f1f41a3e58533089d37c842d4 Mon Sep 17 00:00:00 2001 From: Mike Engel Date: Thu, 10 Dec 2020 17:53:46 +0100 Subject: [PATCH 50/57] meta-digi: add python recipes for Optee compilation This commit adds python recipes from meta-imx required to build Optee support. Signed-off-by: Mike Engel --- .../python/python-erpc_git.bb | 27 +++++++++++++++ .../python-pycrypto/cross-compiling.patch | 23 +++++++++++++ .../python/python-pycrypto_2.6.1.bb | 34 +++++++++++++++++++ .../python/python-pycryptodome.inc | 31 +++++++++++++++++ .../python/python-pyelftools.inc | 12 +++++++ .../python/python3-pycryptodomex_3.9.4.bb | 7 ++++ .../python/python3-pyelftools_0.25.bb | 2 ++ .../python/python3-wheel_%.bbappend | 2 ++ 8 files changed, 138 insertions(+) create mode 100644 meta-digi-dey/recipes-devtools/python/python-erpc_git.bb create mode 100644 meta-digi-dey/recipes-devtools/python/python-pycrypto/cross-compiling.patch create mode 100644 meta-digi-dey/recipes-devtools/python/python-pycrypto_2.6.1.bb create mode 100644 meta-digi-dey/recipes-devtools/python/python-pycryptodome.inc create mode 100644 meta-digi-dey/recipes-devtools/python/python-pyelftools.inc create mode 100644 meta-digi-dey/recipes-devtools/python/python3-pycryptodomex_3.9.4.bb create mode 100644 meta-digi-dey/recipes-devtools/python/python3-pyelftools_0.25.bb create mode 100644 meta-digi-dey/recipes-devtools/python/python3-wheel_%.bbappend diff --git a/meta-digi-dey/recipes-devtools/python/python-erpc_git.bb b/meta-digi-dey/recipes-devtools/python/python-erpc_git.bb new file mode 100644 index 000000000..f8672bbc1 --- /dev/null +++ b/meta-digi-dey/recipes-devtools/python/python-erpc_git.bb @@ -0,0 +1,27 @@ +SUMMARY = "Python version of the NXP eRPC infrastructure" +DESCRIPTION = "eRPC (Embedded RPC) is an open source Remote Procedure Call (RPC) system for multichip embedded systems and heterogeneous multicore SoCs" +LICENSE = "BSD-3-Clause" +AUTHOR = "Jun Zhu " + +RDEPENDS_${PN} = "python-pyserial python-enum34 python-argparse python-threading python-shell" + +LIC_FILES_CHKSUM = "file://readme.md;md5=d3d754f8e1f07a15e65da588118bf793" + +SRC_URI = "git://github.com/EmbeddedRPC/erpc.git;protocol=https;branch=develop" + +SRCREV = "a5bb96821c111164defa6c8c932e189a8bcf86c2" +S = "${WORKDIR}/git/erpc_python" + +PV = "1.7+git${SRCPV}" + +inherit setuptools + +do_configure[noexec] = "1" + +do_compile_prepend () { + export IS_YOCTO="1" +} + +do_install_prepend () { + export IS_YOCTO="1" +} diff --git a/meta-digi-dey/recipes-devtools/python/python-pycrypto/cross-compiling.patch b/meta-digi-dey/recipes-devtools/python/python-pycrypto/cross-compiling.patch new file mode 100644 index 000000000..712f3e8dd --- /dev/null +++ b/meta-digi-dey/recipes-devtools/python/python-pycrypto/cross-compiling.patch @@ -0,0 +1,23 @@ +Index: pycrypto-2.6/setup.py +=================================================================== +--- pycrypto-2.6.orig/setup.py ++++ pycrypto-2.6/setup.py +@@ -271,7 +271,8 @@ class PCTBuildConfigure(Command): + if not os.path.exists("config.status"): + if os.system("chmod 0755 configure") != 0: + raise RuntimeError("chmod error") +- cmd = "sh configure" # we use "sh" here so that it'll work on mingw32 with standard python.org binaries ++ host = os.environ.get("HOST_SYS") ++ cmd = "ac_cv_func_malloc_0_nonnull=yes sh configure --host " + host # we use "sh" here so that it'll work on mingw32 with standard python.org binaries + if self.verbose < 1: + cmd += " -q" + if os.system(cmd) != 0: +@@ -370,7 +371,7 @@ kw = {'name':"pycrypto", + 'ext_modules': plat_ext + [ + # _fastmath (uses GNU mp library) + Extension("Crypto.PublicKey._fastmath", +- include_dirs=['src/','/usr/include/'], ++ include_dirs=['src/'], + libraries=['gmp'], + sources=["src/_fastmath.c"]), + diff --git a/meta-digi-dey/recipes-devtools/python/python-pycrypto_2.6.1.bb b/meta-digi-dey/recipes-devtools/python/python-pycrypto_2.6.1.bb new file mode 100644 index 000000000..1477418dc --- /dev/null +++ b/meta-digi-dey/recipes-devtools/python/python-pycrypto_2.6.1.bb @@ -0,0 +1,34 @@ +DESCRIPTION = "Cryptographic modules for Python." +HOMEPAGE = "http://www.pycrypto.org/" +SECTION = "devel/python" +LICENSE = "PSFv2" +LIC_FILES_CHKSUM = "file://COPYRIGHT;md5=35f354d199e8cb7667b059a23578e63d" + +SRCNAME = "pycrypto" + +SRC_URI = "https://pypi.python.org/packages/source/p/${SRCNAME}/${SRCNAME}-${PV}.tar.gz \ + file://cross-compiling.patch" + +SRC_URI[md5sum] = "55a61a054aa66812daf5161a0d5d7eda" +SRC_URI[sha256sum] = "f2ce1e989b272cfcb677616763e0a2e7ec659effa67a88aa92b3a65528f60a3c" + +S = "${WORKDIR}/${SRCNAME}-${PV}" + +inherit autotools autotools-brokensep distutils + +DEPENDS += " gmp" + +export STAGING_INCDIR +export STAGING_LIBDIR +export BUILD_SYS +export HOST_SYS + + +# We explicitly call distutils_do_install, since we want it to run, but +# *don't* want the autotools install to run, since this package doesn't +# provide a "make install" target. +do_install() { + distutils_do_install +} + +BBCLASSEXTEND = "native" diff --git a/meta-digi-dey/recipes-devtools/python/python-pycryptodome.inc b/meta-digi-dey/recipes-devtools/python/python-pycryptodome.inc new file mode 100644 index 000000000..1d568c346 --- /dev/null +++ b/meta-digi-dey/recipes-devtools/python/python-pycryptodome.inc @@ -0,0 +1,31 @@ +SUMMARY = "Cryptographic library for Python" +DESCRIPTION = "PyCryptodome is a self-contained Python package of low-level \ + cryptographic primitives.\ +This library is a fork of the pycrypto library. It can be installed as a drop-in replacement\ + or an independent library that works along side pycrypto." + +HOMEPAGE = "http://www.pycryptodome.org" +LICENSE = "PD & BSD-2-Clause" +LIC_FILES_CHKSUM = "file://LICENSE.rst;md5=6dc0e2a13d2f25d6f123c434b761faba" + +SRC_URI[md5sum] = "46ba513d95b6e323734074d960a7d57b" +SRC_URI[sha256sum] = "22d970cee5c096b9123415e183ae03702b2cd4d3ba3f0ced25c4e1aba3967167" +inherit pypi + +RDEPENDS_${PN} += " \ + ${PYTHON_PN}-io \ + ${PYTHON_PN}-math \ +" + +RDEPENDS_${PN}-tests += " \ + ${PYTHON_PN}-unittest \ +" + +PACKAGES =+ "${PN}-tests" + +FILES_${PN}-tests += " \ + ${PYTHON_SITEPACKAGES_DIR}/Cryptodome/SelfTest/ \ + ${PYTHON_SITEPACKAGES_DIR}/Cryptodome/SelfTest/__pycache__/ \ +" + +BBCLASSEXTEND = "native nativesdk" diff --git a/meta-digi-dey/recipes-devtools/python/python-pyelftools.inc b/meta-digi-dey/recipes-devtools/python/python-pyelftools.inc new file mode 100644 index 000000000..a02166af8 --- /dev/null +++ b/meta-digi-dey/recipes-devtools/python/python-pyelftools.inc @@ -0,0 +1,12 @@ +SUMMARY = "Python library and tools for doing stuff with EFL files." +DESCRIPTION = "Minimal but very flexible implementation of the expect pattern" +SECTION = "devel/python" +HOMEPAGE = " git://github.com/eliben/pyelftools" +LICENSE = "PD" +LIC_FILES_CHKSUM = "file://LICENSE;md5=5ce2a2b07fca326bc7c146d10105ccfc" + +inherit pypi python3native + +SRC_URI[sha256sum] = "89c6da6f56280c37a5ff33468591ba9a124e17d71fe42de971818cbff46c1b24" + +BBCLASSEXTEND = "native nativesdk" diff --git a/meta-digi-dey/recipes-devtools/python/python3-pycryptodomex_3.9.4.bb b/meta-digi-dey/recipes-devtools/python/python3-pycryptodomex_3.9.4.bb new file mode 100644 index 000000000..788beb726 --- /dev/null +++ b/meta-digi-dey/recipes-devtools/python/python3-pycryptodomex_3.9.4.bb @@ -0,0 +1,7 @@ +require python-pycryptodome.inc +inherit setuptools3 + +# This recipe install pycryptodome as an independent library. +do_configure_prepend () { +touch ${S}/.separate_namespace +} diff --git a/meta-digi-dey/recipes-devtools/python/python3-pyelftools_0.25.bb b/meta-digi-dey/recipes-devtools/python/python3-pyelftools_0.25.bb new file mode 100644 index 000000000..a71b2f652 --- /dev/null +++ b/meta-digi-dey/recipes-devtools/python/python3-pyelftools_0.25.bb @@ -0,0 +1,2 @@ +inherit setuptools3 +require python-pyelftools.inc \ No newline at end of file diff --git a/meta-digi-dey/recipes-devtools/python/python3-wheel_%.bbappend b/meta-digi-dey/recipes-devtools/python/python3-wheel_%.bbappend new file mode 100644 index 000000000..fe2bad50c --- /dev/null +++ b/meta-digi-dey/recipes-devtools/python/python3-wheel_%.bbappend @@ -0,0 +1,2 @@ + +BBCLASSEXTEND = "native nativesdk" From c0788ada654043c2c07669b162e4b426edb86747 Mon Sep 17 00:00:00 2001 From: Mike Engel Date: Thu, 10 Dec 2020 17:55:06 +0100 Subject: [PATCH 51/57] meta-digi: add support for Optee packages Signed-off-by: Mike Engel --- .../optee-imx/optee-client.imx.inc | 28 +++++++++++ .../optee-client/tee-supplicant.service | 1 + .../optee-imx/optee-client_3.10.0.imx.bb | 6 +++ .../optee-imx/optee-os.imx.inc | 47 +++++++++++++++++++ .../optee-imx/optee-os_3.10.0.imx.bb | 16 +++++++ .../optee-imx/optee-test.imx.inc | 45 ++++++++++++++++++ .../0001-fix-build-failure-with-GCC-9.patch | 28 +++++++++++ .../optee-imx/optee-test_3.10.0.imx.bb | 11 +++++ 8 files changed, 182 insertions(+) create mode 100644 meta-digi-arm/recipes-security/optee-imx/optee-client.imx.inc create mode 120000 meta-digi-arm/recipes-security/optee-imx/optee-client/tee-supplicant.service create mode 100644 meta-digi-arm/recipes-security/optee-imx/optee-client_3.10.0.imx.bb create mode 100644 meta-digi-arm/recipes-security/optee-imx/optee-os.imx.inc create mode 100644 meta-digi-arm/recipes-security/optee-imx/optee-os_3.10.0.imx.bb create mode 100644 meta-digi-arm/recipes-security/optee-imx/optee-test.imx.inc create mode 100644 meta-digi-arm/recipes-security/optee-imx/optee-test/0001-fix-build-failure-with-GCC-9.patch create mode 100644 meta-digi-arm/recipes-security/optee-imx/optee-test_3.10.0.imx.bb diff --git a/meta-digi-arm/recipes-security/optee-imx/optee-client.imx.inc b/meta-digi-arm/recipes-security/optee-imx/optee-client.imx.inc new file mode 100644 index 000000000..eeb903c80 --- /dev/null +++ b/meta-digi-arm/recipes-security/optee-imx/optee-client.imx.inc @@ -0,0 +1,28 @@ +# Copyright (C) 2019-2020 NXP + +require recipes-security/optee-imx/optee-client_3.2.0.imx.bb + +SRC_URI_remove = "file://0001-libteec-refactor-_dprintf.patch" + +B = "${WORKDIR}/build" + +EXTRA_OEMAKE_remove = "CFG_SECURE_DATA_PATH=y" +EXTRA_OEMAKE += "O=${B}" + +do_install() { + oe_runmake -C ${S} install + + install -D -p -m0755 ${B}/export/usr/sbin/tee-supplicant ${D}${bindir}/tee-supplicant + + install -D -p -m0644 ${B}/export/usr/lib/libteec.so.1.0 ${D}${libdir}/libteec.so.1.0 + ln -sf libteec.so.1.0 ${D}${libdir}/libteec.so + ln -sf libteec.so.1.0 ${D}${libdir}/libteec.so.1 + + cp -a ${B}/export/usr/include ${D}/usr/ + + sed -i -e s:/etc:${sysconfdir}:g \ + -e s:/usr/bin:${bindir}:g \ + ${WORKDIR}/tee-supplicant.service + + install -D -p -m0644 ${WORKDIR}/tee-supplicant.service ${D}${systemd_system_unitdir}/tee-supplicant.service +} diff --git a/meta-digi-arm/recipes-security/optee-imx/optee-client/tee-supplicant.service b/meta-digi-arm/recipes-security/optee-imx/optee-client/tee-supplicant.service new file mode 120000 index 000000000..3e9b85c39 --- /dev/null +++ b/meta-digi-arm/recipes-security/optee-imx/optee-client/tee-supplicant.service @@ -0,0 +1 @@ +../../../../../meta-freescale/recipes-security/optee-imx/optee-client/tee-supplicant.service \ No newline at end of file diff --git a/meta-digi-arm/recipes-security/optee-imx/optee-client_3.10.0.imx.bb b/meta-digi-arm/recipes-security/optee-imx/optee-client_3.10.0.imx.bb new file mode 100644 index 000000000..64145d5cf --- /dev/null +++ b/meta-digi-arm/recipes-security/optee-imx/optee-client_3.10.0.imx.bb @@ -0,0 +1,6 @@ +# Copyright (C) 2020 NXP +require optee-client.imx.inc + +SRCBRANCH = "imx_5.4.47_2.2.0" +SRCREV = "2a77cf88d956c34cb4a1c191bea6113e327f5fe0" + diff --git a/meta-digi-arm/recipes-security/optee-imx/optee-os.imx.inc b/meta-digi-arm/recipes-security/optee-imx/optee-os.imx.inc new file mode 100644 index 000000000..3014ec07f --- /dev/null +++ b/meta-digi-arm/recipes-security/optee-imx/optee-os.imx.inc @@ -0,0 +1,47 @@ +# Copyright (C) 2019-2020 NXP + +require recipes-security/optee-imx/optee-os_3.2.0.imx.bb + +LIC_FILES_CHKSUM = "file://LICENSE;md5=c1f21c4f72f372ef38a5a4aee55ec173" + +inherit python3native +DEPENDS_remove = "python-pycrypto-native" +DEPENDS_append = " python3-pycrypto-native python3-pyelftools-native" + +# The recipe uses Machine overrides variable +# to select the suitable OP-TEE Platform Flavor. +# The reason is that from an OP-TEE point of view there +# are no differences between for example a imx8mnddr4evk +# and a imx8mnevk MACHINE. In this example, the PLATFORM_FLAVOR +# defined is imx8mnevk, the other MACHINE derivatives +# are just using the original one. +PLATFORM_FLAVOR_mx8mn = "mx8mnevk" +PLATFORM_FLAVOR_mx8qxp = "mx8qxpmek" +PLATFORM_FLAVOR_mx8mp = "mx8mpevk" +PLATFORM_FLAVOR_mx8dx = "mx8dxmek" +PLATFORM_FLAVOR_mx8dxl = "mx8dxlevk" +PLATFORM_FLAVOR_mx8phantomdxl = "mx8qxpmek" + +OPTEE_CORE_LOG_LEVEL ?= "1" +OPTEE_TA_LOG_LEVEL ?= "0" + +EXTRA_OEMAKE_remove = "NOWERROR=1 \ + CFG_SECURE_DATA_PATH=y \ + CFG_TEE_SDP_MEM_BASE=0xCC000000 \ + CFG_TEE_SDP_MEM_SIZE=0x02000000 \ + CFG_TEE_SDP_NONCACHE=y \ + " + +EXTRA_OEMAKE += "CFG_WERROR=y \ + CFG_TEE_CORE_LOG_LEVEL=${OPTEE_CORE_LOG_LEVEL} \ + CFG_TEE_TA_LOG_LEVEL=${OPTEE_TA_LOG_LEVEL} \ + CFG_NXPCRYPT=y \ + CFG_GEN_DEK_BLOB=y \ + " + +do_compile () { + unset LDFLAGS + export CFLAGS="${CFLAGS} --sysroot=${STAGING_DIR_HOST}" + oe_runmake -C ${S} all +} + diff --git a/meta-digi-arm/recipes-security/optee-imx/optee-os_3.10.0.imx.bb b/meta-digi-arm/recipes-security/optee-imx/optee-os_3.10.0.imx.bb new file mode 100644 index 000000000..03e83340c --- /dev/null +++ b/meta-digi-arm/recipes-security/optee-imx/optee-os_3.10.0.imx.bb @@ -0,0 +1,16 @@ +# Copyright (C) 2020 NXP +require optee-os.imx.inc + +DEPENDS_append = " python3-pycryptodomex-native" + +SRCBRANCH = "imx_5.4.47_2.2.0" +SRCREV = "b3914e547eaf90684b5630921d609126634ce64b" + +# tee-init_load_addr.txt has been remove in lates optee-os version. +# to keep backward compatibility with existing optee-os recipe. +do_compile_append () { + if [ "${OPTEE_ARCH}" != "arm64" ]; then + IMX_LOAD_ADDR=`${TARGET_PREFIX}readelf -h ${B}/core/tee.elf | grep "Entry point address" | awk '{print $4}'` && \ + echo ${IMX_LOAD_ADDR} > ${B}/core/tee-init_load_addr.txt + fi +} diff --git a/meta-digi-arm/recipes-security/optee-imx/optee-test.imx.inc b/meta-digi-arm/recipes-security/optee-imx/optee-test.imx.inc new file mode 100644 index 000000000..37c0e3446 --- /dev/null +++ b/meta-digi-arm/recipes-security/optee-imx/optee-test.imx.inc @@ -0,0 +1,45 @@ +# Copyright (C) 2019-2020 NXP + +require recipes-security/optee-imx/optee-test_3.2.0.imx.bb + +inherit python3native +DEPENDS_remove = "python-pycrypto-native" +DEPENDS_append = " python3-pycrypto-native" + +SRC_URI_remove = "file://0001-regression-4011-correct-potential-overflow.patch \ + file://0001-xtest-prevent-unexpected-build-warning-with-strncpy.patch \ + file://0003-sock_server-fix-compilation-against-musl-sys-errno.h.patch \ + file://0004-build-ignore-declaration-after-statement-warnings.patch \ + file://0005-benchmark_1000-fix-compilation-against-musl-uint.patch \ + file://0006-regression_8100-use-null-terminated-strings-with-fil.patch \ + " +B = "${WORKDIR}/build" + +TA_DEV_KIT_DIR_aarch64 = "${STAGING_INCDIR}/optee/export-user_ta_arm64/" +OPTEE_ARCH_aarch64 = "arm64" +TA_DEV_KIT_DIR_arm = "${STAGING_INCDIR}/optee/export-user_ta_arm32/" +OPTEE_ARCH_arm = "arm" + +EXTRA_OEMAKE = " \ + TA_DEV_KIT_DIR=${TA_DEV_KIT_DIR} \ + ARCH=${OPTEE_ARCH} \ + OPTEE_CLIENT_EXPORT=${STAGING_DIR_HOST}/usr \ + CROSS_COMPILE_HOST=${HOST_PREFIX} \ + CROSS_COMPILE_TA=${HOST_PREFIX} \ + CROSS_COMPILE=${HOST_PREFIX} \ + OPTEE_OPENSSL_EXPORT=${STAGING_INCDIR}/ \ + -C ${S} O=${B} \ +" +do_compile_prepend () { + export CXXFLAGS="${CXXFLAGS} --sysroot=${STAGING_DIR_HOST}" +} + +do_install () { + install -d ${D}/usr/bin + install ${B}/xtest/xtest ${D}/usr/bin/ + + install -d ${D}/lib/optee_armtz + find ${B}/ta -name '*.ta' | while read name; do + install -m 444 $name ${D}/lib/optee_armtz/ + done +} diff --git a/meta-digi-arm/recipes-security/optee-imx/optee-test/0001-fix-build-failure-with-GCC-9.patch b/meta-digi-arm/recipes-security/optee-imx/optee-test/0001-fix-build-failure-with-GCC-9.patch new file mode 100644 index 000000000..9b9127777 --- /dev/null +++ b/meta-digi-arm/recipes-security/optee-imx/optee-test/0001-fix-build-failure-with-GCC-9.patch @@ -0,0 +1,28 @@ +From 79330c8383e02e91a355964a3cc7b932d03c2517 Mon Sep 17 00:00:00 2001 +From: Chunrong Guo +Date: Wed, 10 Jul 2019 11:09:01 +0200 +Subject: [PATCH] fix build failure with GCC 9 + +Upstream-Status: Inappropriate [embedded specific] + +Signed-off-by: C.r. Guo +--- + host/xtest/Makefile | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/host/xtest/Makefile b/host/xtest/Makefile +index e4e2881..e86e056 100644 +--- a/host/xtest/Makefile ++++ b/host/xtest/Makefile +@@ -152,7 +152,7 @@ CFLAGS += -Wall -Wcast-align -Werror \ + -Wmissing-include-dirs -Wmissing-noreturn \ + -Wmissing-prototypes -Wnested-externs -Wpointer-arith \ + -Wshadow -Wstrict-prototypes -Wswitch-default \ +- -Wwrite-strings \ ++ -Wwrite-strings -Wno-format-overflow \ + -Wno-missing-field-initializers -Wno-format-zero-length + endif + +-- +2.7.4 + diff --git a/meta-digi-arm/recipes-security/optee-imx/optee-test_3.10.0.imx.bb b/meta-digi-arm/recipes-security/optee-imx/optee-test_3.10.0.imx.bb new file mode 100644 index 000000000..e6abb2431 --- /dev/null +++ b/meta-digi-arm/recipes-security/optee-imx/optee-test_3.10.0.imx.bb @@ -0,0 +1,11 @@ +# Copyright (C) 2020 NXP +require optee-test.imx.inc + +DEPENDS_append = " python3-pycryptodomex-native" + +SRCBRANCH = "imx_5.4.47_2.2.0" +SRCREV = "30efcbeaf8864d0f2a5c4be593a5411001fab31b" + +do_compile_prepend () { + export CFLAGS="${CFLAGS} --sysroot=${STAGING_DIR_HOST}" +} From 1baba309c228136fec981d2cf59ed6e2f0ccbbc5 Mon Sep 17 00:00:00 2001 From: Mike Engel Date: Fri, 11 Dec 2020 10:07:01 +0100 Subject: [PATCH 52/57] ccimx8mn: add Optee component to the machine features. Since this component pulls in Optee dependencies, which in turn depend on packages from meta-python2, add this layer to the ccimx8mn-dvk's default bblayers. Signed-off-by: Mike Engel https://jira.digi.com/browse/DEL-7025 --- meta-digi-arm/conf/machine/include/ccimx8mn.inc | 2 +- sdk/config/ccimx8mn-dvk/bblayers.conf.sample | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/meta-digi-arm/conf/machine/include/ccimx8mn.inc b/meta-digi-arm/conf/machine/include/ccimx8mn.inc index ac0ee1ff2..438122b68 100644 --- a/meta-digi-arm/conf/machine/include/ccimx8mn.inc +++ b/meta-digi-arm/conf/machine/include/ccimx8mn.inc @@ -50,7 +50,7 @@ MACHINE_EXTRA_RRECOMMENDS += " \ ${WIRELESS_MODULE} \ " -MACHINE_FEATURES += "accel-graphics accel-video wifi bluetooth cryptochip mca" +MACHINE_FEATURES += "accel-graphics accel-video wifi bluetooth cryptochip mca optee" # AARCH64 doesn't support self-extracting zImage KERNEL_IMAGETYPE = "Image.gz" diff --git a/sdk/config/ccimx8mn-dvk/bblayers.conf.sample b/sdk/config/ccimx8mn-dvk/bblayers.conf.sample index b639b6828..68d2495bf 100644 --- a/sdk/config/ccimx8mn-dvk/bblayers.conf.sample +++ b/sdk/config/ccimx8mn-dvk/bblayers.conf.sample @@ -17,6 +17,7 @@ BBLAYERS ?= " \ ##DIGIBASE##/meta-swupdate \ ##DIGIBASE##/meta-freescale \ ##DIGIBASE##/meta-fsl-demos \ + ##DIGIBASE##/meta-python2 \ ##DIGIBASE##/meta-webkit \ ##DIGIBASE##/meta-digi/meta-digi-arm \ ##DIGIBASE##/meta-digi/meta-digi-dey \ From 827d2e9a4d1ae4c73be4efc68c1b0490e8c205c3 Mon Sep 17 00:00:00 2001 From: Mike Engel Date: Fri, 11 Dec 2020 10:08:03 +0100 Subject: [PATCH 53/57] ccimx8mn: enable Trustfence artifact encryption. Signed-off-by: Mike Engel --- meta-digi-arm/conf/machine/include/ccimx8mn.inc | 2 -- 1 file changed, 2 deletions(-) diff --git a/meta-digi-arm/conf/machine/include/ccimx8mn.inc b/meta-digi-arm/conf/machine/include/ccimx8mn.inc index 438122b68..8a59abfb2 100644 --- a/meta-digi-arm/conf/machine/include/ccimx8mn.inc +++ b/meta-digi-arm/conf/machine/include/ccimx8mn.inc @@ -60,8 +60,6 @@ VIRTUAL-RUNTIME_initscripts ?= "initscripts" # TrustFence TRUSTFENCE_SIGN_MODE = "HAB" -# TODO: Encryption not yet supported -TRUSTFENCE_DEK_PATH = "0" # Adding 'wayland' along with 'x11' enables the xwayland backend # Vulkan is necessary for wayland to build From 8c616ee84b91522db92504759ae454bd08e60b11 Mon Sep 17 00:00:00 2001 From: Mike Engel Date: Fri, 11 Dec 2020 12:00:04 +0100 Subject: [PATCH 54/57] imx-boot: add dummy dek blob to encrypt MX8MN modules. Signed-off-by: Mike Engel --- meta-digi-arm/recipes-bsp/imx-mkimage/imx-boot_1.0.bbappend | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/meta-digi-arm/recipes-bsp/imx-mkimage/imx-boot_1.0.bbappend b/meta-digi-arm/recipes-bsp/imx-mkimage/imx-boot_1.0.bbappend index 53440c60c..dab1947bd 100644 --- a/meta-digi-arm/recipes-bsp/imx-mkimage/imx-boot_1.0.bbappend +++ b/meta-digi-arm/recipes-bsp/imx-mkimage/imx-boot_1.0.bbappend @@ -70,6 +70,10 @@ mkimage is compatible for this use, and using it saves us from having to \ maintain a custom recipe." ln -sf ${STAGING_DIR_NATIVE}${bindir}/mkimage ${BOOT_STAGING}/mkimage_uboot cp ${DEPLOY_DIR_IMAGE}/${BOOT_TOOLS}/${ATF_MACHINE_NAME} ${BOOT_STAGING}/bl31.bin + # Create dummy DEK blob + if [ "${TRUSTFENCE_DEK_PATH}" != "0" ]; then + dd if=/dev/zero of=${BOOT_STAGING}/dek_blob_fit_dummy.bin bs=96 count=1 && sync + fi } do_compile () { From 0a2bee68aed1228d81e5134966578de3c1ca63ae Mon Sep 17 00:00:00 2001 From: Mike Engel Date: Thu, 17 Dec 2020 16:45:59 +0100 Subject: [PATCH 55/57] imx-boot: add u-boot image encryption. This commit adds u-boot image encryption. Signed-off-by: Mike Engel --- meta-digi-arm/recipes-bsp/imx-mkimage/imx-boot_1.0.bbappend | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/meta-digi-arm/recipes-bsp/imx-mkimage/imx-boot_1.0.bbappend b/meta-digi-arm/recipes-bsp/imx-mkimage/imx-boot_1.0.bbappend index dab1947bd..92ac322b1 100644 --- a/meta-digi-arm/recipes-bsp/imx-mkimage/imx-boot_1.0.bbappend +++ b/meta-digi-arm/recipes-bsp/imx-mkimage/imx-boot_1.0.bbappend @@ -220,6 +220,12 @@ do_deploy_append () { # Link to current "target" mkimage log ln -sf mkimage-${target}.log mkimage.log trustfence-sign-uboot.sh ${DEPLOYDIR}/${UBOOT_PREFIX}-${MACHINE}.bin-${target} ${DEPLOYDIR}/${UBOOT_PREFIX}-signed-${MACHINE}.bin-${target} + + if [ "${TRUSTFENCE_DEK_PATH}" != "0" ]; then + export ENABLE_ENCRYPTION=y + trustfence-sign-uboot.sh ${DEPLOYDIR}/${UBOOT_PREFIX}-${MACHINE}.bin-${target} ${DEPLOYDIR}/${UBOOT_PREFIX}-encrypted-${MACHINE}.bin-${target} + unset ENABLE_ENCRYPTION + fi done else for ramc in ${UBOOT_RAM_COMBINATIONS}; do From 024732f8cc068f9b48c4a2d9c24052b9e07b456f Mon Sep 17 00:00:00 2001 From: Mike Engel Date: Tue, 22 Dec 2020 20:09:12 +0100 Subject: [PATCH 56/57] trustfence: create 128Bit dek when using MX8MN. This commit creates a 128Bit DEK, which is the max supported length at the moment for the iMX8M. Signed-off-by: Mike Engel --- .../trustfence-sign-artifact.sh | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/meta-digi-arm/recipes-digi/trustfence/trustfence-sign-tools/trustfence-sign-artifact.sh b/meta-digi-arm/recipes-digi/trustfence/trustfence-sign-tools/trustfence-sign-artifact.sh index 21ba2b42d..1d4247756 100755 --- a/meta-digi-arm/recipes-digi/trustfence/trustfence-sign-tools/trustfence-sign-artifact.sh +++ b/meta-digi-arm/recipes-digi/trustfence/trustfence-sign-tools/trustfence-sign-artifact.sh @@ -128,9 +128,15 @@ if [ "${CONFIG_SIGN_MODE}" = "HAB" ]; then DEK_BLOB_OFFSET="0x100" if [ -n "${CONFIG_DEK_PATH}" ]; then if [ ! -f "${CONFIG_DEK_PATH}" ]; then - echo "DEK not found. Generating random 256 bit DEK." - [ -d $(dirname ${CONFIG_DEK_PATH}) ] || mkdir -p $(dirname ${CONFIG_DEK_PATH}) - dd if=/dev/urandom of="${CONFIG_DEK_PATH}" bs=32 count=1 >/dev/null 2>&1 + if [ "${PLATFORM}" = "ccimx8mn" ]; then + echo "DEK not found. Generating random 128 bit DEK." + [ -d $(dirname ${CONFIG_DEK_PATH}) ] || mkdir -p $(dirname ${CONFIG_DEK_PATH}) + dd if=/dev/urandom of="${CONFIG_DEK_PATH}" bs=16 count=1 >/dev/null 2>&1 + else + echo "DEK not found. Generating random 256 bit DEK." + [ -d $(dirname ${CONFIG_DEK_PATH}) ] || mkdir -p $(dirname ${CONFIG_DEK_PATH}) + dd if=/dev/urandom of="${CONFIG_DEK_PATH}" bs=32 count=1 >/dev/null 2>&1 + fi fi dek_size="$((8 * $(stat -L -c %s ${CONFIG_DEK_PATH})))" if [ "${dek_size}" != "128" ] && [ "${dek_size}" != "192" ] && [ "${dek_size}" != "256" ]; then From cca44221b952f19a5245aaea63b3796491454889 Mon Sep 17 00:00:00 2001 From: Gabriel Valcazar Date: Wed, 16 Dec 2020 14:24:14 +0100 Subject: [PATCH 57/57] digi-webkit-examples: adapt to new landing page design The landing page for the WebKit examples has gone through a visual overhaul to improve the overall user experience, so adapt its recipe accordingly. Since the page now contains resources that are relatively large (such as images and extensive stylesheets), remove its elements from the recipe directory and obtain them from Digi's FTP server instead. https://jira.digi.com/browse/DEL-7365 Signed-off-by: Gabriel Valcazar --- .../digi-webkit-examples.inc | 11 +- .../digi-webkit-examples/digi.css | 1617 ----------------- .../digi-webkit-examples/index.html | 38 - ...xamples.bb => digi-webkit-examples_0.1.bb} | 38 +- .../video-examples_0.1.bb | 4 +- 5 files changed, 24 insertions(+), 1684 deletions(-) delete mode 100644 meta-digi-dey/dynamic-layers/webkit/recipes-browser/digi-webkit-examples/digi-webkit-examples/digi.css delete mode 100644 meta-digi-dey/dynamic-layers/webkit/recipes-browser/digi-webkit-examples/digi-webkit-examples/index.html rename meta-digi-dey/dynamic-layers/webkit/recipes-browser/digi-webkit-examples/{digi-webkit-examples.bb => digi-webkit-examples_0.1.bb} (57%) diff --git a/meta-digi-dey/dynamic-layers/webkit/recipes-browser/digi-webkit-examples/digi-webkit-examples.inc b/meta-digi-dey/dynamic-layers/webkit/recipes-browser/digi-webkit-examples/digi-webkit-examples.inc index 8638a1950..f007fb189 100644 --- a/meta-digi-dey/dynamic-layers/webkit/recipes-browser/digi-webkit-examples/digi-webkit-examples.inc +++ b/meta-digi-dey/dynamic-layers/webkit/recipes-browser/digi-webkit-examples/digi-webkit-examples.inc @@ -35,11 +35,14 @@ WEBGL_REQUIRED = " \ ${WEBGL_SAMPLE_DEPS} \ " -# List of video samples -VIDEO_SAMPLES = " \ - big_buck_bunny.mov \ - big_buck_bunny.webm \ +# List of video sample formats +VIDEO_FORMATS = " \ + mov \ + webm \ " +# Name of the video sample +VIDEO_NAME = "big_buck_bunny" +VIDEO_NAME_UPPERCASE = "Big Buck Bunny" # All packages involved in the webkit examples install their files in the # webserver directory diff --git a/meta-digi-dey/dynamic-layers/webkit/recipes-browser/digi-webkit-examples/digi-webkit-examples/digi.css b/meta-digi-dey/dynamic-layers/webkit/recipes-browser/digi-webkit-examples/digi-webkit-examples/digi.css deleted file mode 100644 index 6d04ea977..000000000 --- a/meta-digi-dey/dynamic-layers/webkit/recipes-browser/digi-webkit-examples/digi-webkit-examples/digi.css +++ /dev/null @@ -1,1617 +0,0 @@ -/*************************************************/ -/*************** General Design **************/ -/*************************************************/ -@font-face { - font-family: 'Open Sans'; - src: url('../fonts/OpenSans-Regular.ttf') format('truetype'); -} - -body, .controls a.navbar-brand { - font-family: "Open Sans", Arial, "sans serif"; - word-break: break-word; -} - -h1, #content h1 > a.link, -h2, h2 > a.link, -h3, h3 > a.link, -h4, h4 > a.link, -h5, h5 > a.link, -h6, h6 > a.link, -#toctitle, #toctitle > a.link, -.sidebarblock > .content > .title, -.sidebarblock > .content > .title > a.link { - color: #84C361; -} - -@media only screen and (min-width: 768px) { - h1 { - font-size: 2.5em; - } -} - -.admonitionblock td.content > .title, -.audioblock > .title, .exampleblock > .title, -.imageblock > .title, .listingblock > .title, -.literalblock > .title, .stemblock > .title, -.openblock > .title, .paragraph > .title, -.quoteblock > .title, table.tableblock > .title, -.verseblock > .title, .videoblock > .title, -.dlist > .title, .olist > .title, .ulist > .title, -.qlist > .title, .hdlist > .title { - font-family: "Open Sans", Arial, "sans serif"; - color: #646466; -} - -table { - table-layout: fixed; - width: 100%; -} - -/* Source code tables (auto width for proper line number rendering) */ -table.pyhltable { - width: auto; -} - -table > thead > tr > th { - background-color: #717474; - font-weight: bold; -} - -table.tableblock { - font-size: 14px; -} - -table.tableblock td > p, -table.tableblock td > p:last-child { - margin-top: 0px; - margin-bottom: 0px; -} - -table > tbody > tr:nth-of-type(odd), -table > tbody > tr:nth-of-type(even) { - background: transparent; -} - -pre.pygments.highlight { - margin: 0px; -} - -pre { - margin: 0px; -} - -.literalblock pre, .literalblock pre[class], -.listingblock pre, .listingblock pre[class] { - -webkit-border-radius: 0px; - border-radius: 0px; - border-width: 0px; - background: #F7F7F8; -} - -.listingblock > .title { - font-size: 15px; - margin-top: 30px; - background-color: #717474; - color: white; - padding: 8px 10px; - margin-bottom: 0px; - font-style: normal; -} - -.listingblock > .content > pre > code, -.literalblock > .content > pre > code, -.listingblock > .content > pre, -.literalblock > .content > pre { - white-space: pre; - font-size: 14px; -} - -.listingblock > .content > pre, -.literalblock > .content > pre { - word-break: keep-all; - word-wrap: normal; - /*padding-top: 30px;*/ -} - -h1[id], h2[id], h3[id], h4[id], h5[id], h6[id], dt[id] { - padding-top: 10px; -} - -.sect1, .sect2, .sect3, .sect4 { - padding-top: 50px; -} - -.sect1 + .sect1 { - border-top: 0px; -} - -a:link, a:visited, a:active { - text-decoration: none; - outline: none !important; -} - -#tg-sb-content a:link, #tg-sb-content a:visited, #tg-sb-content a:active, -#topic-platform a:link, #topic-platform a:visited, #topic-platform a:active { - color: #0074A2; -} - -#tg-sb-content a:hover, footer .links a:hover, #topic-platform a:hover { - color: #00B7FF; -} - -p, blockquote, dt, td.content, span.alt, -.admonitionblock > table td.content, -p.lead, .paragraph.lead > p, -#preamble > .sectionbody > .paragraph:first-of-type p { - font-size: 16px; -} - -p, .admonitionblock > table td.content, -p.lead, .paragraph.lead > p, -#preamble > .sectionbody > .paragraph:first-of-type p { - line-height: 26px; -} - -.paragraph.lead > p, -#preamble > .sectionbody > .paragraph:first-of-type p { - color: inherit; -} - -.nav li a { - line-height: 24px; -} - -.nav > li > ul > li > a { - font-size: 12px; - line-height: 22px; -} - -.scroll-line { - top: 0px; - position: fixed; - height: 4px; - background: #84C361; - width: 0%; - z-index: 2000; -} -/* -.copy-button:before { - content: ''; - display: inline-block; - width: 18px; - height: 18px; - margin-right: 3px; - background-size: contain; - background-image: url(../../assets/images/clipboard.png); - background-repeat: no-repeat; - position: relative; - top: 3px; -} - -.copy-button:hover:before { - background-image: url(../../assets/images/clipboard_white.png); -} - -.copy-button { - cursor: pointer; - border: 0; - font-size: 14px; - text-transform: uppercase; - font-weight: 500; - padding: 2px 4px 4px; - color: #646466; - background-color: transparent; - position: absolute; - top: 0; - right: 0; -} - -.copy-button:hover, .copy-button:active, .copy-button:focus { - outline: 0; -} - -.copy-button:hover { - background-color: #84C361; - color: #FFFFFF; -} - -.copy-button:active{ - background-color: #EEEEEE; -}*/ - -.listingblock code[data-lang]:before, -.listingblock:hover code[data-lang]:before { - display: none; - /*bottom: 0.425rem; - top: auto; - font-size: 16px; - text-transform: uppercase; - font-weight: 500;*/ -} - -/* Math formulae */ -.MathJax { - font-size: 85% !important; -} - -/* Rotated-cell text (for narrow columns) */ -.rotated-cell { - writing-mode: sideways-lr; - text-align: right !important; -} - -/********************************************************/ -/**************** Expand/Collapse elements **************/ -/********************************************************/ - -a.collapser, a.collapser:link, a.collapser:hover, -a.collapser:visited, a.collapser:active { - outline: none; -} - -div .collapse, div .collapsing { - padding-left: 25px; - padding-right: 25px; -} - -i.clps.arrow { - border: solid #717174; - border-width: 0 3px 3px 0; - display: inline-block; - padding: 3px; - margin-top: 8px; - margin-right: 15px; -} - -.clps.arrow.right { - transform: rotate(-45deg); - -webkit-transform: rotate(-45deg); - float: left !important; -} - -.clps.arrow.left { - transform: rotate(135deg); - -webkit-transform: rotate(135deg); - float: left !important; -} - -.clps.arrow.up { - transform: rotate(-135deg); - -webkit-transform: rotate(-135deg); - float: left !important; -} - -.clps.arrow.down { - transform: rotate(45deg); - -webkit-transform: rotate(45deg); - float: left !important; -} - -/********************************************************/ -/*** Note, Tip, Warning, Caution and Important blocks ***/ -/********************************************************/ -.admonitionblock > table { - border-collapse: collapse; - border: solid; - border-color: #EEEEEE; - border-width: 1px; - width: 100%; -} - -.admonitionblock > table thead > tr > th, -.admonitionblock > table > tbody > tr > th, -.admonitionblock > table > tfoot > tr > th, -.admonitionblock > table > thead > tr > td, -.admonitionblock > table > tbody > tr > td, -.admonitionblock > table > tfoot > tr > td { - border-top: none; -} - -.admonitionblock > table > tbody > tr { - background-color: #FFFFFF; - border-left-style: solid; - border-left-width: 6px; -} - -.admonitionblock > table td.icon { - font-size: 20px; - padding: 10px 15px !important; - text-align: left; - width: 60px; -} - -.admonitionblock > table td.content { - padding-left: 0px; -} - -/* Note Block */ -.admonitionblock td.icon .icon-note:before { - content: "\F05A"; - text-shadow: none; - color: #00B7FF; -} -.admonitionblock.note > table > tbody > tr { - border-left-color: #00B7FF; -} - -/* Tip Block */ -.admonitionblock td.icon .icon-tip:before { - content: "\F058"; - text-shadow: none; - color: #669900; -} -.admonitionblock.tip > table > tbody > tr { - border-left-color: #669900; -} - -/* Warning Block */ -.admonitionblock td.icon .icon-warning:before { - content: "\F06A"; - text-shadow: none; - color: #E67300; -} -.admonitionblock.warning > table > tbody > tr { - border-left-color: #E67300; -} - -/* Caution Block */ -.admonitionblock td.icon .icon-caution:before { - content: "\F071"; - text-shadow: none; - color: #D14124; -} -.admonitionblock.caution > table > tbody > tr { - border-left-color: #D14124; -} - -/* Important Block */ -.admonitionblock td.icon .icon-important:before { - content: "\F024"; - text-shadow: none; - color: #CC0000; -} -.admonitionblock.important > table > tbody > tr { - border-left-color: #CC0000; -} - -/*************************************************/ -/**************** Top Banner *****************/ -/*************************************************/ -.banner { - background-color: #717174; - z-index: 1000; -} - -#banner-digi, #banner-digi img { - height: 70px; -} - -#banner-digi img { - float: left; - padding: 15px 0px; - cursor: pointer; -} - -#banner-text { - color: #FFFFFF; - font-weight: bold; - font-size: 20px; - padding-top: 34px; - float: left; - margin-bottom: 0px; -} - -#banner-preliminary { - color: #FFFFFF; - font-size: 14px; - font-style: italic; - float: right; - margin-bottom: 0px; - text-align: right; -} - -/*************************************************/ -/****************** Footer *******************/ -/*************************************************/ -footer { - clear: both; - background-color: #717174; - margin: 50px 0px 0px 0px; -} - -footer .row { - margin-right: 0px; - margin-left: 0px; -} - -footer .links { - column-count: 3; - -webkit-column-count: 3; - text-align: left; - padding: 20px 0px; - padding-left: 20px; -} - -footer .links a { - display: inline-block; - width: 120%; - padding: 4px 5px; - color: white; - font-size: 14px; - line-height: 1.5em; -} - -footer .links a[href^="http://"]:after, -footer .links a[href^="https://"]:after { - content: none; -} - -footer .copyright { - font-size: 15px; - color: white; - padding: 25px 0px; - display: flex; - flex-wrap: wrap; - justify-content: flex-end; -} - -footer .copyright-info { - line-height: 1.4; - padding-top: 2px; -} - -footer .footer-icon { - padding-left: 20px; - padding-top: 8px; -} - -footer .footer-icon img { - height: 30px; -} - -/*This section is to make the footer sticky*/ -#main-container { - display: flex; - flex-direction: column; -} - -.container { - flex: 1 0 auto; -} - -footer { - flex-shrink: 0; -} - -.scrollup { - position: fixed; - bottom: 40px; - right: 40px; - display: none; - background: #84C361; - width: 60px; - height: 60px; - border-radius: 50px; - text-align: center; - z-index: 100; -} - -@media (max-width: 576px) { - .scrollup { - width: 40px; - height: 40px; - bottom: 20px; - right: 20px; - } -} - -.scrollup:focus { - outline: 0; -} - -.scrollup:hover { - opacity: 0.8; -} - -.scrollup img { - margin-top: 14px; -} - -@media (max-width: 576px) { - .scrollup img { - margin-top: 11px; - width: 18px; - height: 18px; - } -} - -/*************************************************/ -/************** Navigation bar ***************/ -/*************************************************/ -.navbar { - min-height: 40px; -} - -.navbar-inverse { - background-color: #DDDDDD; - border: none; -} - -.navbar-inverse .navbar-toggle:focus{ - background-color: transparent; -} - -.navbar-inverse .navbar-toggle:active, -.navbar-inverse .navbar-toggle:hover { - background-color: #84C361; -} - -.navbar-inverse .navbar-nav>li>a, -.navbar-inverse .navbar-brand { - color: #717174; -} - -.navbar-inverse .navbar-toggle { - border-color: #717174; -} - -.navbar-inverse .navbar-toggle .icon-bar { - background-color: #717174; -} - -.navbar-toggle { - margin-top: 3px; - margin-bottom: 3px; -} - -.navbar-brand { - height: 40px; - padding: 10px 15px; -} - -.navbar-inverse .navbar-nav > li > a { - margin-top: 0px; - padding: 8px 10px; -} - -.navbar-inverse .navbar-nav > li > a:visited, -.navbar-inverse .navbar-nav > li > a:active { - color: #717174; -} - -.navbar-inverse .navbar-nav > li > a:hover { - color: #00B7FF; -} - -#tg-sb-link { - margin-left: -5px; - padding-top: 8px; - height: 40px; -} - -@media (max-width: 1000px){ - .navbar-nav>li { - float: left; - } - - .navbar-nav { - float: right !important; - } - - .navbar-left, .navbar-right { - float: right !important; - } - - #search-input { - width: 16em; - } - - #tg-sb-toc { - max-width: none !important; - } -} - -/*************************************************/ -/************* General Container *************/ -/*************************************************/ -@media (min-width: 300px) { - /* All column types have the same with because with this resoulution only the - content is shown. We don't know what type of column it will be assigned, so - we set all of them to the same value to avoid problems. This is related to - the javascript in the toc.html file.*/ - .col-md-2 { - width: 290px; - } - .col-md-8 { - width: 290px; - } - .col-md-10 { - width: 290px; - } - .col-md-12 { - width: 290px; - } - - #banner-preliminary { - width: 100px; - margin-top: 10px; - } -} - -@media (min-width: 400px) { - /* All column types have the same with because with this resoulution only the - content is shown. We don't know what type of column it will be assigned, so - we set all of them to the same value to avoid problems. This is related to - the javascript in the toc.html file.*/ - .col-md-2 { - width: 380px; - } - .col-md-8 { - width: 380px; - } - .col-md-10 { - width: 380px; - } - .col-md-12 { - width: 380px; - } -} - -@media (min-width: 470px) { - /* All column types have the same with because with this resoulution only the - content is shown. We don't know what type of column it will be assigned, so - we set all of them to the same value to avoid problems. This is related to - the javascript in the toc.html file.*/ - .col-md-2 { - width: 450px; - } - .col-md-8 { - width: 450px; - } - .col-md-10 { - width: 450px; - } - .col-md-12 { - width: 450px; - } - #tg-sb-content .tab-panel .nav-tabs > li > a { - width: auto; - min-width: 125px; - max-width: 250px; - } -} - -/* Small devices (landscape phones, 576px and up) */ -@media (min-width: 576px) { - .container { - width: 550px; - } - /* All column types have the same with because with this resoulution only the - content is shown. We don't know what type of column it will be assigned, so - we set all of them to the same value to avoid problems. This is related to - the javascript in the toc.html file.*/ - .col-md-2 { - width: 100%; - } - .col-md-8 { - width: 100%; - } - .col-md-10 { - width: 100%; - } - .col-md-12 { - width: 100%; - } - #tg-sb-content .tab-panel .nav-tabs > li > a { - width: auto; - min-width: 125px; - max-width: 250px; - } -} - -/* Medium devices (tablets, 768px and up) */ -@media (min-width: 768px) { - .container { - width: 750px; - } - .controls > a { - height: 40px; - padding: 8px 30px; - } - .navbar>.container .navbar-brand, - .navbar>.container-fluid .navbar-brand { - margin-left: 0px; - } - .aa-input-search { - width: 115px; - } - .aa-dropdown-menu { - width: 180px; - } -} - -/* Large devices (desktops, 992px and up) */ -@media (min-width: 992px) { - .aa-input-search { - width: 262px; - } - .aa-dropdown-menu { - width: 360px; - } -} -@media (min-width: 993px) { - /* With big displays, set the different column types to the specific - values they should have.*/ - .col-md-2 { - width: 20%; - } - .col-md-8 { - width: 60%; - } - .col-md-10 { - width: 80%; - } - .col-md-12 { - width: 100%; - } - .container { - width: 960px; - } - #banner-preliminary { - width: 180px; - margin-top: 38px; - } -} - -@media (min-width: 1000px) { - .container { - width: 920px; - } -} - -@media (min-width: 1100px) { - .container { - width: 1000px; - } -} - -/* Extra large devices */ -@media (min-width: 1200px) { - .container { - width: 1100px; - } -} - -/* Extra extra large devices (large desktops, 1500px and up) */ -@media (min-width: 1500px) { - .container { - width: 1400px; - } -} - -.container { - max-width: 1500px; -} - -/*************************************************/ -/****************** Content ******************/ -/*************************************************/ -#tg-sb-content { - padding-left: 35px; - padding-right: 35px; -} - -/*************************************************/ -/****************** Sidebar ******************/ -/*************************************************/ -#tg-sb-sidebar, #tg-sb-toc { - padding-left: 0px; - padding-right: 0px; - max-width: 280px; -} - -ul#mysidebar { - border-right: 5px solid #DDDDDD; - width: 100%; - max-width: 300px; - margin-top: 10px; -} - -.sb-toc-title { - color: #8D8D8D; - margin-top: 10px; - margin-bottom: 0px; - padding: 0px; - font-size: 20px; -} - -.sb-toc-title > a { - color: #8D8D8D; -} - -.sb-toc-title > a:hover { - color: #717174; -} - -.nav li { - margin: 0px; -} - -/* First level (main folders)*/ -.nav li.sb-folders a { - padding-left: 10px; - margin: 0px; - background-color: transparent; - border: 0px; -} - -/* Rest of levels (even the nested ones)*/ -.nav li.sb-folders > ul li { - padding-left: 20px; - margin: 0px; - background-color: transparent; - border: 0px; -} - -.nav li.sb-folders a:hover, .nav li a.sb-section:hover, -.nav li a.sb-subsection:hover, .nav li.active a.sb-section:hover, -.nav li.active a.sb-subsection:hover { - background-color: #717174; - color: white; -} - -.nav li a.sb-section { - font-size: 14px; - padding-left: 10px; -} - -.nav li a.sb-subsection { - background-color: transparent; - font-size: 12px; - border: 0px; - padding-left: 20px; -} - -.nav .navbar-nav .navbar-right { - border: 0px; -} - -.nav li.active > a > span:after, -.nav li > a > span:after { - color: #717174; -} - -.nav li.active > a:hover > span:after, -.nav li > a:hover > span:after { - color: white; -} - -/*************************************************/ -/************* Table of Contents *************/ -/*************************************************/ -#toc { - border-bottom: 0px solid transparent; - padding: 10px 5px; -} - -div#toc ul li { - margin: 0px; - font-size: 90%; - list-style: none; -} - -div#toc ul { - background-color: transparent; - margin-bottom: 0px; - padding: 0px; -} - -div#toc > ul::before { - content: none; -} - -div#toc > .nav li > a { - color: #333; - border-left: 5px solid #DDDDDD; - background-color: transparent; - padding-top: 5px; - padding-bottom: 5px; -} - -div#toc > .nav li > a:hover { - border-left: 5px solid #717174; -} - -div#toc > .nav > li.active > a { - border-left: 5px solid #84C361; - font-weight: bold; -} - -div#toc > .nav > li.active > a:hover { - border-left: 5px solid #717174; - font-weight: bold; -} - -div#toc > .nav li > a:active { - text-decoration: none; -} - -div#toc > .nav ul li a { - border-top: 0px; -} - -div#toc ul li ul li::before { - content: none; -} - -div#toc ul li ul { - padding-left: 0px; -} - -div#toc ul li ul li a { - padding-left: 25px; -} - -div#toc ul li ul li.active a { - border-left: 5px solid #717174; - font-weight: bold; -} - -div#toc ul li ul, div#toc ul li ul li { - margin: 0px; -} - -/* Remove background color and borders when rendering code with line numbers. */ -.pygments table.pyhltable tbody tr td { - border: 0px; -} -.pygments table.pyhltable tbody tr { - background-color: transparent; -} - -/*************************************************/ -/*************** Platform topic **************/ -/*************************************************/ -#topic-container { - border-bottom: 0px solid transparent; - padding: 10px; -} - -#topic-platform { - margin-top: 20px; - margin-bottom: 20px; - margin-right: 10px; - background-color: #EEEEEE; -} - -.topic-platform-title { - font-weight: bold; - color: #646466; - margin-bottom: 10px; - float: left; - max-width: 80%; -} - -#topic-platform ul { - list-style: none; - margin-bottom: 0px; - margin-left: 0px; -} - -#topic-platform li::before { - content: "•"; - color: #646466; - margin-right: 10px; - font-size: 1.4em; - line-height: 0px; -} - -#help { - float: left; - margin-top: 4px; - margin-right: 6px; -} - -#topic-container .topic-list { - clear: both; - padding: 0px 10px; -} - -/*************************************************/ -/*********** Menu navigation TOC **************/ -/*************************************************/ -.navbar-inverse .navbar-collapse, .navbar-inverse .navbar-form { - border-color: #646466 !important; - background-color: #DDDDDD; - overflow: hidden; -} - -.menu-nav-title { - color: #646466; - margin: 15px 0px; - padding: 0px; - padding-left: 20px; - font-size: 24px; - width: fit-content; -} - -.menu-nav-title a:hover { - color: #00B7FF; -} - -.menu-nav-contents { - background-color: #EEEEEE; -} - -.menu-nav a { - color: #646466; - display: block; - outline: none; - text-decoration: none; -} - -.menu-nav ul { - padding: 0; - margin: 0px; -} - -.menu-nav li, .menu-nav li li { - margin: 0px; -} - -.menu-nav, .menu-nav ul, .menu-nav li { - list-style: none; -} - -.menu-nav li.sb-folders a { - padding-left: 60px; - font-size: 18px; - margin: 0px; - background-color: transparent; - border: 0px; - padding-top: 2px; - padding-bottom: 2px; -} - -.menu-nav-contents li.sb-folders a, -.menu-nav-contents li.sb-folders > ul li { - padding-left: 30px; - margin: 0px; - background-color: transparent; - border: 0px; -} - -.nav li.active > a, -.menu-nav-contents li.active > a { - color: #333; - font-weight: bold; - border-top: 1px; - border-style: solid; -} - -.nav li.super-active > a, -.menu-nav-contents li.super-active > a { - background: rgba(132, 195, 97, .25); -} - -.nav li.active > a { - border-color: white; -} - -.menu-nav-contents li.active > a { - border-color: #EEEEEE; -} - -.menu-nav li.sb-folders a:hover { - background-color: #8D8D8D; - color: white; -} - -.menu-nav li .sb-section { - background-color: #DDDDDD; - color: #646466; - font-size: 24px; - border: 0px; - padding: 5px 0px; - padding-left: 40px; -} - -.menu-nav li .sb-subsection { - background-color: #EEEEEE; - font-size: 22px; - border: 0px; - padding-left: 60px; -} - -/*************************************************/ -/************** Navigation bar ***************/ -/*************************************************/ -.navbar-collapse { - margin: 0px; - padding: 0px; -} - -.navbar-inverse { - border: 0px; -} - -.navbar-brand > img { - width: 24px; - height: 24px; -} - -.controls .control-icon-selected { - background-color: #84C361; - height: 5px; - margin-top: 3px; - margin-left: -10px; - margin-right: -10px; - vertical-align: bottom; -} - -.controls > a { - float: left; - padding: 8px 10px; - outline 0; -} - -.controls a.navbar-brand { - font-size: 16px; -} - -.controls { - margin-right: 10px; - margin-left: 10px; - height: 40px; - float: left; -} - -@media (max-width: 768px) { - .controls { - margin-left: 0px; - } -} - -.controls a:link, .controls a:visited, .controls a:active { - color: #717174; -} - -.controls a:hover, .controls a.navbar-brand:hover { - color: #00B7FF; -} - -#search { - margin: 10px 10px; -} - -/*************************************************/ -/***** Genaral purpose show/hide classes ******/ -/*************************************************/ -.display-on { - display: block; -} -.display-off { - display: none; -} - -/*************************************************/ -/******************** TABS *******************/ -/*************************************************/ -#tg-sb-content .tab-panel { - margin-bottom: 20px; - margin-top: 25px; -} - -#tg-sb-content .tab-panel .nav-tabs { - margin-bottom: 0px; - border-bottom: 1px solid #ddd; -} - -#tg-sb-content .tab-panel .nav-tabs > li { - margin: 0px; - margin-bottom: -1px; - margin-right: 5px; -} - -#tg-sb-content .tab-panel .nav-tabs > li > a { - background-color: #ddd; - color: #646466; - border: none; - border-bottom: 1px solid #ddd; -} - -#tg-sb-content .tab-panel .nav-tabs > li > a:hover { - background-color: #646466; - color: white; - border-bottom: 1px solid #646466; -} - -#tg-sb-content .tab-panel .nav-tabs > li.active > a, -#tg-sb-content .tab-panel .nav-tabs > li.active > a:hover { - color: #646466; - background-color: white; - font-weight: bold; - border: 1px solid #ddd; - border-bottom-color: transparent; -} - -#tg-sb-content .tab-panel .tab-content { - padding: 10px; - background-color: transparent; - border-left: 1px solid #ddd; - border-bottom: 1px solid #ddd; - border-right: 1px solid #ddd; - -webkit-box-shadow: 2px 2px 4px #e0e0dc; - box-shadow: 2px 2px 4px #e0e0dc; -} - -.tab-content > .exampleblock .content { - background-color: white; - border: none; - -webkit-box-shadow: none; - box-shadow: none; -} - -/********************************************************/ -/******************* Instant Search *****************/ -/********************************************************/ - -.aa-input-container { - display: inline-block; - position: relative; -} - -.aa-input-search { - padding: 6px 26px 6px 10px; - border: 2px solid #DDDDDD; - border-radius: 4px; - -webkit-transition: .2s; - transition: .2s; - font-size: 13px; - box-sizing: border-box; - color: #333; - -webkit-appearance: none; - -moz-appearance: none; - appearance: none; - margin-top: 3px; -} - -.aa-input-search::-webkit-search-decoration, -.aa-input-search::-webkit-search-cancel-button, -.aa-input-search::-webkit-search-results-button, -.aa-input-search::-webkit-search-results-decoration { - display: none; -} - -.aa-input-search:focus { - outline: 0; - border-color: #84C361; -} - -input::placeholder { /* Chrome, Firefox, Opera, Safari 10.1+ */ - color: #999999; - opacity: 1; /* Firefox */ -} -input::-webkit-input-placeholder { /* WebKit, Blink, Edge */ - color: #999999; -} -input:-moz-placeholder { /* Mozilla Firefox 4 to 18 */ - color: #999999; - opacity: 1; -} -input::-moz-placeholder { /* Mozilla Firefox 19+ */ - color: #999999; - opacity: 1; -} -input:-ms-input-placeholder { /* Internet Explorer 10-11 */ - color: #999999; -} -input::-ms-input-placeholder { /* Microsoft Edge */ - color: #999999; -} - -.aa-input-icon { - height: 16px; - width: 16px; - position: absolute; - top: 20px; - right: 16px; - -webkit-transform: translateY(-50%); - transform: translateY(-50%); - fill: #CCCCCC; -} - -.aa-hint { - color: #DDDDDD; -} - -.aa-dropdown-menu { - background-color: white; - border: 2px solid rgba(228, 228, 228, 0.6); - border-top-width: 1px; - margin-top: 2px; - font-size: 13px; - border-radius: 4px; - box-sizing: border-box; -} - -.aa-suggestion { - border-top: 1px solid rgba(228, 228, 228, 0.6); - cursor: pointer; - -webkit-transition: .2s; - transition: .2s; - display: -webkit-box; - display: -ms-flexbox; - display: flex; - -webkit-box-pack: justify; - -ms-flex-pack: justify; - justify-content: space-between; - -webkit-box-align: center; - -ms-flex-align: center; - align-items: center; -} - -.aa-suggestion .suggestion-link { - padding: 12px; - background-color: transparent; - width: 100%; -} - -.aa-suggestion .suggestion-link:after { - content: ""; -} - -.aa-suggestion .suggestion-link:hover, -.aa-cursor .suggestion-link { - background-color: rgba(132, 195, 97, .25) !important; -} - -.aa-suggestion .suggestion-link > span:first-child, -#show-more-link { - color: #333; - font-size: 14px; - display: block; -} - -#show-more-link { - text-align: center; - font-size: 16px; -} - -.aa-suggestion .suggestion-link > span:last-child { - color: #999999; - text-align: right; - overflow: hidden; - text-overflow: ellipsis; - height: 200px; -} - -.aa-suggestion .suggestion-link > span:last-child p { - font-size: 13px; -} - -.aa-suggestion .suggestion-link > span:first-child em, -.aa-suggestion .suggestion-link > span:last-child em { - font-weight: 700; - font-style: normal; - background-color: yellow; - padding: 2px 0 2px 2px; -} - -/********************************************************/ -/******************* Search Results *****************/ -/********************************************************/ - -/* INPUT */ -header { - position: relative; - height: 80px; - margin-top: 40px; -} - -/* INPUT */ -header .aa-input-search { - width: 600px; - padding: 15px 30px 15px 15px; - border: 2px solid #DDDDDD; - border-radius: 4px; - -webkit-transition: .2s; - transition: .2s; - font-size: 18px; - box-sizing: border-box; - -webkit-appearance: none; - -moz-appearance: none; - appearance: none; -} - -header .aa-input-icon { - height: 20px; - width: 20px; - position: absolute; - top: 50%; - right: 16px; - -webkit-transform: translateY(-50%); - transform: translateY(-50%); - fill: #CCCCCC; -} - -/* HITS */ -#hits { - margin: 4px 0; - padding: 10px 0; - border-top: 2px solid #eee; -} - -.hit { - font-size: 0; - padding: 15px 0; - border-bottom: 1px solid #eee; -} - -.hit-name { - margin: 0; -} - -.search-item { - font-size: 14px; - font-weight: 300; - display: inline-block; - vertical-align: top; -} - -.search-item em { - font-style: normal; - background-color: yellow; -} - -.search-item p { - font-size: 13px; -} - -/* PAGINATION */ -#pagination { - margin-top: 60px; -} - -#pagination ul { - font-size: 0; - list-style-type: none; - text-align: center; -} - -#pagination li { - font-size: 14px; - display: inline; -} -#pagination a { - padding: 8px 12px; - text-decoration: none; - color: #000; - border: 1px solid #eee; -} - -#pagination a:hover { - background: #f5f5f5; -} - -#pagination li:first-child a { - border-top-left-radius: 4px; - border-bottom-left-radius: 4px; -} - -#pagination li:last-child a { - border-right: 1px solid #eee; - border-top-right-radius: 4px; - border-bottom-right-radius: 4px; -} - -#pagination li.ais-pagination--item__active a { - color: white; - border-color: #84C361; - background: #84C361; -} - -#pagination li.ais-pagination--item__active a:hover { - cursor: default; -} - -#pagination li.ais-pagination--item__disabled a { - cursor: not-allowed; -} - -#pagination li.ais-pagination--item__disabled a:hover { - background: none; -} - -/* NO RESULTS */ -.no-results #pagination, .no-results #sort-by, .no-results #stats, .no-results #facets { - display: none; -} - -.ais-hits__empty { - font-size: 16px; - font-weight: bold; - padding-top: 10px; -} - -/*SEARCH RESULTS*/ -a.clear-all { - font-size: 12px; - line-height: 1; - display: inline-block; - margin: 10px; - padding: 8px 12px; - text-decoration: none; - color: black; - border: 2px solid #ddd; - border-radius: 4px; -} - -a.clear-all:hover { - transition: border-color .3s ease-in; - border-color: #999; -} - -.search-item { - padding-top: 15px; - padding-bottom: 15px; - line-height: 25px; -} - -.search-item .search-title a { - font-size: 18px; -} - -.search-item .search-title a:hover { - text-decoration: underline; -} - -.search-item .search-title a:after { - content: ""; -} - -.search-item .search-link { - color: #CCCCCC; - font-size: 14px; -} - -/********************************************************/ -/****************** Version selector ****************/ -/********************************************************/ - -#version-container-toc { - margin-top: 10px; - background-color: #DDDDDD; - padding: 5px; - text-align: right; - margin-bottom: -10px; -} - -#version-container-toc span { - font-size: 14px; -} - -#version-container-toc select { - width: auto; - font-size: 14px; -} - -#version-container-nav { - margin-top: 10px; - background-color: #DDDDDD; - padding: 5px; - text-align: right; -} - -#version-container-nav span { - font-size: 16px; -} - -#version-container-nav select { - width: auto; - font-size: 14px; -} - -#version-container-nav a { - display: unset; -} diff --git a/meta-digi-dey/dynamic-layers/webkit/recipes-browser/digi-webkit-examples/digi-webkit-examples/index.html b/meta-digi-dey/dynamic-layers/webkit/recipes-browser/digi-webkit-examples/digi-webkit-examples/index.html deleted file mode 100644 index 5e49dbb68..000000000 --- a/meta-digi-dey/dynamic-layers/webkit/recipes-browser/digi-webkit-examples/digi-webkit-examples/index.html +++ /dev/null @@ -1,38 +0,0 @@ - - -Digi WebKit examples - - - -

    Digi WebKit examples

    -

    This page contains a series of examples that showcase some of the main -features of the WPE WebKit.

    - -

    The main focus of this web engine is to leverage the hardware -capabilities of embedded systems to make browsing as efficient and as -lightweight as possible. You can find more information about the WPE WebKit at -https://wpewebkit.org/.

    - -

    When running an example, you can always come back to this page by executing -"cogctl previous" in the command line.

    - -

    WebGL examples

    - -

    WPE WebKit supports WebGL, a JavaScript library that allows -browsers to use the system's GPU to render 2D and 3D graphics. The following -examples have been obtained from -https://webglsamples.org/:

    - -
      ##WEBGL_SAMPLE_LIST##
    - -

    Video playback examples

    - -

    WPE WebKit uses gstreamer for multimedia playback. -##VPU_NOTE##

    - -

    You can test video playback with different formats using the links -below:

    - -
      ##VIDEO_SAMPLE_LIST##
    - - diff --git a/meta-digi-dey/dynamic-layers/webkit/recipes-browser/digi-webkit-examples/digi-webkit-examples.bb b/meta-digi-dey/dynamic-layers/webkit/recipes-browser/digi-webkit-examples/digi-webkit-examples_0.1.bb similarity index 57% rename from meta-digi-dey/dynamic-layers/webkit/recipes-browser/digi-webkit-examples/digi-webkit-examples.bb rename to meta-digi-dey/dynamic-layers/webkit/recipes-browser/digi-webkit-examples/digi-webkit-examples_0.1.bb index 2225dd129..41ed08e73 100644 --- a/meta-digi-dey/dynamic-layers/webkit/recipes-browser/digi-webkit-examples/digi-webkit-examples.bb +++ b/meta-digi-dey/dynamic-layers/webkit/recipes-browser/digi-webkit-examples/digi-webkit-examples_0.1.bb @@ -5,12 +5,12 @@ DESCRIPTION = "This webpage provides examples that show how the WPE WebKit lever LICENSE = "MPL-2.0" LIC_FILES_CHKSUM = "file://${COMMON_LICENSE_DIR}/MPL-2.0;md5=815ca599c9df247a0c7f619bab123dad" -SRC_URI = " \ - file://index.html \ - file://digi.css \ -" +SRC_URI = "${DIGI_PKG_SRC}/${BPN}-${PV}.tar.gz" -S = "${WORKDIR}" +SRC_URI[md5sum] = "cc4b81cf92135be3e231375e9a22fe6a" +SRC_URI[sha256sum] = "26ed0fafcf9d66eabac4c6963ea2e3fb46d3cc94d76d50413883f28f9c28f737" + +S = "${WORKDIR}/${PN}-${PV}" require digi-webkit-examples.inc @@ -21,44 +21,36 @@ RDEPENDS_${PN} = " \ ${WEBSERVER_PACKAGE} \ " -VPU_NOTE = "This means that, if the video format is supported by the VPU, WebKit will use the VPU to decode the video." -VPU_NOTE_ccimx8mn = "Since the ConnectCore 8M Nano doesn't have a VPU, WebKit will decode the videos using gstreamer software." - # The package contains static webpages, no need to configure or compile do_configure[noexec] = "1" do_compile[noexec] = "1" do_install() { - install -d ${D}/${WEBSERVER_ROOT} + install -d ${D}/${WEBSERVER_ROOT}/style + install -d ${D}/${WEBSERVER_ROOT}/images + install -m 644 ${S}/examples_viewer.html ${D}/${WEBSERVER_ROOT} install -m 644 ${S}/index.html ${D}/${WEBSERVER_ROOT} - install -m 644 ${S}/digi.css ${D}/${WEBSERVER_ROOT} + install -m 644 ${S}/style/* ${D}/${WEBSERVER_ROOT}/style + install -m 644 ${S}/images/* ${D}/${WEBSERVER_ROOT}/images # Most entry points for the WebGL samples have the same format: # /.html. Since we might define different sample lists per # platform, we should generate the list of samples dynamically. SAMPLE_LIST="" - ENTRY='
  • _name_

  • ' for sample in ${WEBGL_SAMPLES}; do - SAMPLE_LIST="${SAMPLE_LIST}\n$(echo ${ENTRY} | sed s/_name_/${sample}/g)" + SAMPLE_LIST="${SAMPLE_LIST}\n$(sed s/_name_/${sample}/g ${S}/webgl_demo_template)" done - SAMPLE_LIST="${SAMPLE_LIST}\n" - sed -i s,##WEBGL_SAMPLE_LIST##,"${SAMPLE_LIST}",g ${D}/${WEBSERVER_ROOT}/index.html - # Add a note regarding the video decoding process, which depends on the - # platform. - sed -i s/##VPU_NOTE##/"${VPU_NOTE}"/g ${D}/${WEBSERVER_ROOT}/index.html - # Use the same method to dynamically generate the list of video # examples. SAMPLE_LIST="" - ENTRY='
  • _name_

  • ' - for sample in ${VIDEO_SAMPLES}; do - SAMPLE_LIST="${SAMPLE_LIST}\n$(echo ${ENTRY} | sed s/_name_/${sample}/g)" + for format in ${VIDEO_FORMATS}; do + SAMPLE_LIST="${SAMPLE_LIST}\n$(sed s/_fmt_/${format}/g ${S}/video_demo_template | \ + sed s/_name_/${VIDEO_NAME}/g | \ + sed s/_name-upper_/"${VIDEO_NAME_UPPERCASE}"/g)" done - SAMPLE_LIST="${SAMPLE_LIST}\n" - sed -i s,##VIDEO_SAMPLE_LIST##,"${SAMPLE_LIST}",g ${D}/${WEBSERVER_ROOT}/index.html } diff --git a/meta-digi-dey/dynamic-layers/webkit/recipes-browser/digi-webkit-examples/video-examples_0.1.bb b/meta-digi-dey/dynamic-layers/webkit/recipes-browser/digi-webkit-examples/video-examples_0.1.bb index b0ee5f197..88433346e 100644 --- a/meta-digi-dey/dynamic-layers/webkit/recipes-browser/digi-webkit-examples/video-examples_0.1.bb +++ b/meta-digi-dey/dynamic-layers/webkit/recipes-browser/digi-webkit-examples/video-examples_0.1.bb @@ -22,7 +22,7 @@ do_compile[noexec] = "1" do_install() { install -d ${D}/${WEBSERVER_ROOT}/videos - for sample in ${VIDEO_SAMPLES}; do - install -m 644 ${S}/${sample} ${D}/${WEBSERVER_ROOT}/videos + for format in ${VIDEO_FORMATS}; do + install -m 644 ${S}/${VIDEO_NAME}.${format} ${D}/${WEBSERVER_ROOT}/videos done }