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" 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 29296580b..62df43636 100644 --- a/meta-digi-arm/conf/machine/ccimx8x-sbc-pro.conf +++ b/meta-digi-arm/conf/machine/ccimx8x-sbc-pro.conf @@ -22,6 +22,7 @@ KERNEL_DEVICETREE ?= " \ 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 \ digi/_ov_som_mca-keypad_ccimx8x.dtbo \ 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" diff --git a/meta-digi-arm/conf/machine/include/ccimx8mn.inc b/meta-digi-arm/conf/machine/include/ccimx8mn.inc index ac0ee1ff2..8a59abfb2 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" @@ -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 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}" 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" 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 486c810cc..402a1d22c 100644 Binary files a/meta-digi-arm/recipes-bsp/firmware-qualcomm/firmware-qualcomm/ccimx8mn/bdwlan30_US.bin and b/meta-digi-arm/recipes-bsp/firmware-qualcomm/firmware-qualcomm/ccimx8mn/bdwlan30_US.bin differ 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" 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-boot_1.0.bbappend b/meta-digi-arm/recipes-bsp/imx-mkimage/imx-boot_1.0.bbappend index 53440c60c..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 @@ -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 () { @@ -216,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 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" 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" 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)" 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 e7e038103..000000000 --- a/meta-digi-arm/recipes-bsp/trustfence-cst/trustfence-cst.inc +++ /dev/null @@ -1,69 +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 = "CLOSED" - -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', 'file://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 \ -" - -# 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..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 @@ -1,3 +1,62 @@ -# 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" + +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/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/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_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/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 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-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..77298bf4e 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/maint" SRCREV = "${AUTOREV}" -COMPATIBLE_MACHINE = "(ccimx8x)" +COMPATIBLE_MACHINE = "(ccimx8x|ccimx8m|ccimx6ul)" 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)" 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 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" 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}" +} 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" 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/conf/distro/dey.conf b/meta-digi-dey/conf/distro/dey.conf index d46f9a346..0792479f0 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')}" @@ -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 @@ -69,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/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/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/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 new file mode 100644 index 000000000..954f8d9f8 --- /dev/null +++ b/meta-digi-dey/dynamic-layers/webkit/recipes-browser/cog/cog_0.7.1.bbappend @@ -0,0 +1,12 @@ +# 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 \ + 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=http://127.0.0.1/" 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..f007fb189 --- /dev/null +++ b/meta-digi-dey/dynamic-layers/webkit/recipes-browser/digi-webkit-examples/digi-webkit-examples.inc @@ -0,0 +1,52 @@ +# 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} \ +" + +# 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 +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_0.1.bb b/meta-digi-dey/dynamic-layers/webkit/recipes-browser/digi-webkit-examples/digi-webkit-examples_0.1.bb new file mode 100644 index 000000000..41ed08e73 --- /dev/null +++ b/meta-digi-dey/dynamic-layers/webkit/recipes-browser/digi-webkit-examples/digi-webkit-examples_0.1.bb @@ -0,0 +1,56 @@ +# 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 = "${DIGI_PKG_SRC}/${BPN}-${PV}.tar.gz" + +SRC_URI[md5sum] = "cc4b81cf92135be3e231375e9a22fe6a" +SRC_URI[sha256sum] = "26ed0fafcf9d66eabac4c6963ea2e3fb46d3cc94d76d50413883f28f9c28f737" + +S = "${WORKDIR}/${PN}-${PV}" + +require digi-webkit-examples.inc + +RDEPENDS_${PN} = " \ + cog \ + video-examples \ + 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}/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}/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="" + for sample in ${WEBGL_SAMPLES}; do + SAMPLE_LIST="${SAMPLE_LIST}\n$(sed s/_name_/${sample}/g ${S}/webgl_demo_template)" + done + + sed -i s,##WEBGL_SAMPLE_LIST##,"${SAMPLE_LIST}",g ${D}/${WEBSERVER_ROOT}/index.html + + # Use the same method to dynamically generate the list of video + # examples. + SAMPLE_LIST="" + 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 + + 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 new file mode 100644 index 000000000..88433346e --- /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 format in ${VIDEO_FORMATS}; do + install -m 644 ${S}/${VIDEO_NAME}.${format} ${D}/${WEBSERVER_ROOT}/videos + done +} 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..05293f767 --- /dev/null +++ b/meta-digi-dey/dynamic-layers/webkit/recipes-browser/digi-webkit-examples/webglsamples_git.bb @@ -0,0 +1,34 @@ +# 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" + +require digi-webkit-examples.inc + +# 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 +} 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..3376ddf22 --- /dev/null +++ b/meta-digi-dey/dynamic-layers/webkit/recipes-browser/packagegroups/packagegroup-dey-webkit.bb @@ -0,0 +1,14 @@ +# +# Copyright (C) 2020, Digi International Inc. +# +SUMMARY = "WebKit packagegroup for DEY image" + +PACKAGE_ARCH = "${MACHINE_ARCH}" +inherit packagegroup + +# Include WPE WebKit, launcher (cog) and examples +RDEPENDS_${PN} += " \ + cog \ + digi-webkit-examples \ + wpewebkit \ +" 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..3bd4f2170 --- /dev/null +++ b/meta-digi-dey/dynamic-layers/webkit/recipes-browser/wpewebkit/wpewebkit_2.28.1.bbappend @@ -0,0 +1,15 @@ +# Copyright 2020, Digi International Inc. + +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 + +REQUIRED_DISTRO_FEATURES = "wayland" 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/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 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}" 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/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 ] 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" 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" 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" 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)" 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 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 \ + " 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" 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/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)" 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)" 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 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" 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" 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..68d2495bf 100644 --- a/sdk/config/ccimx8mn-dvk/bblayers.conf.sample +++ b/sdk/config/ccimx8mn-dvk/bblayers.conf.sample @@ -17,6 +17,8 @@ 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 \ " 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