From 0efbb07107e5bf49b7ba503a60405b67a46b66a7 Mon Sep 17 00:00:00 2001 From: Arturo Buzarra Date: Mon, 21 Nov 2022 11:55:59 +0100 Subject: [PATCH 01/25] meta-digi: branch to dey-4.0/maint Signed-off-by: Arturo Buzarra --- .../recipes-bsp/trusted-firmware-a/tf-a-stm32mp_%.bbappend | 2 +- .../recipes-security/optee/optee-os-stm32mp_%.bbappend | 2 +- meta-digi-arm/recipes-bsp/u-boot/u-boot-dey_2020.04.bb | 4 ++-- meta-digi-arm/recipes-bsp/u-boot/u-boot-dey_2021.10.bb | 2 +- .../recipes-digi/trustfence/trustfence-sign-tools_git.bb | 2 +- .../kernel-module-qualcomm/kernel-module-qualcomm.bb | 2 +- meta-digi-arm/recipes-kernel/linux/linux-dey_5.15.bb | 4 ++-- .../recipes-digi/cloudconnector/cloudconnector_git.bb | 2 +- meta-digi-dey/recipes-digi/dey-examples/dey-examples-src.inc | 4 ++-- meta-digi-dey/recipes-digi/libdigiapix/libdigiapix_git.bb | 2 +- 10 files changed, 13 insertions(+), 13 deletions(-) diff --git a/meta-digi-arm/dynamic-layers/stm-st-stm32mp/recipes-bsp/trusted-firmware-a/tf-a-stm32mp_%.bbappend b/meta-digi-arm/dynamic-layers/stm-st-stm32mp/recipes-bsp/trusted-firmware-a/tf-a-stm32mp_%.bbappend index ba9b87759..3c96008f2 100644 --- a/meta-digi-arm/dynamic-layers/stm-st-stm32mp/recipes-bsp/trusted-firmware-a/tf-a-stm32mp_%.bbappend +++ b/meta-digi-arm/dynamic-layers/stm-st-stm32mp/recipes-bsp/trusted-firmware-a/tf-a-stm32mp_%.bbappend @@ -7,7 +7,7 @@ TFA_URI_STASH = "${DIGI_MTK_GIT}/emp/arm-trusted-firmware.git;protocol=ssh" TFA_URI_GITHUB = "${DIGI_GITHUB_GIT}/arm-trusted-firmware.git;protocol=https" TFA_GIT_URI ?= "${@oe.utils.conditional('DIGI_INTERNAL_GIT', '1' , '${TFA_URI_STASH}', '${TFA_URI_GITHUB}', d)}" -SRCBRANCH = "v2.6/stm32mp/master" +SRCBRANCH = "v2.6/stm32mp/maint" SRCREV = "${AUTOREV}" SRC_URI = " \ diff --git a/meta-digi-arm/dynamic-layers/stm-st-stm32mp/recipes-security/optee/optee-os-stm32mp_%.bbappend b/meta-digi-arm/dynamic-layers/stm-st-stm32mp/recipes-security/optee/optee-os-stm32mp_%.bbappend index 3963f0665..ec8bc733a 100644 --- a/meta-digi-arm/dynamic-layers/stm-st-stm32mp/recipes-security/optee/optee-os-stm32mp_%.bbappend +++ b/meta-digi-arm/dynamic-layers/stm-st-stm32mp/recipes-security/optee/optee-os-stm32mp_%.bbappend @@ -7,7 +7,7 @@ OPTEE_URI_STASH = "${DIGI_MTK_GIT}/emp/optee_os.git;protocol=ssh" OPTEE_URI_GITHUB = "${DIGI_GITHUB_GIT}/optee_os.git;protocol=https" OPTEE_GIT_URI ?= "${@oe.utils.conditional('DIGI_INTERNAL_GIT', '1' , '${OPTEE_URI_STASH}', '${OPTEE_URI_GITHUB}', d)}" -SRCBRANCH = "3.16.0/stm/master" +SRCBRANCH = "3.16.0/stm/maint" SRCREV = "${AUTOREV}" SRC_URI = " \ 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 2b3f9a8f7..31df54434 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 @@ -1,11 +1,11 @@ -# Copyright (C) 2020-2021 Digi International +# Copyright (C) 2020-2022 Digi International require digi-u-boot.inc LIC_FILES_CHKSUM = "file://Licenses/README;md5=30503fd321432fc713238f582193b78e" DEPENDS += "flex-native bison-native" -SRCBRANCH = "v2020.04/master" +SRCBRANCH = "v2020.04/maint" SRCREV = "${AUTOREV}" COMPATIBLE_MACHINE = "(ccimx8x|ccimx8m|ccimx6ul)" diff --git a/meta-digi-arm/recipes-bsp/u-boot/u-boot-dey_2021.10.bb b/meta-digi-arm/recipes-bsp/u-boot/u-boot-dey_2021.10.bb index 95d2c1904..c1d262c15 100644 --- a/meta-digi-arm/recipes-bsp/u-boot/u-boot-dey_2021.10.bb +++ b/meta-digi-arm/recipes-bsp/u-boot/u-boot-dey_2021.10.bb @@ -6,7 +6,7 @@ LIC_FILES_CHKSUM = "file://Licenses/README;md5=5a7450c57ffe5ae63fd732446b988025" DEPENDS += "flex-native bison-native" DEPENDS += "python3-setuptools-native" -SRCBRANCH = "v2021.10/master" +SRCBRANCH = "v2021.10/maint" SRCREV = "${AUTOREV}" COMPATIBLE_MACHINE = "(ccmp1)" diff --git a/meta-digi-arm/recipes-digi/trustfence/trustfence-sign-tools_git.bb b/meta-digi-arm/recipes-digi/trustfence/trustfence-sign-tools_git.bb index 12af04c6d..fdf63f5d5 100644 --- a/meta-digi-arm/recipes-digi/trustfence/trustfence-sign-tools_git.bb +++ b/meta-digi-arm/recipes-digi/trustfence/trustfence-sign-tools_git.bb @@ -7,7 +7,7 @@ LIC_FILES_CHKSUM = "file://${COMMON_LICENSE_DIR}/GPL-2.0-only;md5=801f80980d171d DEPENDS = "trustfence-cst coreutils util-linux" DEPENDS += "${@oe.utils.conditional('TRUSTFENCE_SIGN_MODE', 'AHAB', 'imx-mkimage', '', d)}" -SRCBRANCH = "v2020.04/master" +SRCBRANCH = "v2020.04/maint" SRCREV = "${AUTOREV}" S = "${WORKDIR}" diff --git a/meta-digi-arm/recipes-kernel/kernel-module-qualcomm/kernel-module-qualcomm.bb b/meta-digi-arm/recipes-kernel/kernel-module-qualcomm/kernel-module-qualcomm.bb index 4d8d6d7a1..798eff21d 100644 --- a/meta-digi-arm/recipes-kernel/kernel-module-qualcomm/kernel-module-qualcomm.bb +++ b/meta-digi-arm/recipes-kernel/kernel-module-qualcomm/kernel-module-qualcomm.bb @@ -8,7 +8,7 @@ LIC_FILES_CHKSUM = "file://${COMMON_LICENSE_DIR}/ISC;md5=f3b90e78ea0cffb20bf5cca # Reference Qualcomm tag/version PV = "v4.0.11.213X" -SRCBRANCH = "qca65X4/master" +SRCBRANCH = "qca65X4/dey-4.0/maint" SRCREV = "${AUTOREV}" QCOM_GIT_URI = "${@oe.utils.conditional('DIGI_INTERNAL_GIT', '1' , '${DIGI_MTK_GIT}/linux/qcacld-2.0.git;protocol=ssh', '${DIGI_GITHUB_GIT}/qcacld-2.0.git;protocol=https', d)}" diff --git a/meta-digi-arm/recipes-kernel/linux/linux-dey_5.15.bb b/meta-digi-arm/recipes-kernel/linux/linux-dey_5.15.bb index abbdfb850..b511d33c4 100644 --- a/meta-digi-arm/recipes-kernel/linux/linux-dey_5.15.bb +++ b/meta-digi-arm/recipes-kernel/linux/linux-dey_5.15.bb @@ -10,8 +10,8 @@ DEPENDS += "${@oe.utils.conditional('DEY_BUILD_PLATFORM', 'NXP', 'lzop-native', inherit kernel inherit ${@oe.utils.conditional('DEY_BUILD_PLATFORM', 'NXP', 'fsl-kernel-localversion', '', d)} -SRCBRANCH = "v5.15.52/nxp/master" -SRCBRANCH:stm32mpcommon = "v5.15.24/stm/master" +SRCBRANCH = "v5.15/nxp/dey-4.0/maint" +SRCBRANCH:stm32mpcommon = "v5.15/stm/dey-4.0/maint" SRCREV = "${AUTOREV}" SRCREV:stm32mpcommon = "${AUTOREV}" diff --git a/meta-digi-dey/recipes-digi/cloudconnector/cloudconnector_git.bb b/meta-digi-dey/recipes-digi/cloudconnector/cloudconnector_git.bb index 2cae1f0f6..83f23bc4c 100644 --- a/meta-digi-dey/recipes-digi/cloudconnector/cloudconnector_git.bb +++ b/meta-digi-dey/recipes-digi/cloudconnector/cloudconnector_git.bb @@ -7,7 +7,7 @@ LIC_FILES_CHKSUM = "file://${COMMON_LICENSE_DIR}/MPL-2.0;md5=815ca599c9df247a0c7 DEPENDS = "confuse libdigiapix openssl recovery-utils swupdate zlib json-c" -SRCBRANCH = "master" +SRCBRANCH = "dey-4.0/maint" SRCREV = "${AUTOREV}" CC_STASH = "gitsm://git@stash.digi.com/cc/cc_dey.git;protocol=ssh" diff --git a/meta-digi-dey/recipes-digi/dey-examples/dey-examples-src.inc b/meta-digi-dey/recipes-digi/dey-examples/dey-examples-src.inc index 1117c0537..97a2d77b4 100644 --- a/meta-digi-dey/recipes-digi/dey-examples/dey-examples-src.inc +++ b/meta-digi-dey/recipes-digi/dey-examples/dey-examples-src.inc @@ -1,6 +1,6 @@ -# Copyright (C) 2019-2021 Digi International Inc. +# Copyright (C) 2019-2022 Digi International Inc. -SRCBRANCH = "master" +SRCBRANCH = "dey-4.0/maint" SRCREV = "${AUTOREV}" DEY_EXAMPLES_STASH = "${DIGI_MTK_GIT}/dey/dey-examples.git;protocol=ssh" diff --git a/meta-digi-dey/recipes-digi/libdigiapix/libdigiapix_git.bb b/meta-digi-dey/recipes-digi/libdigiapix/libdigiapix_git.bb index b636abc51..f0f12c259 100644 --- a/meta-digi-dey/recipes-digi/libdigiapix/libdigiapix_git.bb +++ b/meta-digi-dey/recipes-digi/libdigiapix/libdigiapix_git.bb @@ -6,7 +6,7 @@ SECTION = "libs" LICENSE = "ISC" LIC_FILES_CHKSUM = "file://${COMMON_LICENSE_DIR}/ISC;md5=f3b90e78ea0cffb20bf5cca7947a896d" -SRCBRANCH ?= "master" +SRCBRANCH ?= "dey-4.0/maint" SRCREV = "${AUTOREV}" LIBDIGIAPIX_URI_STASH = "${DIGI_MTK_GIT}/dey/libdigiapix.git;protocol=ssh" From 9ad980e0d78a341a22e0f80e82439816a0f27f77 Mon Sep 17 00:00:00 2001 From: Arturo Buzarra Date: Tue, 22 Nov 2022 09:01:45 +0100 Subject: [PATCH 02/25] ccmp1: remove unused build artifacts This commit removes duplicated and unused build artifacts for the ccmp1 platforms. Also fixes a build warning related with flashlayout config file. Signed-off-by: Arturo Buzarra --- meta-digi-arm/conf/machine/include/ccmp1.inc | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/meta-digi-arm/conf/machine/include/ccmp1.inc b/meta-digi-arm/conf/machine/include/ccmp1.inc index 3561b13e9..207961fb4 100644 --- a/meta-digi-arm/conf/machine/include/ccmp1.inc +++ b/meta-digi-arm/conf/machine/include/ccmp1.inc @@ -31,3 +31,9 @@ DUALBOOT_ENABLED ?= "true" # Extra udev rules MACHINE_EXTRA_RRECOMMENDS += "udev-extraconf" + +# Image FS types +IMAGE_FSTYPES:remove = "ext4 tar.xz" + +# List of supported boot devices +BOOTDEVICE_LABELS ?= "sdcard" From 6ffbbb390af7b8d6c196a374a6ac13a1e3f461e7 Mon Sep 17 00:00:00 2001 From: Francisco Gil Date: Thu, 17 Nov 2022 17:05:20 +0100 Subject: [PATCH 03/25] dualboot: get rid of DUALBOOT_ENABLED configuration All the dualboot logic will be checked in run time. To do this: * Include the altboot.src by default in all the images * Create a post installation script to change the firmware_download_path in the cloud connector * Unify the swupdate file descriptor for dual and single boot Signed-off-by: Francisco Gil --- meta-digi-arm/conf/machine/include/ccmp1.inc | 3 - .../conf/machine/include/digi-defaults.inc | 2 +- .../recipes-bsp/u-boot/digi-u-boot.inc | 16 +-- .../packagegroups/packagegroup-dey-core.bb | 3 +- .../cloudconnector/cloudconnector_git.bb | 11 +- .../swu-images/files/sw-description | 114 +++++++++++++++++- .../swu-images/files/sw-description-dualboot | 107 ---------------- meta-digi-dey/recipes-digi/swu-images/swu.inc | 23 ++-- 8 files changed, 133 insertions(+), 146 deletions(-) delete mode 100644 meta-digi-dey/recipes-digi/swu-images/files/sw-description-dualboot diff --git a/meta-digi-arm/conf/machine/include/ccmp1.inc b/meta-digi-arm/conf/machine/include/ccmp1.inc index 207961fb4..16e572123 100644 --- a/meta-digi-arm/conf/machine/include/ccmp1.inc +++ b/meta-digi-arm/conf/machine/include/ccmp1.inc @@ -26,9 +26,6 @@ ROOTFS_DEV_NAME_FINAL = "${@oe.utils.ifelse(d.getVar('TRUSTFENCE_ENCRYPT_ROOTFS' UBOOT_DEV_NAME ?= "/dev/mtd" -# Add dualboot support -DUALBOOT_ENABLED ?= "true" - # Extra udev rules MACHINE_EXTRA_RRECOMMENDS += "udev-extraconf" diff --git a/meta-digi-arm/conf/machine/include/digi-defaults.inc b/meta-digi-arm/conf/machine/include/digi-defaults.inc index e0bcd1352..8f2f9bb2c 100644 --- a/meta-digi-arm/conf/machine/include/digi-defaults.inc +++ b/meta-digi-arm/conf/machine/include/digi-defaults.inc @@ -84,7 +84,7 @@ DEY_SELINUX_POLICY ?= "1" # U-Boot scripts to include in 'linux' partition # (use the '+=' operator, since other layers may append scripts to this list) -BOOT_SCRIPTS += "boot.scr:boot.scr ${@oe.utils.vartrue('DUALBOOT_ENABLED', 'altboot.scr:altboot.scr', '', d)}" +BOOT_SCRIPTS += "boot.scr:boot.scr altboot.scr:altboot.scr" # This can be used to enable U-Boot update through swupdate SWUPDATE_UBOOTIMG ?= "false" 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 748728579..68936b6a8 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 @@ -21,11 +21,11 @@ UBOOT_GIT_URI ?= "${@oe.utils.conditional('DIGI_INTERNAL_GIT', '1' , '${UBOOT_UR SRC_URI = " \ ${UBOOT_GIT_URI};branch=${SRCBRANCH} \ + file://altboot.txt \ 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)} \ - ${@oe.utils.vartrue('DUALBOOT_ENABLED', 'file://altboot.txt', '', d)} \ " BOOTLOADER_IMAGE_RECIPE ?= "u-boot" @@ -186,9 +186,7 @@ do_deploy:append() { mkimage -T script -n bootscript -C none -d ${TMP_BOOTSCR} ${DEPLOYDIR}/boot.scr # Alternate boot script for dualboot - if [ "${DUALBOOT_ENABLED}" = "true" ]; then - mkimage -T script -n "Alternate bootscript" -C none -d ${WORKDIR}/altboot.txt ${DEPLOYDIR}/altboot.scr - fi + mkimage -T script -n "Alternate bootscript" -C none -d ${WORKDIR}/altboot.txt ${DEPLOYDIR}/altboot.scr # Sign the scripts if [ "${TRUSTFENCE_SIGN}" = "1" ]; then @@ -201,12 +199,10 @@ do_deploy:append() { trustfence-sign-artifact.sh -p "${DIGI_FAMILY}" -b "${DEPLOYDIR}/boot.scr" "${TMP_SIGNED_BOOTSCR}" mv "${TMP_SIGNED_BOOTSCR}" "${DEPLOYDIR}/boot.scr" - if [ "${DUALBOOT_ENABLED}" = "true" ]; then - # Sign boot script - TMP_SIGNED_BOOTSCR="$(mktemp ${WORKDIR}/altboot-signed.XXXXXX)" - trustfence-sign-artifact.sh -p "${DIGI_FAMILY}" -b "${DEPLOYDIR}/altboot.scr" "${TMP_SIGNED_BOOTSCR}" - mv "${TMP_SIGNED_BOOTSCR}" "${DEPLOYDIR}/altboot.scr" - fi + # Sign altboot script + TMP_SIGNED_BOOTSCR="$(mktemp ${WORKDIR}/altboot-signed.XXXXXX)" + trustfence-sign-artifact.sh -p "${DIGI_FAMILY}" -b "${DEPLOYDIR}/altboot.scr" "${TMP_SIGNED_BOOTSCR}" + mv "${TMP_SIGNED_BOOTSCR}" "${DEPLOYDIR}/altboot.scr" fi rm -f ${TMP_BOOTSCR} } diff --git a/meta-digi-dey/recipes-core/packagegroups/packagegroup-dey-core.bb b/meta-digi-dey/recipes-core/packagegroups/packagegroup-dey-core.bb index 02d1bebc3..f556efb2e 100644 --- a/meta-digi-dey/recipes-core/packagegroups/packagegroup-dey-core.bb +++ b/meta-digi-dey/recipes-core/packagegroups/packagegroup-dey-core.bb @@ -36,7 +36,7 @@ RDEPENDS:${PN} = "\ connectcore-demo-example \ cloudconnector \ cryptodev-module \ - ${@oe.utils.vartrue('DUALBOOT_ENABLED', 'dualboot', 'recovery-utils', d)} \ + dualboot \ ${@bb.utils.contains('DISTRO_FEATURES', 'systemd', 'firmwared', '',d)} \ ${@bb.utils.contains("MACHINE_FEATURES", "keyboard", "${VIRTUAL-RUNTIME_keymaps}", "", d)} \ ${@bb.utils.contains('DISTRO_FEATURES', 'systemd', '', bb.utils.contains("MACHINE_FEATURES", "rtc", "${VIRTUAL-RUNTIME_base-utils-hwclock}", "", d), d)} \ @@ -52,6 +52,7 @@ RDEPENDS:${PN} = "\ networkmanager-nmcli \ os-release \ ${@bb.utils.contains('MACHINE_FEATURES', 'pci', 'pciutils', '',d)} \ + recovery-utils \ sysinfo \ ${@bb.utils.contains('DISTRO_FEATURES', 'systemd', 'system-monitor', '',d)} \ usbutils \ diff --git a/meta-digi-dey/recipes-digi/cloudconnector/cloudconnector_git.bb b/meta-digi-dey/recipes-digi/cloudconnector/cloudconnector_git.bb index 83f23bc4c..8c4cb15a1 100644 --- a/meta-digi-dey/recipes-digi/cloudconnector/cloudconnector_git.bb +++ b/meta-digi-dey/recipes-digi/cloudconnector/cloudconnector_git.bb @@ -34,10 +34,6 @@ do_install() { install -m 0644 ${WORKDIR}/cloud-connector.service ${D}${systemd_unitdir}/system/ fi - if ${@oe.utils.vartrue('DUALBOOT_ENABLED', 'true', 'false', d)}; then - sed -i "/firmware_download_path = \/mnt\/update/c\firmware_download_path = \/home\/root" ${D}${sysconfdir}/cc.conf - fi - install -d ${D}${sysconfdir}/init.d/ install -m 755 ${WORKDIR}/cloud-connector-init ${D}${sysconfdir}/cloud-connector ln -sf /etc/cloud-connector ${D}${sysconfdir}/init.d/cloud-connector @@ -51,6 +47,13 @@ do_install:append:ccmp1() { sed -i "/client_cert_path = \"\/etc\/ssl\/certs\/drm_cert.pem\"/c\client_cert_path = \"\/mnt\/data\/drm_cert.pem\"" ${D}${sysconfdir}/cc.conf } +pkg_postinst_ontarget:${PN}() { + # If dualboot is enabled, change the CloudConnector download path on the first boot + if [ "$(fw_printenv -n dualboot 2>/dev/null)" = "yes" ]; then + sed -i "/firmware_download_path = \/mnt\/update/c\firmware_download_path = \/home\/root" /etc/cc.conf + fi +} + INITSCRIPT_NAME = "cloud-connector" SYSTEMD_SERVICE:${PN} = "cloud-connector.service" diff --git a/meta-digi-dey/recipes-digi/swu-images/files/sw-description b/meta-digi-dey/recipes-digi/swu-images/files/sw-description index d2ee699f1..ddd469d42 100644 --- a/meta-digi-dey/recipes-digi/swu-images/files/sw-description +++ b/meta-digi-dey/recipes-digi/swu-images/files/sw-description @@ -4,7 +4,57 @@ software = description = "##DESCRIPTION##"; mmc = { - platform: { + primary: { + images: ( + { + filename = "##BOOTIMG_NAME##"; + device = "##BOOT_DEV_A##"; + type = "raw"; + sha256 = "$swupdate_get_sha256(##BOOTIMG_NAME##)"; + installed-directly = true; + }, + { + filename = "##ROOTIMG_NAME##"; + device = "##ROOTFS_DEV_A##"; + type = "raw"; + sha256 = "$swupdate_get_sha256(##ROOTIMG_NAME##)"; + compressed = "zlib"; + installed-directly = true; + } + ); + uboot: ( + { + name = "upgrade_available"; + value = "1"; + } + ); + } + secondary: { + images: ( + { + filename = "##BOOTIMG_NAME##"; + device = "##BOOT_DEV_B##"; + type = "raw"; + sha256 = "$swupdate_get_sha256(##BOOTIMG_NAME##)"; + installed-directly = true; + }, + { + filename = "##ROOTIMG_NAME##"; + device = "##ROOTFS_DEV_B##"; + type = "raw"; + sha256 = "$swupdate_get_sha256(##ROOTIMG_NAME##)"; + compressed = "zlib"; + installed-directly = true; + } + ); + uboot: ( + { + name = "upgrade_available"; + value = "1"; + } + ); + } + single: { images: ( { filename = "##BOOTIMG_NAME##"; @@ -22,10 +72,61 @@ software = installed-directly = true; } ); - }; - }; + } + platform = { + ref = "#./single"; + } + } mtd = { - platform: { + primary: { + images: ( + { + filename = "##BOOTIMG_NAME##"; + volume = "##BOOT_DEV_A##"; + type = "ubivol"; + sha256 = "$swupdate_get_sha256(##BOOTIMG_NAME##)"; + installed-directly = true; + }, + { + filename = "##ROOTIMG_NAME##"; + volume = "##ROOTFS_DEV_A##"; + type = "ubivol"; + sha256 = "$swupdate_get_sha256(##ROOTIMG_NAME##)"; + installed-directly = true; + } + ); + uboot: ( + { + name = "upgrade_available"; + value = "1"; + } + ); + } + secondary: { + images: ( + { + filename = "##BOOTIMG_NAME##"; + volume = "##BOOT_DEV_B##"; + type = "ubivol"; + sha256 = "$swupdate_get_sha256(##BOOTIMG_NAME##)"; + installed-directly = true; + }, + { + filename = "##ROOTIMG_NAME##"; + volume = "##ROOTFS_DEV_B##"; + type = "ubivol"; + sha256 = "$swupdate_get_sha256(##ROOTIMG_NAME##)"; + installed-directly = true; + } + ); + uboot: ( + { + name = "upgrade_available"; + value = "1"; + } + ); + } + single: { images: ( { filename = "##BOOTIMG_NAME##"; @@ -42,6 +143,9 @@ software = installed-directly = true; } ); - }; + } + platform = { + ref = "#./single"; + } }; } diff --git a/meta-digi-dey/recipes-digi/swu-images/files/sw-description-dualboot b/meta-digi-dey/recipes-digi/swu-images/files/sw-description-dualboot deleted file mode 100644 index 52a93b25c..000000000 --- a/meta-digi-dey/recipes-digi/swu-images/files/sw-description-dualboot +++ /dev/null @@ -1,107 +0,0 @@ -software = -{ - version = "##SW_VERSION##"; - - mmc = { - primary: { - images: ( - { - filename = "##BOOTIMG_NAME##"; - device = "##BOOT_DEV_A##"; - type = "raw"; - sha256 = "$swupdate_get_sha256(##BOOTIMG_NAME##)"; - installed-directly = true; - }, - { - filename = "##ROOTIMG_NAME##"; - device = "##ROOTFS_DEV_A##"; - type = "raw"; - sha256 = "$swupdate_get_sha256(##ROOTIMG_NAME##)"; - compressed = "zlib"; - installed-directly = true; - } - ); - uboot: ( - { - name = "upgrade_available"; - value = "1"; - } - ); - } - secondary: { - images: ( - { - filename = "##BOOTIMG_NAME##"; - device = "##BOOT_DEV_B##"; - type = "raw"; - sha256 = "$swupdate_get_sha256(##BOOTIMG_NAME##)"; - installed-directly = true; - }, - { - filename = "##ROOTIMG_NAME##"; - device = "##ROOTFS_DEV_B##"; - type = "raw"; - sha256 = "$swupdate_get_sha256(##ROOTIMG_NAME##)"; - compressed = "zlib"; - installed-directly = true; - } - ); - uboot: ( - { - name = "upgrade_available"; - value = "1"; - } - ); - } - }; - mtd = { - primary: { - images: ( - { - filename = "##BOOTIMG_NAME##"; - volume = "##BOOT_DEV_A##"; - type = "ubivol"; - sha256 = "$swupdate_get_sha256(##BOOTIMG_NAME##)"; - installed-directly = true; - }, - { - filename = "##ROOTIMG_NAME##"; - volume = "##ROOTFS_DEV_A##"; - type = "ubivol"; - sha256 = "$swupdate_get_sha256(##ROOTIMG_NAME##)"; - installed-directly = true; - } - ); - uboot: ( - { - name = "upgrade_available"; - value = "1"; - } - ); - } - secondary: { - images: ( - { - filename = "##BOOTIMG_NAME##"; - volume = "##BOOT_DEV_B##"; - type = "ubivol"; - sha256 = "$swupdate_get_sha256(##BOOTIMG_NAME##)"; - installed-directly = true; - }, - { - filename = "##ROOTIMG_NAME##"; - volume = "##ROOTFS_DEV_B##"; - type = "ubivol"; - sha256 = "$swupdate_get_sha256(##ROOTIMG_NAME##)"; - installed-directly = true; - } - ); - uboot: ( - { - name = "upgrade_available"; - value = "1"; - } - ); - } - }; -} diff --git a/meta-digi-dey/recipes-digi/swu-images/swu.inc b/meta-digi-dey/recipes-digi/swu-images/swu.inc index 6d9282c8b..c9aa55d89 100644 --- a/meta-digi-dey/recipes-digi/swu-images/swu.inc +++ b/meta-digi-dey/recipes-digi/swu-images/swu.inc @@ -10,7 +10,6 @@ SRC_URI = " \ file://sw-description-uboot \ file://swupdate_uboot_nand.sh \ file://swupdate_uboot_mmc.sh \ - ${@oe.utils.vartrue('DUALBOOT_ENABLED', 'file://sw-description-dualboot', '', d)} \ " inherit swupdate @@ -52,8 +51,6 @@ def get_baseimg_pn(d): file_name = d.getVar('PN', True) return file_name[:file_name.find("-swu")] -# Call regular substitution or dualboot substitution -do_unpack[postfuncs] += "${@oe.utils.vartrue('DUALBOOT_ENABLED', 'fill_description_dualboot', 'fill_description', d)}" # Dual boot partition names for eMMC or MTD BOOT_DEV_NAME_A ?= "${@bb.utils.contains('STORAGE_MEDIA', 'mmc', '/dev/mmcblk0p1', 'linux_a', d)}" @@ -61,6 +58,8 @@ BOOT_DEV_NAME_B ?= "${@bb.utils.contains('STORAGE_MEDIA', 'mmc', '/dev/mmcblk0p2 ROOTFS_DEV_NAME_A ?= "${@bb.utils.contains('STORAGE_MEDIA', 'mmc', '/dev/mmcblk0p3', 'rootfs_a', d)}" ROOTFS_DEV_NAME_B ?= "${@bb.utils.contains('STORAGE_MEDIA', 'mmc', '/dev/mmcblk0p4', 'rootfs_b', d)}" +do_unpack[postfuncs] += "fill_description" + fill_description() { if [ "${SWUPDATE_UBOOTIMG}" = "true" ]; then cp ${WORKDIR}/sw-description-uboot ${WORKDIR}/sw-description @@ -79,16 +78,10 @@ fill_description() { sed -i -e "s,##ROOTFS_DEV##,${ROOTFS_DEV_NAME_FINAL},g" "${WORKDIR}/sw-description" sed -i -e "s,##SW_VERSION##,${SOFTWARE_VERSION},g" "${WORKDIR}/sw-description" sed -i -e "s,##DESCRIPTION##,${DESCRIPTION},g" "${WORKDIR}/sw-description" -} -fill_description_dualboot () { - sed -i -e "s,##BOOTIMG_NAME##,${IMG_NAME}-${MACHINE}${BOOTFS_EXT},g" "${WORKDIR}/sw-description-dualboot" - sed -i -e "s,##BOOT_DEV_A##,${BOOT_DEV_NAME_A},g" "${WORKDIR}/sw-description-dualboot" - sed -i -e "s,##BOOT_DEV_B##,${BOOT_DEV_NAME_B},g" "${WORKDIR}/sw-description-dualboot" - sed -i -e "s,##ROOTIMG_NAME##,${IMG_NAME}-${MACHINE}${ROOTFS_EXT},g" "${WORKDIR}/sw-description-dualboot" - sed -i -e "s,##ROOTFS_DEV_A##,${ROOTFS_DEV_NAME_A},g" "${WORKDIR}/sw-description-dualboot" - sed -i -e "s,##ROOTFS_DEV_B##,${ROOTFS_DEV_NAME_B},g" "${WORKDIR}/sw-description-dualboot" - sed -i -e "s,##SW_VERSION##,${SOFTWARE_VERSION},g" "${WORKDIR}/sw-description-dualboot" - # Overwrite the sw-description with the dualboot version - mv ${WORKDIR}/sw-description-dualboot ${WORKDIR}/sw-description -} \ No newline at end of file + # Dualboot description + sed -i -e "s,##BOOT_DEV_A##,${BOOT_DEV_NAME_A},g" "${WORKDIR}/sw-description" + sed -i -e "s,##BOOT_DEV_B##,${BOOT_DEV_NAME_B},g" "${WORKDIR}/sw-description" + sed -i -e "s,##ROOTFS_DEV_A##,${ROOTFS_DEV_NAME_A},g" "${WORKDIR}/sw-description" + sed -i -e "s,##ROOTFS_DEV_B##,${ROOTFS_DEV_NAME_B},g" "${WORKDIR}/sw-description" +} From 0328295ea8717d0b5c4451c94b820056762090cf Mon Sep 17 00:00:00 2001 From: Francisco Gil Date: Thu, 17 Nov 2022 17:08:50 +0100 Subject: [PATCH 04/25] dualboot: run the script only in dualboot systems Signed-off-by: Francisco Gil --- .../dualboot/dualboot/dualboot-init | 40 ++++++++++--------- 1 file changed, 21 insertions(+), 19 deletions(-) diff --git a/meta-digi-dey/recipes-digi/dualboot/dualboot/dualboot-init b/meta-digi-dey/recipes-digi/dualboot/dualboot/dualboot-init index d134b01e7..8ede937ab 100644 --- a/meta-digi-dey/recipes-digi/dualboot/dualboot/dualboot-init +++ b/meta-digi-dey/recipes-digi/dualboot/dualboot/dualboot-init @@ -14,35 +14,37 @@ #=============================================================================== dualboot_init () { - ACTIVE_SYSTEM="$(fw_printenv -n active_system 2>/dev/null)" - if [ -z "${ACTIVE_SYSTEM}" ]; then - if grep -qs environment /proc/mtd; then - MTD_BOOT_PART="$(fw_printenv -n mtdbootpart 2>/dev/null)" - fw_setenv active_system "${MTD_BOOT_PART}" - else - BOOT_PART="$(fw_printenv -n mmcpart 2>/dev/null)" - BOOT_DEV="$(fw_printenv -n mmcbootdev 2>/dev/null)" - CURRENT_PART="$(ls -l /dev/disk/by-partlabel/ | grep -i mmcblk${BOOT_DEV}p${BOOT_PART} | awk '{print $9}')" - fw_setenv active_system "${CURRENT_PART}" + if [ "$(fw_printenv -n dualboot 2>/dev/null)" = "yes" ]; then + echo -n "Starting dualboot check: " + ACTIVE_SYSTEM="$(fw_printenv -n active_system 2>/dev/null)" + if [ -z "${ACTIVE_SYSTEM}" ]; then + if grep -qs environment /proc/mtd; then + MTD_BOOT_PART="$(fw_printenv -n mtdbootpart 2>/dev/null)" + fw_setenv active_system "${MTD_BOOT_PART}" + else + BOOT_PART="$(fw_printenv -n mmcpart 2>/dev/null)" + BOOT_DEV="$(fw_printenv -n mmcbootdev 2>/dev/null)" + CURRENT_PART="$(sed -ne 's,PARTNAME=,,g;T;p' /sys/class/block/mmcblk"${BOOT_DEV}"p"${BOOT_PART}"/uevent)" + fw_setenv active_system "${CURRENT_PART}" + fi fi - fi - ISUPGRADING="$(fw_printenv -n upgrade_available 2>/dev/null)" + ISUPGRADING="$(fw_printenv -n upgrade_available 2>/dev/null)" - if [ "$ISUPGRADING" = "1" ]; then - BOOTCOUNT="$(fw_printenv -n bootcount 2>/dev/null)" - if [ "${BOOTCOUNT}" -lt 3 ]; then - fw_setenv upgrade_available - fw_setenv bootcount 0 + if [ "$ISUPGRADING" = "1" ]; then + BOOTCOUNT="$(fw_printenv -n bootcount 2>/dev/null)" + if [ "${BOOTCOUNT}" -lt 3 ]; then + fw_setenv upgrade_available + fw_setenv bootcount 0 + fi fi + echo "done." fi } case "$1" in start) - echo -n "Starting dualboot check: " dualboot_init - echo "done." ;; stop) ;; From cae4c1f1dc5c4db43c4522e8c8ff260358d057e6 Mon Sep 17 00:00:00 2001 From: Francisco Gil Date: Thu, 17 Nov 2022 17:12:44 +0100 Subject: [PATCH 05/25] recovery: change the name of the file descriptor to check Now in the file descriptor we have three different names: platform, primary and secondary. Also a link from 'platform' to 'single' to keep backward compatibility. Signed-off-by: Francisco Gil --- .../recovery/recovery-initramfs/recovery-initramfs-init | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/meta-digi-dey/recipes-core/recovery/recovery-initramfs/recovery-initramfs-init b/meta-digi-dey/recipes-core/recovery/recovery-initramfs/recovery-initramfs-init index 210295be8..bae32f599 100644 --- a/meta-digi-dey/recipes-core/recovery/recovery-initramfs/recovery-initramfs-init +++ b/meta-digi-dey/recipes-core/recovery/recovery-initramfs/recovery-initramfs-init @@ -596,9 +596,9 @@ done # Select update package image if [ "$(is_nand)" = "yes" ]; then - SWUPDATE_IMAGE_SET="mtd,platform" + SWUPDATE_IMAGE_SET="mtd,single" else - SWUPDATE_IMAGE_SET="mmc,platform" + SWUPDATE_IMAGE_SET="mmc,single" fi # On eMMC, if the 'update' partition is encrypted, we need to mount it manually From f308ccfa6624473f7d3ee45e0e9511258a289b63 Mon Sep 17 00:00:00 2001 From: Francisco Gil Date: Thu, 17 Nov 2022 17:15:37 +0100 Subject: [PATCH 06/25] update-firmware: rename the firmware-update from recovery-utils There is a problem when building the SDK because two binaries have the same name (update-firmware) and makes the compilation to fail. Change the name to update-firmware.recovery and create a wrapper over the update-firmware to check if the system is not dual boot to call it. Rework the code to make it more reliable. Remove the umount of the alternative linux partition, now it is not needed because only the active linux partition is mounted now. Signed-off-by: Francisco Gil --- .../recovery-utils/recovery-reboot/Makefile | 2 +- .../dualboot/dualboot/dualboot-init | 44 +++++++++---------- .../dualboot/dualboot/update-firmware | 39 +++++++++------- 3 files changed, 46 insertions(+), 39 deletions(-) diff --git a/meta-digi-dey/recipes-core/recovery/recovery-utils/recovery-utils/recovery-reboot/Makefile b/meta-digi-dey/recipes-core/recovery/recovery-utils/recovery-utils/recovery-reboot/Makefile index b8b406071..f9251c34e 100644 --- a/meta-digi-dey/recipes-core/recovery/recovery-utils/recovery-utils/recovery-reboot/Makefile +++ b/meta-digi-dey/recipes-core/recovery/recovery-utils/recovery-utils/recovery-reboot/Makefile @@ -40,7 +40,7 @@ all: $(PROGRAM) install: $(PROGRAM) install -d $(DESTDIR)/usr/bin install -m 0755 $(PROGRAM) $(DESTDIR)/usr/bin/ - ln -sf $(PROGRAM) $(DESTDIR)/usr/bin/update-firmware + ln -sf $(PROGRAM) $(DESTDIR)/usr/bin/update-firmware.recovery ln -sf $(PROGRAM) $(DESTDIR)/usr/bin/encrypt-partitions .PHONY: clean diff --git a/meta-digi-dey/recipes-digi/dualboot/dualboot/dualboot-init b/meta-digi-dey/recipes-digi/dualboot/dualboot/dualboot-init index 8ede937ab..1e4337891 100644 --- a/meta-digi-dey/recipes-digi/dualboot/dualboot/dualboot-init +++ b/meta-digi-dey/recipes-digi/dualboot/dualboot/dualboot-init @@ -14,37 +14,37 @@ #=============================================================================== dualboot_init () { - if [ "$(fw_printenv -n dualboot 2>/dev/null)" = "yes" ]; then - echo -n "Starting dualboot check: " - ACTIVE_SYSTEM="$(fw_printenv -n active_system 2>/dev/null)" - if [ -z "${ACTIVE_SYSTEM}" ]; then - if grep -qs environment /proc/mtd; then - MTD_BOOT_PART="$(fw_printenv -n mtdbootpart 2>/dev/null)" - fw_setenv active_system "${MTD_BOOT_PART}" - else - BOOT_PART="$(fw_printenv -n mmcpart 2>/dev/null)" - BOOT_DEV="$(fw_printenv -n mmcbootdev 2>/dev/null)" - CURRENT_PART="$(sed -ne 's,PARTNAME=,,g;T;p' /sys/class/block/mmcblk"${BOOT_DEV}"p"${BOOT_PART}"/uevent)" - fw_setenv active_system "${CURRENT_PART}" - fi + ACTIVE_SYSTEM="$(fw_printenv -n active_system 2>/dev/null)" + if [ -z "${ACTIVE_SYSTEM}" ]; then + if grep -qs environment /proc/mtd; then + MTD_BOOT_PART="$(fw_printenv -n mtdbootpart 2>/dev/null)" + fw_setenv active_system "${MTD_BOOT_PART}" + else + BOOT_PART="$(fw_printenv -n mmcpart 2>/dev/null)" + BOOT_DEV="$(fw_printenv -n mmcbootdev 2>/dev/null)" + CURRENT_PART="$(sed -ne 's,PARTNAME=,,g;T;p' /sys/class/block/mmcblk"${BOOT_DEV}"p"${BOOT_PART}"/uevent)" + fw_setenv active_system "${CURRENT_PART}" fi + fi - ISUPGRADING="$(fw_printenv -n upgrade_available 2>/dev/null)" + ISUPGRADING="$(fw_printenv -n upgrade_available 2>/dev/null)" - if [ "$ISUPGRADING" = "1" ]; then - BOOTCOUNT="$(fw_printenv -n bootcount 2>/dev/null)" - if [ "${BOOTCOUNT}" -lt 3 ]; then - fw_setenv upgrade_available - fw_setenv bootcount 0 - fi + if [ "$ISUPGRADING" = "1" ]; then + BOOTCOUNT="$(fw_printenv -n bootcount 2>/dev/null)" + if [ "${BOOTCOUNT}" -lt 3 ]; then + fw_setenv upgrade_available + fw_setenv bootcount 0 fi - echo "done." fi } case "$1" in start) - dualboot_init + if [ "$(fw_printenv -n dualboot 2>/dev/null)" = "yes" ]; then + echo -n "Starting dualboot check: " + dualboot_init + echo "done." + fi ;; stop) ;; diff --git a/meta-digi-dey/recipes-digi/dualboot/dualboot/update-firmware b/meta-digi-dey/recipes-digi/dualboot/dualboot/update-firmware index 0ca753613..f5019e468 100755 --- a/meta-digi-dey/recipes-digi/dualboot/dualboot/update-firmware +++ b/meta-digi-dey/recipes-digi/dualboot/dualboot/update-firmware @@ -15,7 +15,12 @@ # #=============================================================================== -SCRIPTNAME="$(basename $(readlink -f ${0}))" + +if [ "$(fw_printenv -n dualboot 2>/dev/null)" != "yes" ]; then + exec update-firmware.recovery "$@" +fi + +SCRIPTNAME="$(basename "$(readlink -f "${0}")")" VERBOSE="" PUBLIC_KEY="/etc/ssl/certs/key.pub" ACTIVE_SYSTEM="$(fw_printenv -n active_system 2>/dev/null)" @@ -63,14 +68,9 @@ if [ -z "${UPDATE_FILE}" ]; then fi # Check if the rootfs is ubifs to determine if it is a nand or emmc device -PARTTABLE="/proc/mounts" -NANDROOTFS="$(sed -ne "s/\(rootfs\).*\.*/\1/g;T;p" ${PARTTABLE} 2>/dev/null)" +NANDROOTFS="$(sed -ne "s/\(rootfs\).*\.*/\1/g;T;p" /proc/mounts 2>/dev/null)" if [ -z "${NANDROOTFS}" ]; then - # Get Boot partition device and index. - BOOT_PART="$(fw_printenv -n mmcpart 2>/dev/null)" - BOOT_DEV="$(fw_printenv -n mmcbootdev 2>/dev/null)" - # Get current partition information so we can # determine where to flash the images. if [ "${ACTIVE_SYSTEM}" = "linux_a" ]; then @@ -85,12 +85,22 @@ if [ -z "${NANDROOTFS}" ]; then IMAGE_SET="mmc,primary" fi - # get boot partition index - MMC_PART="$(ls -l /dev/disk/by-partlabel/ | grep -i ${KERNELBOOT} | awk '{print $11}' | sed -e 's/[../mmcblkp]//g' -e 's/^.//')" + # get boot and rootfs partition index + MMC_PART="$(realpath /dev/disk/by-partlabel/${KERNELBOOT} | grep -o '[[:digit:]]\+$')" # search rootfs UUID - MMCROOT_PART="$(ls -l /dev/disk/by-partlabel/ | grep -i ${ROOTFS} | awk '{print $11}' | sed -e 's/[../mmcblkp]//g' -e 's/^.//')" - PART_UUID="$(ls -l /dev/disk/by-partuuid/ | grep -i mmcblk${BOOT_DEV}p${MMCROOT_PART} | awk '{print $9}')" + MMCROOT_DEV="$(realpath /dev/disk/by-partlabel/${ROOTFS})" + for uuid in /dev/disk/by-partuuid/*; do + if [ "$(realpath "${uuid}")" = "${MMCROOT_DEV}" ]; then + PART_UUID="$(basename "${uuid}")" + break + fi + done + + if [ -z "${MMC_PART}" ] || [ -z "${PART_UUID}" ]; then + echo "[ERROR] detecting partitions to update." + exit + fi echo "" echo "Updating '${IMAGE_SET}' image set from '${UPDATE_FILE}'..." @@ -99,8 +109,8 @@ if [ -z "${NANDROOTFS}" ]; then # Execute the update. swupdate ${VERBOSE} -i "${UPDATE_FILE}" -e "${IMAGE_SET}" if [ "$?" = "0" ]; then - fw_setenv mmcroot PARTUUID=${PART_UUID} - fw_setenv mmcpart ${MMC_PART} + fw_setenv mmcroot "PARTUUID=${PART_UUID}" + fw_setenv mmcpart "${MMC_PART}" fw_setenv active_system ${KERNELBOOT} fw_setenv bootcount 0 echo "Firmware update finished; Rebooting system." @@ -127,9 +137,6 @@ else echo "Updating '${IMAGE_SET}' image set from '${UPDATE_FILE}'..." echo "" - # Umount the partition before the update. - umount /mnt/${KERNELBOOT} - # Execute the update. if [ -f "${PUBLIC_KEY}" ]; then swupdate ${VERBOSE} -i "${UPDATE_FILE}" -e "${IMAGE_SET}" -k "${PUBLIC_KEY}" From b8f8174579da162d66de9bf01a11ec7b729d5c22 Mon Sep 17 00:00:00 2001 From: Gonzalo Ruiz Date: Thu, 3 Nov 2022 14:51:01 +0100 Subject: [PATCH 07/25] ccmp1: define DIGI_FAMILY variable DIGI_FAMILY is "ccmp1" and is common to both CCMP15 and CCMP13. Signed-off-by: Gonzalo Ruiz --- meta-digi-arm/conf/machine/ccmp13-dvk.conf | 2 +- meta-digi-arm/conf/machine/ccmp15-dvk.conf | 2 +- meta-digi-arm/conf/machine/include/ccmp1.inc | 2 ++ 3 files changed, 4 insertions(+), 2 deletions(-) diff --git a/meta-digi-arm/conf/machine/ccmp13-dvk.conf b/meta-digi-arm/conf/machine/ccmp13-dvk.conf index e87a1341a..231012abe 100644 --- a/meta-digi-arm/conf/machine/ccmp13-dvk.conf +++ b/meta-digi-arm/conf/machine/ccmp13-dvk.conf @@ -10,7 +10,7 @@ include conf/machine/include/ccmp1.inc # Chip architecture # ========================================================================= DEFAULTTUNE = "cortexa7thf-neon-vfpv4" -MACHINEOVERRIDES = "arm:armv7ve:stcommon:stm32mpcommon:stm32mp1common:ccmp1:ccmp13:ccmp13-dvk" +MACHINEOVERRIDES = "arm:armv7ve:stcommon:stm32mpcommon:stm32mp1common:${DIGI_FAMILY}:ccmp13:ccmp13-dvk" # ========================================================================= # boot device diff --git a/meta-digi-arm/conf/machine/ccmp15-dvk.conf b/meta-digi-arm/conf/machine/ccmp15-dvk.conf index 659eb31b8..97717efc2 100644 --- a/meta-digi-arm/conf/machine/ccmp15-dvk.conf +++ b/meta-digi-arm/conf/machine/ccmp15-dvk.conf @@ -10,7 +10,7 @@ include conf/machine/include/ccmp1.inc # Chip architecture # ========================================================================= DEFAULTTUNE = "cortexa7thf-neon-vfpv4" -MACHINEOVERRIDES = "arm:armv7ve:stcommon:stm32mpcommon:stm32mp1common:ccmp1:ccmp15:ccmp15-dvk" +MACHINEOVERRIDES = "arm:armv7ve:stcommon:stm32mpcommon:stm32mp1common:${DIGI_FAMILY}:ccmp15:ccmp15-dvk" # ========================================================================= # boot device diff --git a/meta-digi-arm/conf/machine/include/ccmp1.inc b/meta-digi-arm/conf/machine/include/ccmp1.inc index 16e572123..3b2a60e83 100644 --- a/meta-digi-arm/conf/machine/include/ccmp1.inc +++ b/meta-digi-arm/conf/machine/include/ccmp1.inc @@ -6,6 +6,8 @@ include conf/machine/include/st-machine-common-stm32mp.inc include conf/machine/include/arm/armv7a/tune-cortexa7.inc include conf/machine/include/digi-defaults.inc +DIGI_FAMILY = "ccmp1" + # Platform u-boot settings UBOOT_PREFIX = "u-boot" UBOOT_SUFFIX = "bin" From d9563ea54e0320b3ee57bf648ad188a7bf6b183f Mon Sep 17 00:00:00 2001 From: Gonzalo Ruiz Date: Fri, 11 Nov 2022 14:14:01 +0100 Subject: [PATCH 08/25] u-boot-dey: add config to select whether to build the scripts Add configuration 'BUILD_UBOOT_SCRIPTS' to select whether to build the boot and install scripts or not, and set it to 'true' by default. This allows removing the scripts on upper Yocto layers. Signed-off-by: Gonzalo Ruiz --- .../recipes-bsp/u-boot/digi-u-boot.inc | 88 ++++++++++--------- 1 file changed, 48 insertions(+), 40 deletions(-) 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 68936b6a8..b0bfe30c4 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 @@ -28,6 +28,8 @@ SRC_URI = " \ ${@oe.utils.conditional('UBOOT_HAS_FASTBOOT', 'true', 'file://install_linux_fw_uuu.sh', '', d)} \ " +BUILD_UBOOT_SCRIPTS ?= "true" + BOOTLOADER_IMAGE_RECIPE ?= "u-boot" LOCALVERSION ?= "" @@ -123,46 +125,7 @@ def tf_bootscript_sedfilter(d): tf_initramfs = d.getVar('TRUSTFENCE_INITRAMFS_IMAGE',True) or "" return "s,\(^[[:blank:]]*\)true.*,\\1setenv boot_initrd true\\n\\1setenv initrd_file %s-${MACHINE}.cpio.gz.u-boot.tf,g" % tf_initramfs if tf_initramfs else "" -do_deploy:append() { - # Remove canonical U-Boot symlinks for ${UBOOT_CONFIG} currently in the form: - # u-boot-.- - # u-boot- - # and add a more suitable symlink in the form: - # u-boot--. - if [ -n "${UBOOT_CONFIG}" ] - then - for config in ${UBOOT_MACHINE}; do - i=$(expr $i + 1); - for type in ${UBOOT_CONFIG}; do - j=$(expr $j + 1); - if [ $j -eq $i ] - then - cd ${DEPLOYDIR} - rm -r ${UBOOT_BINARY}-${type} - ln -sf u-boot-${type}-${PV}-${PR}.${UBOOT_SUFFIX} u-boot-${type}.${UBOOT_SUFFIX} - if [ "${TRUSTFENCE_SIGN}" = "1" ] && [ "${BOOTLOADER_IMAGE_RECIPE}" = "u-boot" ]; then - install ${B}/${config}/SRK_efuses.bin SRK_efuses-${PV}-${PR}.bin - ln -sf SRK_efuses-${PV}-${PR}.bin SRK_efuses.bin - - install ${B}/${config}/u-boot-dtb-signed-${type}.${UBOOT_SUFFIX} u-boot-dtb-signed-${type}-${PV}-${PR}.${UBOOT_SUFFIX} - ln -sf u-boot-dtb-signed-${type}-${PV}-${PR}.${UBOOT_SUFFIX} u-boot-dtb-signed-${type}.${UBOOT_SUFFIX} - - install ${B}/${config}/u-boot-dtb-usb-signed-${type}.${UBOOT_SUFFIX} u-boot-dtb-usb-signed-${type}-${PV}-${PR}.${UBOOT_SUFFIX} - ln -sf u-boot-dtb-usb-signed-${type}-${PV}-${PR}.${UBOOT_SUFFIX} u-boot-dtb-usb-signed-${type}.${UBOOT_SUFFIX} - - if [ "${TRUSTFENCE_DEK_PATH}" != "0" ] - then - install ${B}/${config}/u-boot-dtb-encrypted-${type}.${UBOOT_SUFFIX} u-boot-dtb-encrypted-${type}-${PV}-${PR}.${UBOOT_SUFFIX} - ln -sf u-boot-dtb-encrypted-${type}-${PV}-${PR}.${UBOOT_SUFFIX} u-boot-dtb-encrypted-${type}.${UBOOT_SUFFIX} - fi - fi - fi - done - unset j - done - unset i - fi - +build_uboot_scripts() { # DEY firmware install scripts sed -i -e 's,##GRAPHICAL_BACKEND##,${GRAPHICAL_BACKEND},g' ${WORKDIR}/install_linux_fw_sd.txt ${WORKDIR}/install_linux_fw_usb.txt sed -i -e 's,##MACHINE##,${MACHINE},g' ${WORKDIR}/install_linux_fw_sd.txt ${WORKDIR}/install_linux_fw_usb.txt @@ -207,6 +170,51 @@ do_deploy:append() { rm -f ${TMP_BOOTSCR} } +do_deploy:append() { + # Remove canonical U-Boot symlinks for ${UBOOT_CONFIG} currently in the form: + # u-boot-.- + # u-boot- + # and add a more suitable symlink in the form: + # u-boot--. + if [ -n "${UBOOT_CONFIG}" ] + then + for config in ${UBOOT_MACHINE}; do + i=$(expr $i + 1); + for type in ${UBOOT_CONFIG}; do + j=$(expr $j + 1); + if [ $j -eq $i ] + then + cd ${DEPLOYDIR} + rm -r ${UBOOT_BINARY}-${type} + ln -sf u-boot-${type}-${PV}-${PR}.${UBOOT_SUFFIX} u-boot-${type}.${UBOOT_SUFFIX} + if [ "${TRUSTFENCE_SIGN}" = "1" ] && [ "${BOOTLOADER_IMAGE_RECIPE}" = "u-boot" ]; then + install ${B}/${config}/SRK_efuses.bin SRK_efuses-${PV}-${PR}.bin + ln -sf SRK_efuses-${PV}-${PR}.bin SRK_efuses.bin + + install ${B}/${config}/u-boot-dtb-signed-${type}.${UBOOT_SUFFIX} u-boot-dtb-signed-${type}-${PV}-${PR}.${UBOOT_SUFFIX} + ln -sf u-boot-dtb-signed-${type}-${PV}-${PR}.${UBOOT_SUFFIX} u-boot-dtb-signed-${type}.${UBOOT_SUFFIX} + + install ${B}/${config}/u-boot-dtb-usb-signed-${type}.${UBOOT_SUFFIX} u-boot-dtb-usb-signed-${type}-${PV}-${PR}.${UBOOT_SUFFIX} + ln -sf u-boot-dtb-usb-signed-${type}-${PV}-${PR}.${UBOOT_SUFFIX} u-boot-dtb-usb-signed-${type}.${UBOOT_SUFFIX} + + if [ "${TRUSTFENCE_DEK_PATH}" != "0" ] + then + install ${B}/${config}/u-boot-dtb-encrypted-${type}.${UBOOT_SUFFIX} u-boot-dtb-encrypted-${type}-${PV}-${PR}.${UBOOT_SUFFIX} + ln -sf u-boot-dtb-encrypted-${type}-${PV}-${PR}.${UBOOT_SUFFIX} u-boot-dtb-encrypted-${type}.${UBOOT_SUFFIX} + fi + fi + fi + done + unset j + done + unset i + fi + + if [ "${BUILD_UBOOT_SCRIPTS}" = "true" ]; then + build_uboot_scripts + fi +} + BOOT_TOOLS = "imx-boot-tools" BOOT_TOOLS:ccmp1 = "u-boot" FIP_UBOOT_HEADER = "ccmp15-dvk" From 2d34c346193a40c6d62518dce7c5499a3b863f86 Mon Sep 17 00:00:00 2001 From: Arturo Buzarra Date: Tue, 22 Nov 2022 12:40:24 +0100 Subject: [PATCH 09/25] README: Update dey-4.0-r1 changelog Signed-off-by: Arturo Buzarra --- README.md | 30 +++++++++++++++++++++++++++++- 1 file changed, 29 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index 10ea39501..e34438d4b 100644 --- a/README.md +++ b/README.md @@ -15,11 +15,19 @@ The current release has been verified and tested with the following OS versions: * Ubuntu 18.04 +* Ubuntu 22.04 # Supported Platforms Software for the following hardware platforms is in production support: +## ConnectCore MP15 +* ConnectCore MP15 System-on-Module (SOM) + * [CC-WST-DW69-NM](https://www.digi.com/products/models/cc-wst-dw69-nm) + * [CC-ST-DW69-ZM](https://www.digi.com/products/models/cc-st-dw69-zm) +* ConnectCore MP15 DVK + * [CC-WMP157-KIT](https://www.digi.com/products/models/cc-wmp157-kit) ([Get Started](https://www.digi.com/resources/documentation/digidocs/embedded/dey/4.0/ccmp15/yocto-gs_index)) + ## ConnectCore 6UL * ConnectCore 6UL System-on-Module (SOM) * [CC-WMX-JN58-NE](https://www.digi.com/products/models/cc-wmx-jn58-ne) @@ -56,7 +64,18 @@ Documentation is available online at https://www.digi.com/resources/documentatio ## 4.0-r1 -* Release based on [Yocto 4.0 (Kirkstone)](https://www.yoctoproject.org/software-overview/downloads) +* Release based on [Yocto 4.0 (Kirkstone)](https://www.yoctoproject.org/software-overview/downloads) including: + * New toolchain based on GLIBC-2.35 + * Updated bluez5 to v5.65 + * Updated busybox to v1.32.0 + * Updated NetworkManager to v1.36.2 + * Updated gstreamer1.0 to v1.20.3 + * Updated busybox to v1.35.0 + * Updated OpenSSL to v3.0.7 + * Package upgrades and security fixes +* Added support for ConnectCore MP15 platform +* Updated kernel version to v5.15.52 for i.MX6UL platforms + # Known Issues and Limitations @@ -83,6 +102,15 @@ updated list can be found on the online documentation. devices (ConnectCore 6UL, ConnectCore 6 Plus, and ConnectCore 8M Nano) fail to join autonomous groups. +## ConnectCore MP15 + +* ConnectCore MP15 System-on-Module (SOM) + * Power management: + * Audio interface does not work after suspend. + + * The following features are not yet supported: + * TrustFence + ## ConnectCore 6UL * ConnectCore 6UL System-on-Module (SOM) From 8df1b0c2466e054facf02b1a3420918fb2891b9b Mon Sep 17 00:00:00 2001 From: Javier Viguera Date: Tue, 22 Nov 2022 15:22:49 +0100 Subject: [PATCH 10/25] swupdate: do not run swupdate daemon on non-dualboot devices On recovery based devices, the swupdate process is executed in the recovery, so there is no need to have the swupdate daemon running on the rootfs. Add a on-target post installation script to disable the swupdate bootscript on the normal rootfs. This has the side effect of failing in the recovery initramfs because the initramfs does not have a complete SysV init system. For that case add a rootfs postprocess function to delete the postinst script. Signed-off-by: Javier Viguera --- .../recipes-core/images/dey-image-recovery-initramfs.bb | 6 ++++++ .../recipes-support/swupdate/swupdate_2022.05.bbappend | 6 ++++++ 2 files changed, 12 insertions(+) diff --git a/meta-digi-dey/recipes-core/images/dey-image-recovery-initramfs.bb b/meta-digi-dey/recipes-core/images/dey-image-recovery-initramfs.bb index 54a78c8d7..32d04995a 100644 --- a/meta-digi-dey/recipes-core/images/dey-image-recovery-initramfs.bb +++ b/meta-digi-dey/recipes-core/images/dey-image-recovery-initramfs.bb @@ -34,3 +34,9 @@ BAD_RECOMMENDATIONS += " \ " export IMAGE_BASENAME = "dey-image-recovery-initramfs" + +initramfs_cleanup() { + # Delete SWUPDATE postinst script + rm -f ${IMAGE_ROOTFS}${sysconfdir}/rpm-postinsts/*swupdate* +} +ROOTFS_POSTPROCESS_COMMAND += "initramfs_cleanup; " diff --git a/meta-digi-dey/recipes-support/swupdate/swupdate_2022.05.bbappend b/meta-digi-dey/recipes-support/swupdate/swupdate_2022.05.bbappend index 0635fb6f9..6c38638a2 100644 --- a/meta-digi-dey/recipes-support/swupdate/swupdate_2022.05.bbappend +++ b/meta-digi-dey/recipes-support/swupdate/swupdate_2022.05.bbappend @@ -28,3 +28,9 @@ do_install:append() { install -d ${D}${bindir}/ install -m 0755 tools/swupdate-progress ${D}${bindir}/progress } + +pkg_postinst_ontarget:${PN}() { + if ${@bb.utils.contains('DISTRO_FEATURES','systemd','false','true',d)}; then + [ "$(fw_printenv -n dualboot 2>/dev/null)" = "no" ] && update-rc.d -f swupdate remove + fi +} From deed93cfb3e556dd07cdd8f850c3a4542aa94390 Mon Sep 17 00:00:00 2001 From: Javier Viguera Date: Tue, 22 Nov 2022 15:25:02 +0100 Subject: [PATCH 11/25] recovery-initramfs-init: delete mdev's cold scan In previous line we are launching the mdev in daemon mode. One of the first tasks the daemon mode performs is a cold scan, so there is no need to repeat it afterwards. Signed-off-by: Javier Viguera --- .../recovery/recovery-initramfs/recovery-initramfs-init | 1 - 1 file changed, 1 deletion(-) diff --git a/meta-digi-dey/recipes-core/recovery/recovery-initramfs/recovery-initramfs-init b/meta-digi-dey/recipes-core/recovery/recovery-initramfs/recovery-initramfs-init index bae32f599..0655579c3 100644 --- a/meta-digi-dey/recipes-core/recovery/recovery-initramfs/recovery-initramfs-init +++ b/meta-digi-dey/recipes-core/recovery/recovery-initramfs/recovery-initramfs-init @@ -506,7 +506,6 @@ mount -t tmpfs tmpfs /tmp echo > /dev/mdev.seq echo > /dev/mdev.log mdev -d -mdev -s # Give some time for the devices to settle down so mdev can mount all of them sleep 2 From 0792b45a80c0d61f216a7a53a169db23ba7ed628 Mon Sep 17 00:00:00 2001 From: Tatiana Leon Date: Tue, 22 Nov 2022 12:22:50 +0100 Subject: [PATCH 12/25] recovery: add support to update a specific image set Add a new parameter '-i' to update-firmware to let the user select a specific image_set of the sw-description file to use during the swu update. This allows adding different image_sets on the sw-description and reduce the number of images to build. It also adds more future-proof flexibility. Signed-off-by: Tatiana Leon Signed-off-by: Hector Palacios https://onedigi.atlassian.net/browse/DEL-8199 --- .../recovery-initramfs-init | 7 ++-- .../recovery-utils/include/recovery.h | 11 ++++++ .../recovery-utils/lib/recovery.c | 35 +++++++++++++++++++ .../recovery-reboot/recovery-reboot.c | 34 ++++++++++++------ 4 files changed, 75 insertions(+), 12 deletions(-) diff --git a/meta-digi-dey/recipes-core/recovery/recovery-initramfs/recovery-initramfs-init b/meta-digi-dey/recipes-core/recovery/recovery-initramfs/recovery-initramfs-init index 0655579c3..9c02e310c 100644 --- a/meta-digi-dey/recipes-core/recovery/recovery-initramfs/recovery-initramfs-init +++ b/meta-digi-dey/recipes-core/recovery/recovery-initramfs/recovery-initramfs-init @@ -563,6 +563,9 @@ for arg in ${COMMAND}; do update_package=*) update_package_bool=true; eval "${arg}";; + swu_image_set=*) + update_image_set_bool=true; + eval "${arg}";; encrypt_partitions=*) eval "${arg}"; DEFAULT_ENC_PARTS="no"; @@ -595,9 +598,9 @@ done # Select update package image if [ "$(is_nand)" = "yes" ]; then - SWUPDATE_IMAGE_SET="mtd,single" + SWUPDATE_IMAGE_SET="${swu_image_set:-mtd,single}" else - SWUPDATE_IMAGE_SET="mmc,single" + SWUPDATE_IMAGE_SET="${swu_image_set:-mmc,single}" fi # On eMMC, if the 'update' partition is encrypted, we need to mount it manually diff --git a/meta-digi-dey/recipes-core/recovery/recovery-utils/recovery-utils/include/recovery.h b/meta-digi-dey/recipes-core/recovery/recovery-utils/recovery-utils/include/recovery.h index e73a86951..768ce059c 100644 --- a/meta-digi-dey/recipes-core/recovery/recovery-utils/recovery-utils/include/recovery.h +++ b/meta-digi-dey/recipes-core/recovery/recovery-utils/recovery-utils/include/recovery.h @@ -30,6 +30,17 @@ */ int update_firmware(const char *swu_path); +/* + * Configure recovery commands to update the firmware of a swu image_set. + * + * Params: + * 'swu_path' (input) Path to the update package + * 'swu_image_set' (input) Name of the image set to update + * + * Return: 0 on sucess, -1 on failure + */ +int update_image_set_firmware(const char *swu_path, const char *swu_image_set); + /* * Reboot into recovery mode. * diff --git a/meta-digi-dey/recipes-core/recovery/recovery-utils/recovery-utils/lib/recovery.c b/meta-digi-dey/recipes-core/recovery/recovery-utils/recovery-utils/lib/recovery.c index 69fb29667..5e9833e15 100644 --- a/meta-digi-dey/recipes-core/recovery/recovery-utils/recovery-utils/lib/recovery.c +++ b/meta-digi-dey/recipes-core/recovery/recovery-utils/recovery-utils/lib/recovery.c @@ -659,6 +659,41 @@ err: return ret ? -1 : 0; } +/* + * Function: update_image_set_firmware + * Description: configure recovery commands to update the firmware of a swu + * image set + */ +int update_image_set_firmware(const char *swu_path, const char *swu_image_set) +{ + char *cmd = NULL; + int ret = update_firmware(swu_path); + + if (ret) + return ret; + + /* Verify input parameter */ + if (!swu_image_set) { + fprintf(stderr, "Error: NULL 'swu_image_set'\n"); + goto err; + } + + cmd = calloc(1, strlen("swu_image_set=") + strlen(swu_image_set) + 1); + if (!cmd) { + fprintf(stderr, "Error: calloc 'swu_image_set'\n"); + goto err; + } + + sprintf(cmd, "swu_image_set=%s", swu_image_set); + + ret = append_recovery_command(cmd); + + free(cmd); + +err: + return ret ? -1 : 0; +} + /* * Function: reboot_recovery * Description: reboot into recovery mode diff --git a/meta-digi-dey/recipes-core/recovery/recovery-utils/recovery-utils/recovery-reboot/recovery-reboot.c b/meta-digi-dey/recipes-core/recovery/recovery-utils/recovery-utils/recovery-reboot/recovery-reboot.c index 7e2a360d1..549aeb33f 100644 --- a/meta-digi-dey/recipes-core/recovery/recovery-utils/recovery-utils/recovery-reboot/recovery-reboot.c +++ b/meta-digi-dey/recipes-core/recovery/recovery-utils/recovery-utils/recovery-reboot/recovery-reboot.c @@ -42,6 +42,7 @@ "\n" \ "Usage: %s [options] []\n\n" \ " -u --update-firmware Perform firmware update\n" \ + " -i --image-set= Use the specified image-set from sw-description (only together with -u).\n" \ " -e --encrypt= Encrypt the list of provided partitions.\n" \ " -d --unencrypt= Un-encrypt the list of provided partitions.\n" \ " -k [] --encryption-key[=] Set as file system encryption key.\n" \ @@ -61,11 +62,12 @@ "Version: %s\n" \ "\n" \ "Usage: %s [options] \n\n" \ - " -k [] --encryption-key[=] Set as file system encryption key.\n" \ - " Empty to generate a random key.\n" \ - " -T --reboot-timeout= Reboot after N seconds (default %d)\n" \ - " -f --force Force (un)encryption and key change operations.\n" \ - " --help Print help and exit\n" \ + " -i --image-set= Use the specified image-set from sw-description.\n" \ + " -k [] --encryption-key[=] Set as file system encryption key.\n" \ + " Empty to generate a random key.\n" \ + " -T --reboot-timeout= Reboot after N seconds (default %d)\n" \ + " -f --force Force (un)encryption and key change operations.\n" \ + " --help Print help and exit\n" \ "\n" \ " Absolute path to the firmware update package\n" \ "\n" @@ -95,6 +97,7 @@ static char *cmd_name; /* Command line options */ static char *swu_package; +static char *swu_image_set = NULL; static char *key = NULL; static char *to_encrypt = NULL; static char *to_unencrypt = NULL; @@ -130,9 +133,10 @@ static void usage_and_exit(int exitval) static void parse_options(int argc, char *argv[]) { static int opt_index, opt; - static const char *short_options = "uk::wT:e:d:f"; + static const char *short_options = "ui:k::wT:e:d:f"; static const struct option long_options[] = { {"update-firmware", no_argument, NULL, 'u'}, + {"image_set", required_argument, NULL, 'i'}, {"encryption-key", optional_argument, NULL, 'k'}, {"wipe-update-partition", no_argument, NULL, 'w'}, {"reboot-timeout", required_argument, NULL, 'T'}, @@ -158,6 +162,9 @@ static void parse_options(int argc, char *argv[]) case 'u': update_fw = 1; break; + case 'i': + swu_image_set = optarg; + break; case 'w': wipe_update = 1; break; @@ -246,11 +253,18 @@ int main(int argc, char *argv[]) if (swu_package) { /* Configure recovery commands to update the firmware */ - ret = update_firmware(swu_package); - if (ret) { - printf("Error: update_firmware\n"); - goto out; + if (!swu_image_set) { + ret = update_firmware(swu_package); + if (ret) + printf("Error: update_firmware\n"); + } else { + ret = update_image_set_firmware(swu_package, + swu_image_set); + if (ret) + printf("Error: update_image_set_firmware\n"); } + if (ret) + goto out; need_reboot++; } From 63916b1143580fd3254b559b80a88b60220a514a Mon Sep 17 00:00:00 2001 From: Hector Palacios Date: Wed, 1 Jun 2022 17:06:03 +0200 Subject: [PATCH 13/25] swu-images: fix ccimx6ul ROOTFS extension when read-only enabled When read-only feature is enabled, the rootfs should be .squashfs and not .ubifs. Signed-off-by: Hector Palacios (cherry picked from commit c32278af74cea8cb38aa81590eaa867be1c739c9) Signed-off-by: Javier Viguera --- meta-digi-arm/conf/machine/include/ccimx6ul.inc | 2 +- meta-digi-arm/conf/machine/include/ccmp1.inc | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/meta-digi-arm/conf/machine/include/ccimx6ul.inc b/meta-digi-arm/conf/machine/include/ccimx6ul.inc index 37bd47106..9d5e91d82 100644 --- a/meta-digi-arm/conf/machine/include/ccimx6ul.inc +++ b/meta-digi-arm/conf/machine/include/ccimx6ul.inc @@ -53,7 +53,7 @@ TRUSTFENCE_SIGN_MODE = "HAB" # SWUpdate sw-description configuration BOOTFS_EXT ?= ".boot.ubifs" -ROOTFS_EXT ?= ".ubifs" +ROOTFS_EXT ?= '${@bb.utils.contains("IMAGE_FEATURES", "read-only-rootfs", ".squashfs", ".ubifs", d)}' BOOT_DEV_NAME ?= "linux" ROOTFS_DEV_NAME ?= "rootfs" diff --git a/meta-digi-arm/conf/machine/include/ccmp1.inc b/meta-digi-arm/conf/machine/include/ccmp1.inc index 3b2a60e83..d093790e3 100644 --- a/meta-digi-arm/conf/machine/include/ccmp1.inc +++ b/meta-digi-arm/conf/machine/include/ccmp1.inc @@ -19,7 +19,7 @@ DEY_BUILD_PLATFORM = "STM" # SWUpdate sw-description configuration BOOTFS_EXT ?= ".boot.ubifs" -ROOTFS_EXT ?= ".ubifs" +ROOTFS_EXT ?= '${@bb.utils.contains("IMAGE_FEATURES", "read-only-rootfs", ".squashfs", ".ubifs", d)}' BOOT_DEV_NAME ?= "linux" ROOTFS_DEV_NAME ?= "rootfs" From 43a68c00de9d213804dfa5aaf62ef756e92a9798 Mon Sep 17 00:00:00 2001 From: Gonzalo Ruiz Date: Tue, 12 Jul 2022 11:23:05 +0200 Subject: [PATCH 14/25] Revert "trustfence-sign-tools: don't encrypt artifacts in ccimx8mn/ccimx8mm projects" Artifact encryption is now supported for ccimx8mn and ccimx8mm. This reverts commit 1134e4c07c75b8da6015e4b6f9320ae4db47d1e9. https://onedigi.atlassian.net/browse/DEL-7915 Signed-off-by: Gonzalo Ruiz (cherry picked from commit 588005bb4b2200e79b180f77671304d9c5bdf509) Signed-off-by: Javier Viguera --- .../trustfence-sign-artifact.sh | 14 ++++++++++---- 1 file changed, 10 insertions(+), 4 deletions(-) diff --git a/meta-digi-arm/recipes-digi/trustfence/trustfence-sign-tools/trustfence-sign-artifact.sh b/meta-digi-arm/recipes-digi/trustfence/trustfence-sign-tools/trustfence-sign-artifact.sh index d8f0a1d0c..8c57ff03a 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 @@ -126,11 +126,17 @@ if [ -z "${CONFIG_RAM_START}" ]; then fi # Get DEK key -if [ -n "${CONFIG_DEK_PATH}" ] && [ "${PLATFORM}" != "ccimx8mn" ] && [ "${PLATFORM}" != "ccimx8mm" ]; then +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" ] || [ "${PLATFORM}" = "ccimx8mm" ]; then + echo "DEK not found. Generating random 128 bit DEK." + [ -d $(dirname ${CONFIG_DEK_PATH}) ] || mkdir -p $(dirname ${CONFIG_DEK_PATH}) + dd if=/dev/urandom of="${CONFIG_DEK_PATH}" bs=16 count=1 >/dev/null 2>&1 + else + echo "DEK not found. Generating random 256 bit DEK." + [ -d $(dirname ${CONFIG_DEK_PATH}) ] || mkdir -p $(dirname ${CONFIG_DEK_PATH}) + dd if=/dev/urandom of="${CONFIG_DEK_PATH}" bs=32 count=1 >/dev/null 2>&1 + fi fi dek_size="$((8 * $(stat -L -c %s ${CONFIG_DEK_PATH})))" if [ "${dek_size}" != "128" ] && [ "${dek_size}" != "192" ] && [ "${dek_size}" != "256" ]; then From f4ded09351d8364238072bfe8850885073a58fab Mon Sep 17 00:00:00 2001 From: Tatiana Leon Date: Fri, 25 Nov 2022 13:05:08 +0100 Subject: [PATCH 15/25] meta-digi-dey: python3-xbee: add required asyncio python package This package includes the concurrent module required by the XBee library (to use ThreadPoolExecutor) Signed-off-by: Tatiana Leon --- .../recipes-devtools/python3-xbee/python3-xbee_1.4.1.bb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/meta-digi-dey/recipes-devtools/python3-xbee/python3-xbee_1.4.1.bb b/meta-digi-dey/recipes-devtools/python3-xbee/python3-xbee_1.4.1.bb index 3299ac92d..6baa3db83 100644 --- a/meta-digi-dey/recipes-devtools/python3-xbee/python3-xbee_1.4.1.bb +++ b/meta-digi-dey/recipes-devtools/python3-xbee/python3-xbee_1.4.1.bb @@ -14,4 +14,4 @@ PYPI_PACKAGE = "digi-xbee" inherit pypi setuptools3 -RDEPENDS:${PN} = "python3-pyserial" +RDEPENDS:${PN} = "python3-asyncio python3-pyserial" From 9baa0bd65826e5dc94cf8891a3dcfd5bffa8b73a Mon Sep 17 00:00:00 2001 From: Javier Viguera Date: Fri, 25 Nov 2022 14:28:44 +0100 Subject: [PATCH 16/25] imx-digi-base: sync with meta-freescale's imx-base config file Signed-off-by: Javier Viguera --- .../conf/machine/include/imx-digi-base.inc | 29 ++++++++++++++----- 1 file changed, 21 insertions(+), 8 deletions(-) diff --git a/meta-digi-arm/conf/machine/include/imx-digi-base.inc b/meta-digi-arm/conf/machine/include/imx-digi-base.inc index 414a3f79c..350a651cb 100644 --- a/meta-digi-arm/conf/machine/include/imx-digi-base.inc +++ b/meta-digi-arm/conf/machine/include/imx-digi-base.inc @@ -44,10 +44,10 @@ MACHINEOVERRIDES_EXTENDER:mx6q:use-nxp-bsp = "imx-generic-bsp:imx-nxp-bsp:imxf MACHINEOVERRIDES_EXTENDER:mx6dl:use-nxp-bsp = "imx-generic-bsp:imx-nxp-bsp:imxfbdev:imxpxp:imxipu:imxvpu:imxgpu:imxgpu2d:imxgpu3d:imxepdc:mx6-generic-bsp:mx6-nxp-bsp:mx6dl-generic-bsp:mx6dl-nxp-bsp" MACHINEOVERRIDES_EXTENDER:mx6ul:use-nxp-bsp = "imx-generic-bsp:imx-nxp-bsp:imxfbdev:imxpxp:mx6-generic-bsp:mx6-nxp-bsp:mx6ul-generic-bsp:mx6ul-nxp-bsp" MACHINEOVERRIDES_EXTENDER:mx8mm:use-nxp-bsp = "imx-generic-bsp:imx-nxp-bsp:imxdrm:imxvpu:imxgpu:imxgpu2d:imxgpu3d:mx8-generic-bsp:mx8-nxp-bsp:mx8m-generic-bsp:mx8m-nxp-bsp:mx8mm-generic-bsp:mx8mm-nxp-bsp" -MACHINEOVERRIDES_EXTENDER:mx8mn:use-nxp-bsp = "imx-generic-bsp:imx-nxp-bsp:imxdrm:imxgpu:imxgpu3d:mx8-generic-bsp:mx8-nxp-bsp:mx8m-generic-bsp:mx8m-nxp-bsp:mx8mn-generic-bsp:mx8mn-nxp-bsp" -MACHINEOVERRIDES_EXTENDER:mx8mp:use-nxp-bsp = "imx-generic-bsp:imx-nxp-bsp:imxdrm:imxvpu:imxgpu:imxgpu2d:imxgpu3d:mx8-generic-bsp:mx8-nxp-bsp:mx8m-generic-bsp:mx8m-nxp-bsp:mx8mp-generic-bsp:mx8mp-nxp-bsp" -MACHINEOVERRIDES_EXTENDER:mx8qxp:use-nxp-bsp = "imx-generic-bsp:imx-nxp-bsp:imxdrm:imxdpu:imxgpu:imxgpu2d:imxgpu3d:mx8-generic-bsp:mx8-nxp-bsp:mx8x-generic-bsp:mx8x-nxp-bsp:mx8qxp-generic-bsp:mx8qxp-nxp-bsp" -MACHINEOVERRIDES_EXTENDER:mx8dx:use-nxp-bsp = "imx-generic-bsp:imx-nxp-bsp:imxdrm:imxdpu:imxgpu:imxgpu2d:imxgpu3d:mx8-generic-bsp:mx8-nxp-bsp:mx8x-generic-bsp:mx8x-nxp-bsp:mx8dx-generic-bsp:mx8dx-nxp-bsp" +MACHINEOVERRIDES_EXTENDER:mx8mn:use-nxp-bsp = "imx-generic-bsp:imx-nxp-bsp:imxdrm:imxgpu:imxgpu3d:imxvulkan:mx8-generic-bsp:mx8-nxp-bsp:mx8m-generic-bsp:mx8m-nxp-bsp:mx8mn-generic-bsp:mx8mn-nxp-bsp" +MACHINEOVERRIDES_EXTENDER:mx8mp:use-nxp-bsp = "imx-generic-bsp:imx-nxp-bsp:imxdrm:imxvpu:imxgpu:imxgpu2d:imxgpu3d:imxvulkan:mx8-generic-bsp:mx8-nxp-bsp:mx8m-generic-bsp:mx8m-nxp-bsp:mx8mp-generic-bsp:mx8mp-nxp-bsp" +MACHINEOVERRIDES_EXTENDER:mx8qxp:use-nxp-bsp = "imx-generic-bsp:imx-nxp-bsp:imxdrm:imxdpu:imxgpu:imxgpu2d:imxgpu3d:imxvulkan:mx8-generic-bsp:mx8-nxp-bsp:mx8x-generic-bsp:mx8x-nxp-bsp:mx8qxp-generic-bsp:mx8qxp-nxp-bsp" +MACHINEOVERRIDES_EXTENDER:mx8dx:use-nxp-bsp = "imx-generic-bsp:imx-nxp-bsp:imxdrm:imxdpu:imxgpu:imxgpu2d:imxgpu3d:imxvulkan:mx8-generic-bsp:mx8-nxp-bsp:mx8x-generic-bsp:mx8x-nxp-bsp:mx8dx-generic-bsp:mx8dx-nxp-bsp" ####### ### Mainline BSP specific overrides @@ -76,6 +76,8 @@ MACHINEOVERRIDES_EXTENDER_FILTER_OUT = " \ mx7d \ mx7ulp \ \ + vf \ + \ mx8 \ mx8m \ mx8qm \ @@ -116,6 +118,11 @@ MACHINE_SOCARCH_FILTER:append:imxvpu = " \ libimxvpuapi \ virtual/imxvpu \ " +MACHINE_SOCARCH_FILTER:append:imxvulkan = " \ + vulkan-headers \ + vulkan-loader \ + vulkan-tools \ +" MACHINE_SOCARCH_FILTER:append:imxgpu = " \ virtual/egl \ virtual/mesa \ @@ -211,13 +218,15 @@ PREFERRED_PROVIDER_virtual/egl:imxgpu ?= "imx-gpu-viv" PREFERRED_PROVIDER_virtual/libgl:imxgpu3d ?= "imx-gpu-viv" PREFERRED_PROVIDER_virtual/libgles1:imxgpu3d ?= "imx-gpu-viv" PREFERRED_PROVIDER_virtual/libgles2:imxgpu3d ?= "imx-gpu-viv" +PREFERRED_PROVIDER_virtual/libgles3:imxgpu3d ?= "imx-gpu-viv" PREFERRED_PROVIDER_virtual/libg2d ?= "imx-gpu-g2d" PREFERRED_PROVIDER_virtual/libg2d:imxdpu ?= "imx-dpu-g2d" PREFERRED_PROVIDER_opencl-clhpp:imxgpu ?= "imx-gpu-viv" PREFERRED_PROVIDER_opencl-headers:imxgpu ?= "imx-gpu-viv" PREFERRED_PROVIDER_opencl-icd-loader:imxgpu ?= "imx-gpu-viv" +PREFERRED_PROVIDER_virtual/opencl-icd:imxgpu ?= "imx-gpu-viv" -PREFERRED_VERSION_weston:imx-nxp-bsp ??= "10.0.0.imx" +PREFERRED_VERSION_weston:imx-nxp-bsp ??= "10.0.1.imx" PREFERRED_VERSION_weston:imx-mainline-bsp = "" PREFERRED_VERSION_wayland-protocols:mx6-nxp-bsp ?= "1.25.imx" @@ -229,10 +238,14 @@ PREFERRED_VERSION_libdrm:mx6-nxp-bsp ?= "2.4.109.imx" PREFERRED_VERSION_libdrm:mx7-nxp-bsp ?= "2.4.109.imx" PREFERRED_VERSION_libdrm:mx8-nxp-bsp ?= "2.4.109.imx" +PREFERRED_VERSION_vulkan-headers:imxvulkan ??= "1.2.182.0" +PREFERRED_VERSION_vulkan-loader:imxvulkan ??= "1.2.182.0" +PREFERRED_VERSION_vulkan-tools:imxvulkan ??= "1.2.182.0" + # Use i.MX optee Version -PREFERRED_VERSION_optee-os:mx8-nxp-bsp ?= "3.15.0.imx" -PREFERRED_VERSION_optee-client:mx8-nxp-bsp ?= "3.15.0.imx" -PREFERRED_VERSION_optee-test:mx8-nxp-bsp ?= "3.15.0.imx" +PREFERRED_VERSION_optee-os:mx8-nxp-bsp ?= "3.17.0.imx" +PREFERRED_VERSION_optee-client:mx8-nxp-bsp ?= "3.17.0.imx" +PREFERRED_VERSION_optee-test:mx8-nxp-bsp ?= "3.17.0.imx" #Use i.MX opencv Version for mx8 PREFERRED_VERSION_opencv:mx8-nxp-bsp ?= "4.5.2.imx" From 1ec9ffd16e15da3df366901204595e79763046d1 Mon Sep 17 00:00:00 2001 From: Javier Viguera Date: Fri, 25 Nov 2022 14:32:03 +0100 Subject: [PATCH 17/25] imx-digi-base: use weak default values for PREFERRED_VERSION settings This allows users of the layer to override the value with a different default. Same change was done in meta-freescale's imx-base file. Signed-off-by: Javier Viguera --- .../conf/machine/include/imx-digi-base.inc | 20 +++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/meta-digi-arm/conf/machine/include/imx-digi-base.inc b/meta-digi-arm/conf/machine/include/imx-digi-base.inc index 350a651cb..cf1767e44 100644 --- a/meta-digi-arm/conf/machine/include/imx-digi-base.inc +++ b/meta-digi-arm/conf/machine/include/imx-digi-base.inc @@ -229,26 +229,26 @@ PREFERRED_PROVIDER_virtual/opencl-icd:imxgpu ?= "imx-gpu-viv" PREFERRED_VERSION_weston:imx-nxp-bsp ??= "10.0.1.imx" PREFERRED_VERSION_weston:imx-mainline-bsp = "" -PREFERRED_VERSION_wayland-protocols:mx6-nxp-bsp ?= "1.25.imx" -PREFERRED_VERSION_wayland-protocols:mx7-nxp-bsp ?= "1.25.imx" -PREFERRED_VERSION_wayland-protocols:mx8-nxp-bsp ?= "1.25.imx" +PREFERRED_VERSION_wayland-protocols:mx6-nxp-bsp ??= "1.25.imx" +PREFERRED_VERSION_wayland-protocols:mx7-nxp-bsp ??= "1.25.imx" +PREFERRED_VERSION_wayland-protocols:mx8-nxp-bsp ??= "1.25.imx" # Use i.MX libdrm Version -PREFERRED_VERSION_libdrm:mx6-nxp-bsp ?= "2.4.109.imx" -PREFERRED_VERSION_libdrm:mx7-nxp-bsp ?= "2.4.109.imx" -PREFERRED_VERSION_libdrm:mx8-nxp-bsp ?= "2.4.109.imx" +PREFERRED_VERSION_libdrm:mx6-nxp-bsp ??= "2.4.109.imx" +PREFERRED_VERSION_libdrm:mx7-nxp-bsp ??= "2.4.109.imx" +PREFERRED_VERSION_libdrm:mx8-nxp-bsp ??= "2.4.109.imx" PREFERRED_VERSION_vulkan-headers:imxvulkan ??= "1.2.182.0" PREFERRED_VERSION_vulkan-loader:imxvulkan ??= "1.2.182.0" PREFERRED_VERSION_vulkan-tools:imxvulkan ??= "1.2.182.0" # Use i.MX optee Version -PREFERRED_VERSION_optee-os:mx8-nxp-bsp ?= "3.17.0.imx" -PREFERRED_VERSION_optee-client:mx8-nxp-bsp ?= "3.17.0.imx" -PREFERRED_VERSION_optee-test:mx8-nxp-bsp ?= "3.17.0.imx" +PREFERRED_VERSION_optee-os:mx8-nxp-bsp ??= "3.17.0.imx" +PREFERRED_VERSION_optee-client:mx8-nxp-bsp ??= "3.17.0.imx" +PREFERRED_VERSION_optee-test:mx8-nxp-bsp ??= "3.17.0.imx" #Use i.MX opencv Version for mx8 -PREFERRED_VERSION_opencv:mx8-nxp-bsp ?= "4.5.2.imx" +PREFERRED_VERSION_opencv:mx8-nxp-bsp ??= "4.5.2.imx" EXTRA_IMAGEDEPENDS = "u-boot" From 99a61e12a1d05e5112f6e56b4a64e61208341b02 Mon Sep 17 00:00:00 2001 From: Javier Viguera Date: Mon, 28 Nov 2022 10:32:53 +0100 Subject: [PATCH 18/25] meta-digi: delete outdated opencv bbappend A new set of meta-freescale updates broke our layer, because they updated opencv package and our bbappend does not apply anymore. The build fails at parsing: ERROR: No recipes in default available for: meta-digi/meta-digi-dey/dynamic-layers/freescale-layer/recipes-support/opencv/opencv_4.5.2.imx.bbappend Signed-off-by: Javier Viguera --- meta-digi-arm/conf/machine/include/imx-digi-base.inc | 2 +- .../recipes-support/opencv/opencv_4.5.2.imx.bbappend | 3 --- 2 files changed, 1 insertion(+), 4 deletions(-) delete mode 100644 meta-digi-dey/dynamic-layers/freescale-layer/recipes-support/opencv/opencv_4.5.2.imx.bbappend diff --git a/meta-digi-arm/conf/machine/include/imx-digi-base.inc b/meta-digi-arm/conf/machine/include/imx-digi-base.inc index cf1767e44..84ae86a30 100644 --- a/meta-digi-arm/conf/machine/include/imx-digi-base.inc +++ b/meta-digi-arm/conf/machine/include/imx-digi-base.inc @@ -248,7 +248,7 @@ PREFERRED_VERSION_optee-client:mx8-nxp-bsp ??= "3.17.0.imx" PREFERRED_VERSION_optee-test:mx8-nxp-bsp ??= "3.17.0.imx" #Use i.MX opencv Version for mx8 -PREFERRED_VERSION_opencv:mx8-nxp-bsp ??= "4.5.2.imx" +PREFERRED_VERSION_opencv:mx8-nxp-bsp ??= "4.6.0.imx" EXTRA_IMAGEDEPENDS = "u-boot" diff --git a/meta-digi-dey/dynamic-layers/freescale-layer/recipes-support/opencv/opencv_4.5.2.imx.bbappend b/meta-digi-dey/dynamic-layers/freescale-layer/recipes-support/opencv/opencv_4.5.2.imx.bbappend deleted file mode 100644 index 27a652b60..000000000 --- a/meta-digi-dey/dynamic-layers/freescale-layer/recipes-support/opencv/opencv_4.5.2.imx.bbappend +++ /dev/null @@ -1,3 +0,0 @@ -SRCREV_opencv = "5423d53ae0d116ee5bbe52f8b5503f0cd8586998" -PACKAGECONFIG_OPENCL:mx8mnul-nxp-bsp = "" -PACKAGECONFIG_OPENCL:mx8mpul-nxp-bsp = "" From 7acf3a58e05a26740ed3ed1a6f6ab642e8b8bde5 Mon Sep 17 00:00:00 2001 From: Javier Viguera Date: Mon, 28 Nov 2022 10:40:06 +0100 Subject: [PATCH 19/25] meta-digi: remove some more overlayed recipes There are new versions of these recipes in meta-freescale. Signed-off-by: Javier Viguera --- .../imx-g2d/imx-dpu-g2d_1.9.4.bb | 34 ------------- .../imx-g2d/imx-g2d-samples_1.0.0.bb | 21 -------- .../imx-g2d/imx-gpu-g2d_6.4.3.p2.4.bb | 30 ------------ .../imx-gpu-viv/imx-gpu-viv-6-overrides.inc | 49 ------------------- .../imx-gpu-viv_6.4.3.p2.4-aarch32.bb | 8 --- .../imx-gpu-viv_6.4.3.p2.4-aarch64.bb | 8 --- 6 files changed, 150 deletions(-) delete mode 100644 meta-digi-dey/dynamic-layers/freescale-layer/recipes-graphics/imx-g2d/imx-dpu-g2d_1.9.4.bb delete mode 100644 meta-digi-dey/dynamic-layers/freescale-layer/recipes-graphics/imx-g2d/imx-g2d-samples_1.0.0.bb delete mode 100644 meta-digi-dey/dynamic-layers/freescale-layer/recipes-graphics/imx-g2d/imx-gpu-g2d_6.4.3.p2.4.bb delete mode 100644 meta-digi-dey/dynamic-layers/freescale-layer/recipes-graphics/imx-gpu-viv/imx-gpu-viv-6-overrides.inc delete mode 100644 meta-digi-dey/dynamic-layers/freescale-layer/recipes-graphics/imx-gpu-viv/imx-gpu-viv_6.4.3.p2.4-aarch32.bb delete mode 100644 meta-digi-dey/dynamic-layers/freescale-layer/recipes-graphics/imx-gpu-viv/imx-gpu-viv_6.4.3.p2.4-aarch64.bb diff --git a/meta-digi-dey/dynamic-layers/freescale-layer/recipes-graphics/imx-g2d/imx-dpu-g2d_1.9.4.bb b/meta-digi-dey/dynamic-layers/freescale-layer/recipes-graphics/imx-g2d/imx-dpu-g2d_1.9.4.bb deleted file mode 100644 index 83a7df2bb..000000000 --- a/meta-digi-dey/dynamic-layers/freescale-layer/recipes-graphics/imx-g2d/imx-dpu-g2d_1.9.4.bb +++ /dev/null @@ -1,34 +0,0 @@ -# Copyright (C) 2016 Freescale Semiconductor -# Copyright 2017-2021 NXP -# Released under the MIT license (see COPYING.MIT for the terms) - -DESCRIPTION = "GPU G2D library and apps for i.MX with 2D GPU and DPU" -LICENSE = "Proprietary" -LIC_FILES_CHKSUM = "file://COPYING;md5=e565271ec9a80ce47abbddc4bffe56fa" -PROVIDES += "virtual/libg2d" - -SRC_URI = "${FSL_MIRROR}/${BPN}-${PV}.bin;fsl-eula=true" -SRC_URI[md5sum] = "0b7fc529b3af3ecc3087a99cca0c627d" -SRC_URI[sha256sum] = "42d470373fd72b2e2aa8d8a226e133c61b0a88e4e5bddbfec9509f7d2764f206" - -inherit fsl-eula-unpack - -do_install () { - install -d ${D}${libdir} - install -d ${D}${includedir} - cp -r --no-preserve=ownership ${S}/g2d/usr/lib/*.so* ${D}${libdir} - cp -r --no-preserve=ownership ${S}/g2d/usr/include/* ${D}${includedir} - cp -r -d --no-preserve=ownership ${S}/gpu-demos/opt ${D} -} - -FILES:${PN} += "/opt" -INSANE_SKIP:${PN} += "ldflags" - -RDEPENDS:${PN} = "libgal-imx libdrm" - -# This is required to provide support for VPU Amphion HEVC tile format -# From NXP [MGS-5547] (commit e175d6b4f78deab24d319b852998bef55cdecc99): -# VPU Amphion HEVC tile support was added using OpenCL, so add a dependency on libopencl-imx. -RDEPENDS:${PN} += "libopencl-imx" - -COMPATIBLE_MACHINE = "(imxdpu)" diff --git a/meta-digi-dey/dynamic-layers/freescale-layer/recipes-graphics/imx-g2d/imx-g2d-samples_1.0.0.bb b/meta-digi-dey/dynamic-layers/freescale-layer/recipes-graphics/imx-g2d/imx-g2d-samples_1.0.0.bb deleted file mode 100644 index e62e43e37..000000000 --- a/meta-digi-dey/dynamic-layers/freescale-layer/recipes-graphics/imx-g2d/imx-g2d-samples_1.0.0.bb +++ /dev/null @@ -1,21 +0,0 @@ -SUMMARY = "i.MX G2D Samples" -DESCRIPTION = "Set of sample applications for i.MX G2D" -LICENSE = "BSD-3-Clause" -LIC_FILES_CHKSUM = "file://COPYING;md5=0858ec9c7a80c4a2cf16e4f825a2cc91" - -DEPENDS = "virtual/libg2d" - -GPU_G2D_SAMPLES_SRC ?= "git://github.com/nxpmicro/g2d-samples.git;protocol=https" -SRCBRANCH ?= "imx_1.0" -SRC_URI = "${GPU_G2D_SAMPLES_SRC};branch=${SRCBRANCH}" -SRCREV = "daf64d010666ef2458566573c074e238993f228c" - -S = "${WORKDIR}/git" - -do_configure[noexec] = "1" - -do_install() { - oe_runmake install DESTDIR=${D} PREFIX=${exec_prefix} -} - -FILES:${PN} += "/opt" diff --git a/meta-digi-dey/dynamic-layers/freescale-layer/recipes-graphics/imx-g2d/imx-gpu-g2d_6.4.3.p2.4.bb b/meta-digi-dey/dynamic-layers/freescale-layer/recipes-graphics/imx-g2d/imx-gpu-g2d_6.4.3.p2.4.bb deleted file mode 100644 index 15283bdbe..000000000 --- a/meta-digi-dey/dynamic-layers/freescale-layer/recipes-graphics/imx-g2d/imx-gpu-g2d_6.4.3.p2.4.bb +++ /dev/null @@ -1,30 +0,0 @@ -# Copyright (C) 2016 Freescale Semiconductor -# Copyright 2017-2021 NXP -# Copyright 2018 (C) O.S. Systems Software LTDA. -# Released under the MIT license (see COPYING.MIT for the terms) - -DESCRIPTION = "G2D library using i.MX GPU" -LICENSE = "Proprietary" -LIC_FILES_CHKSUM = "file://COPYING;md5=03bcadc8dc0a788f66ca9e2b89f56c6f" -DEPENDS = "libgal-imx" -PROVIDES = "virtual/libg2d" - -FSLBIN_NAME = "${PN}-${PV}-${TARGET_ARCH}" - -SRC_URI = "${FSL_MIRROR}/${FSLBIN_NAME}.bin;name=${TARGET_ARCH};fsl-eula=true" -SRC_URI[aarch64.md5sum] = "9d64a9c4a870419607d9e47e832eb997" -SRC_URI[aarch64.sha256sum] = "6065f545568e6cdc138f2d6e7cdcb525e477ce1d775c0ceabe2beb2eacf4eb5b" -SRC_URI[arm.md5sum] = "4d6cb47f09f268533cc6a9a90cc87555" -SRC_URI[arm.sha256sum] = "b298a38a16400e655ea46ab25b6261e602687e9970dd755594db343064a9ae53" - -S = "${WORKDIR}/${FSLBIN_NAME}" - -inherit fsl-eula-unpack - -do_install () { - cp -r -d --no-preserve=ownership ${S}/g2d/* ${D} -} - -INSANE_SKIP:${PN} += "ldflags" - -COMPATIBLE_MACHINE = "(imxgpu2d)" diff --git a/meta-digi-dey/dynamic-layers/freescale-layer/recipes-graphics/imx-gpu-viv/imx-gpu-viv-6-overrides.inc b/meta-digi-dey/dynamic-layers/freescale-layer/recipes-graphics/imx-gpu-viv/imx-gpu-viv-6-overrides.inc deleted file mode 100644 index 6c382e592..000000000 --- a/meta-digi-dey/dynamic-layers/freescale-layer/recipes-graphics/imx-gpu-viv/imx-gpu-viv-6-overrides.inc +++ /dev/null @@ -1,49 +0,0 @@ -require recipes-graphics/imx-gpu-viv/imx-gpu-viv-6.inc - -PACKAGECONFIG ?= "valgrind" - -INHIBIT_SYSROOT_STRIP = "1" - -IMX_SOC = "IMX_SOC_NOT_SET" -IMX_SOC:mx8qm-nxp-bsp = "mx8qm" -IMX_SOC:mx8mp-nxp-bsp = "mx8mp" -IMX_SOC:mx8mq-nxp-bsp = "mx8mq" -IMX_SOC:mx8qxp-nxp-bsp = "mx8qxp" -IMX_SOC:mx8mn-nxp-bsp = "mx8mn" -IMX_SOC:mx8ulp-nxp-bsp = "mx8ulp" - -do_install:append() { - if [ -d ${S}/gpu-core/usr/lib/${IMX_SOC} ]; then - cp -r ${S}/gpu-core/usr/lib/${IMX_SOC}/* ${D}${libdir} - fi - # Undo removals - for header in ${GLES3_HEADER_REMOVALS}; do - cp ${S}/gpu-core/usr/include/GLES3/${header} ${D}${includedir}/GLES3 - done -} - -# dri and libVDK.so are removed, make a workaround so base install is not broken -do_install:prepend() { - mkdir -p ${S}/gpu-core/usr/lib/dri - mkdir -p ${S}/gpu-core/usr/lib/fb - touch ${S}/gpu-core/usr/lib/fb/libVDK.so.1.2.0 -} -do_install:append() { - rm -rf ${D}${libdir}/dri - rm -f ${D}${libdir}/libVDK-fb.so.1.2.0 -} - -RDEPENDS:libopenvg-imx += "${@bb.utils.contains('DISTRO_FEATURES', 'systemd', 'systemd-gpuconfig', '', d)}" - -FILES:libnn-imx:remove = "${libdir}/libnn*${SOLIBS} ${libdir}/libneuralnetworks${SOLIBS}" - -FILES:libvulkan-imx += "${libdir}/libvulkan_VSI${SOLIBS}" -INSANE_SKIP:libvulkan-imx += "dev-so" -FILES:libopenvx-imx += "${libdir}/libOpenVX${SOLIBS}" -INSANE_SKIP:libopenvx-imx += "dev-so dev-deps" -FILES:libopencl-imx += "${libdir}/libOpenCL${SOLIBS}" -INSANE_SKIP:libopencl-imx += "dev-so dev-deps" -FILES:libopenvg-imx += "${libdir}/libOpenVG*${SOLIBS}" -INSANE_SKIP:libopenvg-imx += "dev-so" -FILES:libvdk-imx += "${libdir}/libVDK*${SOLIBS}" -INSANE_SKIP:libvdk-imx += "dev-so" diff --git a/meta-digi-dey/dynamic-layers/freescale-layer/recipes-graphics/imx-gpu-viv/imx-gpu-viv_6.4.3.p2.4-aarch32.bb b/meta-digi-dey/dynamic-layers/freescale-layer/recipes-graphics/imx-gpu-viv/imx-gpu-viv_6.4.3.p2.4-aarch32.bb deleted file mode 100644 index 8b2f53a12..000000000 --- a/meta-digi-dey/dynamic-layers/freescale-layer/recipes-graphics/imx-gpu-viv/imx-gpu-viv_6.4.3.p2.4-aarch32.bb +++ /dev/null @@ -1,8 +0,0 @@ -require imx-gpu-viv-6-overrides.inc - -LIC_FILES_CHKSUM = "file://COPYING;md5=03bcadc8dc0a788f66ca9e2b89f56c6f" - -SRC_URI[md5sum] = "d577c4e34df73855ebf1c3b3be206f40" -SRC_URI[sha256sum] = "a0266612e8c9ca64b417047274941c867de1058db6709170d0bb5c8b8a38eab1" - -COMPATIBLE_MACHINE = "(mx6q-nxp-bsp|mx6dl-nxp-bsp|mx6sx-nxp-bsp|mx6sl-nxp-bsp|mx7ulp-nxp-bsp)" diff --git a/meta-digi-dey/dynamic-layers/freescale-layer/recipes-graphics/imx-gpu-viv/imx-gpu-viv_6.4.3.p2.4-aarch64.bb b/meta-digi-dey/dynamic-layers/freescale-layer/recipes-graphics/imx-gpu-viv/imx-gpu-viv_6.4.3.p2.4-aarch64.bb deleted file mode 100644 index 970d636df..000000000 --- a/meta-digi-dey/dynamic-layers/freescale-layer/recipes-graphics/imx-gpu-viv/imx-gpu-viv_6.4.3.p2.4-aarch64.bb +++ /dev/null @@ -1,8 +0,0 @@ -require imx-gpu-viv-6-overrides.inc - -LIC_FILES_CHKSUM = "file://COPYING;md5=03bcadc8dc0a788f66ca9e2b89f56c6f" - -SRC_URI[md5sum] = "d53371c1a9a504ff15f747e725164dcb" -SRC_URI[sha256sum] = "6106133afed40327b65d3eec0c197d214ff8f28f8ce3cad94653be4bffb9f9d4" - -COMPATIBLE_MACHINE = "(mx8-nxp-bsp)" From 70a3a11a448064ecfbb750a78a2b4da1b5eec534 Mon Sep 17 00:00:00 2001 From: Hector Palacios Date: Mon, 28 Nov 2022 09:55:33 +0100 Subject: [PATCH 20/25] udev-extraconf: remove 'mount.sh' provided by poky In the past, this file was cloned from poky to skip mounting an already mounted device. This condition was done on poky's version so the cloned file is no longer needed. Signed-off-by: Hector Palacios --- .../recipes-core/udev/udev-extraconf/mount.sh | 157 ------------------ 1 file changed, 157 deletions(-) delete mode 100644 meta-digi-arm/recipes-core/udev/udev-extraconf/mount.sh diff --git a/meta-digi-arm/recipes-core/udev/udev-extraconf/mount.sh b/meta-digi-arm/recipes-core/udev/udev-extraconf/mount.sh deleted file mode 100644 index 89d06b66a..000000000 --- a/meta-digi-arm/recipes-core/udev/udev-extraconf/mount.sh +++ /dev/null @@ -1,157 +0,0 @@ -#!/bin/sh -# -# Called from udev -# -# Attempt to mount any added block devices and umount any removed devices - -BASE_INIT="`readlink -f "@base_sbindir@/init"`" -INIT_SYSTEMD="@systemd_unitdir@/systemd" - -if [ "x$BASE_INIT" = "x$INIT_SYSTEMD" ];then - # systemd as init uses systemd-mount to mount block devices - MOUNT="/usr/bin/systemd-mount" - UMOUNT="/usr/bin/systemd-umount" - - if [ -x $MOUNT ] && [ -x $UMOUNT ]; - then - logger "Using systemd-mount to finish mount" - else - logger "Linux init is using systemd, so please install systemd-mount to finish mount" - exit 1 - fi -else - MOUNT="/bin/mount" - UMOUNT="/bin/umount" -fi - -PMOUNT="/usr/bin/pmount" - -for line in `grep -h -v ^# /etc/udev/mount.blacklist /etc/udev/mount.blacklist.d/*` -do - if [ ` expr match "$DEVNAME" "$line" ` -gt 0 ]; - then - logger "udev/mount.sh" "[$DEVNAME] is blacklisted, ignoring" - exit 0 - fi -done - -automount_systemd() { - name="`basename "$DEVNAME"`" - - # Skip already mounted partitions - if [ -f /run/systemd/transient/run-media-$name.mount ]; then - logger "mount.sh/automount" "/run/media/$name already mounted" - return - fi - - # Skip the partition which are already in /etc/fstab - grep "^[[:space:]]*$DEVNAME" /etc/fstab && return - for n in LABEL PARTLABEL UUID PARTUUID; do - tmp="$(lsblk -o $n $DEVNAME | sed -e '1d')" - test -z "$tmp" && continue - tmp="$n=$tmp" - grep "^[[:space:]]*$tmp" /etc/fstab && return - done - - [ -d "/run/media/$name" ] || mkdir -p "/run/media/$name" - - MOUNT="$MOUNT -o silent" - - # If filesystemtype is vfat, change the ownership group to 'disk', and - # grant it with w/r/x permissions. - case $ID_FS_TYPE in - vfat|fat) - MOUNT="$MOUNT -o umask=007,gid=`awk -F':' '/^disk/{print $3}' /etc/group`" - ;; - # TODO - *) - ;; - esac - - if ! $MOUNT --no-block -t auto $DEVNAME "/run/media/$name" - then - #logger "mount.sh/automount" "$MOUNT -t auto $DEVNAME \"/run/media/$name\" failed!" - rm_dir "/run/media/$name" - else - logger "mount.sh/automount" "Auto-mount of [/run/media/$name] successful" - touch "/tmp/.automount-$name" - fi -} - -automount() { - name="`basename "$DEVNAME"`" - - if [ -x "$PMOUNT" ]; then - $PMOUNT $DEVNAME 2> /dev/null - elif [ -x $MOUNT ]; then - $MOUNT $DEVNAME 2> /dev/null - fi - - # If the device isn't mounted at this point, it isn't - # configured in fstab - grep -q "^$DEVNAME " /proc/mounts && return - - ! test -d "/run/media/$name" && mkdir -p "/run/media/$name" - # Silent util-linux's version of mounting auto - if [ "x`readlink $MOUNT`" = "x/bin/mount.util-linux" ] ; - then - MOUNT="$MOUNT -o silent" - fi - - # If filesystem type is vfat, change the ownership group to 'disk', and - # grant it with w/r/x permissions. - case $ID_FS_TYPE in - vfat|fat) - MOUNT="$MOUNT -o umask=007,gid=`awk -F':' '/^disk/{print $3}' /etc/group`" - ;; - # TODO - *) - ;; - esac - - if ! $MOUNT -t auto $DEVNAME "/run/media/$name" - then - #logger "mount.sh/automount" "$MOUNT -t auto $DEVNAME \"/run/media/$name\" failed!" - rm_dir "/run/media/$name" - else - logger "mount.sh/automount" "Auto-mount of [/run/media/$name] successful" - touch "/tmp/.automount-$name" - fi -} - -rm_dir() { - # We do not want to rm -r populated directories - if test "`find "$1" | wc -l | tr -d " "`" -lt 2 -a -d "$1" - then - ! test -z "$1" && rm -r "$1" - else - logger "mount.sh/automount" "Not removing non-empty directory [$1]" - fi -} - -# No ID_FS_TYPE for cdrom device, yet it should be mounted -name="`basename "$DEVNAME"`" -[ -e /sys/block/$name/device/media ] && media_type=`cat /sys/block/$name/device/media` - -if [ "$ACTION" = "add" ] && [ -n "$DEVNAME" ] && [ -n "$ID_FS_TYPE" -o "$media_type" = "cdrom" ]; then - # Note the root filesystem can show up as /dev/root in /proc/mounts, - # so check the device number too - if expr $MAJOR "*" 256 + $MINOR != `stat -c %d /`; then - if [ "`basename $MOUNT`" = "systemd-mount" ];then - automount_systemd - else - automount - fi - fi -fi - -if [ "$ACTION" = "remove" ] || [ "$ACTION" = "change" ] && [ -x "$UMOUNT" ] && [ -n "$DEVNAME" ]; then - for mnt in `cat /proc/mounts | grep "$DEVNAME" | cut -f 2 -d " " ` - do - $UMOUNT $mnt - done - - # Remove empty directories from auto-mounter - name="`basename "$DEVNAME"`" - test -e "/tmp/.automount-$name" && rm_dir "/run/media/$name" -fi From b689755778150f5c9d56b076cc6d33f25dbd517f Mon Sep 17 00:00:00 2001 From: Hector Palacios Date: Mon, 28 Nov 2022 10:55:28 +0100 Subject: [PATCH 21/25] weston-init: add user 'weston' to group 'disk' This allows the user 'weston', which is running the video backend, to access files on external media, such as USB disks and microSD card. Signed-off-by: Hector Palacios https://onedigi.atlassian.net/browse/DEL-8208 --- .../recipes-graphics/wayland/weston-init.bbappend | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/meta-digi-arm/dynamic-layers/stm-st-stm32mp/recipes-graphics/wayland/weston-init.bbappend b/meta-digi-arm/dynamic-layers/stm-st-stm32mp/recipes-graphics/wayland/weston-init.bbappend index 62e42a610..845ee96e8 100644 --- a/meta-digi-arm/dynamic-layers/stm-st-stm32mp/recipes-graphics/wayland/weston-init.bbappend +++ b/meta-digi-arm/dynamic-layers/stm-st-stm32mp/recipes-graphics/wayland/weston-init.bbappend @@ -95,5 +95,5 @@ do_install:append:stm32mpcommon() { SYSTEMD_SERVICE:${PN}:remove = "weston.service weston.socket" SYSTEMD_SERVICE:${PN} += "weston-launch.service weston-checkgpu.service" #inherit useradd -USERADD_PARAM:${PN} = "--home /home/weston --shell /bin/sh --user-group -G video,input,tty,audio,weston-launch,dialout weston" +USERADD_PARAM:${PN} = "--home /home/weston --shell /bin/sh --user-group -G video,input,tty,audio,weston-launch,dialout,disk weston" GROUPADD_PARAM:${PN} = "-r weston-launch; -r wayland" From 27121ec4bfc1800f33f7bbc7dfd86372e46641d8 Mon Sep 17 00:00:00 2001 From: Hector Palacios Date: Mon, 28 Nov 2022 11:09:38 +0100 Subject: [PATCH 22/25] ccmp15/13_dvk: define default UART for XBee socket on DVK Signed-off-by: Hector Palacios https://onedigi.atlassian.net/browse/DEL-8212 --- meta-digi-arm/conf/machine/ccmp13-dvk.conf | 4 ++++ meta-digi-arm/conf/machine/ccmp15-dvk.conf | 4 ++++ 2 files changed, 8 insertions(+) diff --git a/meta-digi-arm/conf/machine/ccmp13-dvk.conf b/meta-digi-arm/conf/machine/ccmp13-dvk.conf index 231012abe..aeea34c97 100644 --- a/meta-digi-arm/conf/machine/ccmp13-dvk.conf +++ b/meta-digi-arm/conf/machine/ccmp13-dvk.conf @@ -148,6 +148,10 @@ IS_HEADLESS = "true" # Remove additional bluetooth packages MACHINE_BLUETOOTH_EXTRA_INSTALL = "" +# XBee +XBEE_RESET_N_GPIO ?= "GPIOG@15" +XBEE_TTY ?= "ttySTM2" + # ========================================================================= # alsa # ========================================================================= diff --git a/meta-digi-arm/conf/machine/ccmp15-dvk.conf b/meta-digi-arm/conf/machine/ccmp15-dvk.conf index 97717efc2..9675cba44 100644 --- a/meta-digi-arm/conf/machine/ccmp15-dvk.conf +++ b/meta-digi-arm/conf/machine/ccmp15-dvk.conf @@ -154,6 +154,10 @@ HAS_WIFI_VIRTWLANS = "true" # Remove additional bluetooth packages MACHINE_BLUETOOTH_EXTRA_INSTALL = "" +# XBee +XBEE_RESET_N_GPIO ?= "GPIOZ@2" +XBEE_TTY ?= "ttySTM2" + # ========================================================================= # alsa # ========================================================================= From 27ca6138e1e5959682c53712f448b40baeda7668 Mon Sep 17 00:00:00 2001 From: Hector Palacios Date: Mon, 28 Nov 2022 11:14:38 +0100 Subject: [PATCH 23/25] ccmp1/ccimx6ul: move U-Boot env defines to common include file Signed-off-by: Hector Palacios --- meta-digi-arm/conf/machine/ccimx6ulsbc.conf | 10 ---------- meta-digi-arm/conf/machine/ccimx6ulstarter.conf | 10 ---------- meta-digi-arm/conf/machine/ccmp13-dvk.conf | 9 --------- meta-digi-arm/conf/machine/ccmp15-dvk.conf | 10 ---------- meta-digi-arm/conf/machine/include/ccimx6ul.inc | 9 +++++++++ meta-digi-arm/conf/machine/include/ccmp1.inc | 9 +++++++++ 6 files changed, 18 insertions(+), 39 deletions(-) diff --git a/meta-digi-arm/conf/machine/ccimx6ulsbc.conf b/meta-digi-arm/conf/machine/ccimx6ulsbc.conf index 44b42f30e..862d0a3c8 100644 --- a/meta-digi-arm/conf/machine/ccimx6ulsbc.conf +++ b/meta-digi-arm/conf/machine/ccimx6ulsbc.conf @@ -12,16 +12,6 @@ UBOOT_CONFIG[ccimx6ulsbc1GB] = "ccimx6ulsbc1GB_defconfig,,u-boot-dtb.${UBOOT_SUF UBOOT_CONFIG[ccimx6ulsbc512MB] = "ccimx6ulsbc512MB_defconfig,,u-boot-dtb.${UBOOT_SUFFIX}" UBOOT_CONFIG[ccimx6ulsbc] = "ccimx6ulsbc_defconfig,,u-boot-dtb.${UBOOT_SUFFIX}" -# U-Boot environment size -UBOOT_ENV_SIZE ?= "0x20000" -# U-Boot environment offset (within partition) -UBOOT_ENV_OFFSET ?= "0x0" -UBOOT_ENV_REDUND_OFFSET ?= "${UBOOT_ENV_SIZE}" -# U-Boot environment range: size (in hex) in the environment partition that -# the U-Boot environment can take up (if undefined, it will take up all the -# available space in the environment partition) -UBOOT_ENV_RANGE ?= "" - KERNEL_DEVICETREE ?= " \ imx6ul-ccimx6ulsbc.dtb \ imx6ul-ccimx6ulsbc-wb.dtb \ diff --git a/meta-digi-arm/conf/machine/ccimx6ulstarter.conf b/meta-digi-arm/conf/machine/ccimx6ulstarter.conf index 178abaa60..92d506f75 100644 --- a/meta-digi-arm/conf/machine/ccimx6ulstarter.conf +++ b/meta-digi-arm/conf/machine/ccimx6ulstarter.conf @@ -12,16 +12,6 @@ UBOOT_CONFIG[ccimx6ulstarter1GB] = "ccimx6ulstarter1GB_defconfig,,u-boot-dtb.${U UBOOT_CONFIG[ccimx6ulstarter512MB] = "ccimx6ulstarter512MB_defconfig,,u-boot-dtb.${UBOOT_SUFFIX}" UBOOT_CONFIG[ccimx6ulstarter] = "ccimx6ulstarter_defconfig,,u-boot-dtb.${UBOOT_SUFFIX}" -# U-Boot environment size -UBOOT_ENV_SIZE ?= "0x20000" -# U-Boot environment offset (within partition) -UBOOT_ENV_OFFSET ?= "0x0" -UBOOT_ENV_REDUND_OFFSET ?= "${UBOOT_ENV_SIZE}" -# U-Boot environment range: size (in hex) in the environment partition that -# the U-Boot environment can take up (if undefined, it will take up all the -# available space in the environment partition) -UBOOT_ENV_RANGE ?= "" - KERNEL_DEVICETREE ?= " \ imx6ul-ccimx6ulstarter.dtb \ imx6ul-ccimx6ulstarter-wb.dtb \ diff --git a/meta-digi-arm/conf/machine/ccmp13-dvk.conf b/meta-digi-arm/conf/machine/ccmp13-dvk.conf index aeea34c97..a0454d185 100644 --- a/meta-digi-arm/conf/machine/ccmp13-dvk.conf +++ b/meta-digi-arm/conf/machine/ccmp13-dvk.conf @@ -122,15 +122,6 @@ ST_KERNEL_LOADADDR ?= "0xC0008000" # ========================================================================= IMAGE_CLASSES = "image_types_digi image_types-stubi" -# U-Boot environment offset (within partition) -UBOOT_ENV_OFFSET ?= "0x0" -# U-Boot environment size -UBOOT_ENV_SIZE ?= "0x20000" -# U-Boot environment range: size (in hex) in the environment partition that -# the U-Boot environment can take up (if undefined, it will take up all the -# available space in the environment partition) -UBOOT_ENV_RANGE ?= "" - # mkfs.ubifs parameters for boot partition (the one holding kernel and device tree files) # Max LEB count (-c 255) calculated for a partition of up to 32 MiB considering 128 KiB erase-block size. MKUBIFS_BOOT_ARGS ?= "-m 2048 -e 126976 -c 255" diff --git a/meta-digi-arm/conf/machine/ccmp15-dvk.conf b/meta-digi-arm/conf/machine/ccmp15-dvk.conf index 9675cba44..7f4c01b74 100644 --- a/meta-digi-arm/conf/machine/ccmp15-dvk.conf +++ b/meta-digi-arm/conf/machine/ccmp15-dvk.conf @@ -130,16 +130,6 @@ ST_KERNEL_LOADADDR ?= "0xC0008000" # ========================================================================= IMAGE_CLASSES = "image_types_digi image_types-stubi" -# U-Boot environment offset (within partition) -UBOOT_ENV_OFFSET ?= "0x0" -UBOOT_ENV_REDUND_OFFSET ?= "0x0" -# U-Boot environment size -UBOOT_ENV_SIZE ?= "0x20000" -# U-Boot environment range: size (in hex) in the environment partition that -# the U-Boot environment can take up (if undefined, it will take up all the -# available space in the environment partition) -UBOOT_ENV_RANGE ?= "" - # mkfs.ubifs parameters for boot partition (the one holding kernel and device tree files) # Max LEB count (-c 255) calculated for a partition of up to 32 MiB considering 128 KiB erase-block size. MKUBIFS_BOOT_ARGS ?= "-m 2048 -e 126976 -c 255" diff --git a/meta-digi-arm/conf/machine/include/ccimx6ul.inc b/meta-digi-arm/conf/machine/include/ccimx6ul.inc index 9d5e91d82..6b83e56ed 100644 --- a/meta-digi-arm/conf/machine/include/ccimx6ul.inc +++ b/meta-digi-arm/conf/machine/include/ccimx6ul.inc @@ -61,3 +61,12 @@ ROOTFS_ENC_DEV = "${ROOTFS_DEV_NAME}" ROOTFS_DEV_NAME_FINAL = "${@oe.utils.ifelse(d.getVar('TRUSTFENCE_ENCRYPT_ROOTFS', True) == '1', '${ROOTFS_ENC_DEV}', '${ROOTFS_DEV_NAME}')}" UBOOT_DEV_NAME ?= "/dev/mtd" +# U-Boot environment offset (within partition) +UBOOT_ENV_OFFSET ?= "0x0" +UBOOT_ENV_REDUND_OFFSET ?= "${UBOOT_ENV_SIZE}" +# U-Boot environment size +UBOOT_ENV_SIZE ?= "0x20000" +# U-Boot environment range: size (in hex) in the environment partition that +# the U-Boot environment can take up (if undefined, it will take up all the +# available space in the environment partition) +UBOOT_ENV_RANGE ?= "" diff --git a/meta-digi-arm/conf/machine/include/ccmp1.inc b/meta-digi-arm/conf/machine/include/ccmp1.inc index d093790e3..ed3ae6a2d 100644 --- a/meta-digi-arm/conf/machine/include/ccmp1.inc +++ b/meta-digi-arm/conf/machine/include/ccmp1.inc @@ -27,6 +27,15 @@ ROOTFS_ENC_DEV = "${ROOTFS_DEV_NAME}" ROOTFS_DEV_NAME_FINAL = "${@oe.utils.ifelse(d.getVar('TRUSTFENCE_ENCRYPT_ROOTFS', True) == '1', '${ROOTFS_ENC_DEV}', '${ROOTFS_DEV_NAME}')}" UBOOT_DEV_NAME ?= "/dev/mtd" +# U-Boot environment offset (within partition) +UBOOT_ENV_OFFSET ?= "0x0" +UBOOT_ENV_REDUND_OFFSET ?= "0x0" +# U-Boot environment size +UBOOT_ENV_SIZE ?= "0x20000" +# U-Boot environment range: size (in hex) in the environment partition that +# the U-Boot environment can take up (if undefined, it will take up all the +# available space in the environment partition) +UBOOT_ENV_RANGE ?= "" # Extra udev rules MACHINE_EXTRA_RRECOMMENDS += "udev-extraconf" From 2bc468a7e2fed2ad396daf10684a9223246fe014 Mon Sep 17 00:00:00 2001 From: Hector Palacios Date: Tue, 29 Nov 2022 10:57:10 +0100 Subject: [PATCH 24/25] readme.md: add ccmp15 known issues RS485 and P2P Wi-Fi concurrency Signed-off-by: Hector Palacios --- README.md | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/README.md b/README.md index e34438d4b..c8a816512 100644 --- a/README.md +++ b/README.md @@ -107,6 +107,11 @@ updated list can be found on the online documentation. * ConnectCore MP15 System-on-Module (SOM) * Power management: * Audio interface does not work after suspend. + * UART: + * RS-485 mode is currently not supported. + * Wireless + * P2P on the ConnectCore MP15 doesn't currently work in concurrency with + other modes (station or SoftAP). * The following features are not yet supported: * TrustFence From 2ca5dfe31e0d5af1fd031d907a42ea835a7a2d88 Mon Sep 17 00:00:00 2001 From: Arturo Buzarra Date: Tue, 29 Nov 2022 13:29:53 +0100 Subject: [PATCH 25/25] meta-digi: update revisions for dey-4.0-r1.2 Signed-off-by: Arturo Buzarra --- .../recipes-bsp/trusted-firmware-a/tf-a-stm32mp_%.bbappend | 4 ++-- .../recipes-security/optee/optee-os-stm32mp_%.bbappend | 4 ++-- meta-digi-arm/recipes-bsp/u-boot/digi-u-boot.inc | 2 +- meta-digi-arm/recipes-bsp/u-boot/u-boot-dey_2020.04.bb | 2 +- meta-digi-arm/recipes-bsp/u-boot/u-boot-dey_2021.10.bb | 2 +- .../recipes-digi/trustfence/trustfence-sign-tools_git.bb | 4 ++-- .../kernel-module-qualcomm/kernel-module-qualcomm.bb | 4 ++-- meta-digi-arm/recipes-kernel/linux/linux-dey-src.inc | 2 +- meta-digi-arm/recipes-kernel/linux/linux-dey_5.15.bb | 4 ++-- .../python3-connectcore-ble/python3-connectcore-ble_git.bb | 4 ++-- .../recipes-digi/cloudconnector/cloudconnector_git.bb | 4 ++-- meta-digi-dey/recipes-digi/dey-examples/dey-examples-src.inc | 4 ++-- meta-digi-dey/recipes-digi/libdigiapix/libdigiapix_git.bb | 4 ++-- 13 files changed, 22 insertions(+), 22 deletions(-) diff --git a/meta-digi-arm/dynamic-layers/stm-st-stm32mp/recipes-bsp/trusted-firmware-a/tf-a-stm32mp_%.bbappend b/meta-digi-arm/dynamic-layers/stm-st-stm32mp/recipes-bsp/trusted-firmware-a/tf-a-stm32mp_%.bbappend index 3c96008f2..872a4dae3 100644 --- a/meta-digi-arm/dynamic-layers/stm-st-stm32mp/recipes-bsp/trusted-firmware-a/tf-a-stm32mp_%.bbappend +++ b/meta-digi-arm/dynamic-layers/stm-st-stm32mp/recipes-bsp/trusted-firmware-a/tf-a-stm32mp_%.bbappend @@ -8,10 +8,10 @@ TFA_URI_GITHUB = "${DIGI_GITHUB_GIT}/arm-trusted-firmware.git;protocol=https" TFA_GIT_URI ?= "${@oe.utils.conditional('DIGI_INTERNAL_GIT', '1' , '${TFA_URI_STASH}', '${TFA_URI_GITHUB}', d)}" SRCBRANCH = "v2.6/stm32mp/maint" -SRCREV = "${AUTOREV}" +SRCREV = "93ddcb78d5a66afedecc054981bfeca75328e6e6" SRC_URI = " \ - ${TFA_GIT_URI};branch=${SRCBRANCH} \ + ${TFA_GIT_URI};nobranch=1 \ " TF_A_CONFIG[nand] = "${DEVICE_BOARD_ENABLE:NAND},STM32MP_RAW_NAND=1 ${@'STM32MP_FORCE_MTD_START_OFFSET=${TF_A_MTD_START_OFFSET_NAND}' if ${TF_A_MTD_START_OFFSET_NAND} else ''} STM32MP_USB_PROGRAMMER=1" diff --git a/meta-digi-arm/dynamic-layers/stm-st-stm32mp/recipes-security/optee/optee-os-stm32mp_%.bbappend b/meta-digi-arm/dynamic-layers/stm-st-stm32mp/recipes-security/optee/optee-os-stm32mp_%.bbappend index ec8bc733a..6fab01050 100644 --- a/meta-digi-arm/dynamic-layers/stm-st-stm32mp/recipes-security/optee/optee-os-stm32mp_%.bbappend +++ b/meta-digi-arm/dynamic-layers/stm-st-stm32mp/recipes-security/optee/optee-os-stm32mp_%.bbappend @@ -8,10 +8,10 @@ OPTEE_URI_GITHUB = "${DIGI_GITHUB_GIT}/optee_os.git;protocol=https" OPTEE_GIT_URI ?= "${@oe.utils.conditional('DIGI_INTERNAL_GIT', '1' , '${OPTEE_URI_STASH}', '${OPTEE_URI_GITHUB}', d)}" SRCBRANCH = "3.16.0/stm/maint" -SRCREV = "${AUTOREV}" +SRCREV = "9f1b4813b0c4a6c3ea3991e52898a9aa8757cd42" SRC_URI = " \ - ${OPTEE_GIT_URI};branch=${SRCBRANCH};name=os \ + ${OPTEE_GIT_URI};nobranch=1;name=os \ file://fonts.tar.gz;subdir=git;name=fonts \ " 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 b0bfe30c4..a0e377aa2 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 @@ -20,7 +20,7 @@ UBOOT_URI_GITHUB = "${DIGI_GITHUB_GIT}/u-boot.git;protocol=https" UBOOT_GIT_URI ?= "${@oe.utils.conditional('DIGI_INTERNAL_GIT', '1' , '${UBOOT_URI_STASH}', '${UBOOT_URI_GITHUB}', d)}" SRC_URI = " \ - ${UBOOT_GIT_URI};branch=${SRCBRANCH} \ + ${UBOOT_GIT_URI};nobranch=1 \ file://altboot.txt \ file://boot.txt \ file://install_linux_fw_sd.txt \ 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 31df54434..d64b6c641 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 @@ -6,6 +6,6 @@ LIC_FILES_CHKSUM = "file://Licenses/README;md5=30503fd321432fc713238f582193b78e" DEPENDS += "flex-native bison-native" SRCBRANCH = "v2020.04/maint" -SRCREV = "${AUTOREV}" +SRCREV = "ee49926359a70ce04340d80e291b7d9854eb4f9b" COMPATIBLE_MACHINE = "(ccimx8x|ccimx8m|ccimx6ul)" diff --git a/meta-digi-arm/recipes-bsp/u-boot/u-boot-dey_2021.10.bb b/meta-digi-arm/recipes-bsp/u-boot/u-boot-dey_2021.10.bb index c1d262c15..c896a1a6b 100644 --- a/meta-digi-arm/recipes-bsp/u-boot/u-boot-dey_2021.10.bb +++ b/meta-digi-arm/recipes-bsp/u-boot/u-boot-dey_2021.10.bb @@ -7,6 +7,6 @@ DEPENDS += "flex-native bison-native" DEPENDS += "python3-setuptools-native" SRCBRANCH = "v2021.10/maint" -SRCREV = "${AUTOREV}" +SRCREV = "48315a4ed7b9d6169be76054fe83e178bdd0c30a" COMPATIBLE_MACHINE = "(ccmp1)" diff --git a/meta-digi-arm/recipes-digi/trustfence/trustfence-sign-tools_git.bb b/meta-digi-arm/recipes-digi/trustfence/trustfence-sign-tools_git.bb index fdf63f5d5..0346e71be 100644 --- a/meta-digi-arm/recipes-digi/trustfence/trustfence-sign-tools_git.bb +++ b/meta-digi-arm/recipes-digi/trustfence/trustfence-sign-tools_git.bb @@ -8,7 +8,7 @@ DEPENDS = "trustfence-cst coreutils util-linux" DEPENDS += "${@oe.utils.conditional('TRUSTFENCE_SIGN_MODE', 'AHAB', 'imx-mkimage', '', d)}" SRCBRANCH = "v2020.04/maint" -SRCREV = "${AUTOREV}" +SRCREV = "ee49926359a70ce04340d80e291b7d9854eb4f9b" S = "${WORKDIR}" @@ -18,7 +18,7 @@ UBOOT_URI_GITHUB = "${DIGI_GITHUB_GIT}/u-boot.git;protocol=https" UBOOT_GIT_URI ?= "${@oe.utils.conditional('DIGI_INTERNAL_GIT', '1' , '${UBOOT_URI_STASH}', '${UBOOT_URI_GITHUB}', d)}" SRC_URI = " \ - ${UBOOT_GIT_URI};branch=${SRCBRANCH} \ + ${UBOOT_GIT_URI};nobranch=1 \ file://trustfence-sign-artifact.sh;name=artifact-sign-script \ file://sign_hab;name=artifact-hab-sign \ file://encrypt_hab;name=artifact-hab-encrypt \ diff --git a/meta-digi-arm/recipes-kernel/kernel-module-qualcomm/kernel-module-qualcomm.bb b/meta-digi-arm/recipes-kernel/kernel-module-qualcomm/kernel-module-qualcomm.bb index 798eff21d..bd55bff10 100644 --- a/meta-digi-arm/recipes-kernel/kernel-module-qualcomm/kernel-module-qualcomm.bb +++ b/meta-digi-arm/recipes-kernel/kernel-module-qualcomm/kernel-module-qualcomm.bb @@ -9,12 +9,12 @@ LIC_FILES_CHKSUM = "file://${COMMON_LICENSE_DIR}/ISC;md5=f3b90e78ea0cffb20bf5cca PV = "v4.0.11.213X" SRCBRANCH = "qca65X4/dey-4.0/maint" -SRCREV = "${AUTOREV}" +SRCREV = "333e820a6ba3f13b0e4017aeda0e7ed00cea4c2f" QCOM_GIT_URI = "${@oe.utils.conditional('DIGI_INTERNAL_GIT', '1' , '${DIGI_MTK_GIT}/linux/qcacld-2.0.git;protocol=ssh', '${DIGI_GITHUB_GIT}/qcacld-2.0.git;protocol=https', d)}" SRC_URI = " \ - ${QCOM_GIT_URI};branch=${SRCBRANCH} \ + ${QCOM_GIT_URI};nobranch=1 \ " # Selects whether the interface is SDIO or PCI diff --git a/meta-digi-arm/recipes-kernel/linux/linux-dey-src.inc b/meta-digi-arm/recipes-kernel/linux/linux-dey-src.inc index e3e15bca2..a29464636 100644 --- a/meta-digi-arm/recipes-kernel/linux/linux-dey-src.inc +++ b/meta-digi-arm/recipes-kernel/linux/linux-dey-src.inc @@ -7,7 +7,7 @@ LINUX_URI_STASH = "${DIGI_MTK_GIT}/linux/linux.git;protocol=ssh" LINUX_URI_GITHUB = "${DIGI_GITHUB_GIT}/linux.git;protocol=https" LINUX_GIT_URI ?= "${@oe.utils.conditional('DIGI_INTERNAL_GIT', '1' , '${LINUX_URI_STASH}', '${LINUX_URI_GITHUB}', d)}" -SRC_URI = "${LINUX_GIT_URI};branch=${SRCBRANCH}" +SRC_URI = "${LINUX_GIT_URI};nobranch=1" # A user can provide his own kernel 'defconfig' file by: # - setting the variable KERNEL_DEFCONFIG to a custom kernel configuration file diff --git a/meta-digi-arm/recipes-kernel/linux/linux-dey_5.15.bb b/meta-digi-arm/recipes-kernel/linux/linux-dey_5.15.bb index b511d33c4..1fb025af3 100644 --- a/meta-digi-arm/recipes-kernel/linux/linux-dey_5.15.bb +++ b/meta-digi-arm/recipes-kernel/linux/linux-dey_5.15.bb @@ -12,8 +12,8 @@ inherit ${@oe.utils.conditional('DEY_BUILD_PLATFORM', 'NXP', 'fsl-kernel-localve SRCBRANCH = "v5.15/nxp/dey-4.0/maint" SRCBRANCH:stm32mpcommon = "v5.15/stm/dey-4.0/maint" -SRCREV = "${AUTOREV}" -SRCREV:stm32mpcommon = "${AUTOREV}" +SRCREV = "55e3f4eb30296a8cc0df9392ffd630a10348e854" +SRCREV:stm32mpcommon = "5d06c7f6d3a5863b3be3fdb7201167f8af593059" require ${@oe.utils.conditional('DEY_BUILD_PLATFORM', 'STM', 'recipes-kernel/linux/linux-stm32mp.inc', '', d)} # Don't create custom folder for kernel artifacts diff --git a/meta-digi-dey/recipes-devtools/python3-connectcore-ble/python3-connectcore-ble_git.bb b/meta-digi-dey/recipes-devtools/python3-connectcore-ble/python3-connectcore-ble_git.bb index a89c868cf..9ad9f40f3 100644 --- a/meta-digi-dey/recipes-devtools/python3-connectcore-ble/python3-connectcore-ble_git.bb +++ b/meta-digi-dey/recipes-devtools/python3-connectcore-ble/python3-connectcore-ble_git.bb @@ -8,14 +8,14 @@ LICENSE = "MPL-2.0" LIC_FILES_CHKSUM = "file://${COMMON_LICENSE_DIR}/MPL-2.0;md5=815ca599c9df247a0c7f619bab123dad" SRCBRANCH ?= "master" -SRCREV = "${AUTOREV}" +SRCREV = "01791cd74482bbe9cb7b8e2815aeb1871e004445" CONNECTCORE_BLE_URI_STASH = "${DIGI_MTK_GIT}/python/connectcore-ble-python.git;protocol=ssh" CONNECTCORE_BLE_URI_GITHUB = "${DIGI_GITHUB_GIT}/connectcore-ble-python.git;protocol=https" CONNECTCORE_BLE_URI ?= "${@oe.utils.conditional('DIGI_INTERNAL_GIT', '1' , '${CONNECTCORE_BLE_URI_STASH}', '${CONNECTCORE_BLE_URI_GITHUB}', d)}" SRC_URI = " \ - ${CONNECTCORE_BLE_URI};branch=${SRCBRANCH} \ + ${CONNECTCORE_BLE_URI};nobranch=1 \ " S = "${WORKDIR}/git" diff --git a/meta-digi-dey/recipes-digi/cloudconnector/cloudconnector_git.bb b/meta-digi-dey/recipes-digi/cloudconnector/cloudconnector_git.bb index 8c4cb15a1..b5cb7b650 100644 --- a/meta-digi-dey/recipes-digi/cloudconnector/cloudconnector_git.bb +++ b/meta-digi-dey/recipes-digi/cloudconnector/cloudconnector_git.bb @@ -8,7 +8,7 @@ LIC_FILES_CHKSUM = "file://${COMMON_LICENSE_DIR}/MPL-2.0;md5=815ca599c9df247a0c7 DEPENDS = "confuse libdigiapix openssl recovery-utils swupdate zlib json-c" SRCBRANCH = "dey-4.0/maint" -SRCREV = "${AUTOREV}" +SRCREV = "8202b776cbae8d0b2f6f021c53c31d4bfe6d98ac" CC_STASH = "gitsm://git@stash.digi.com/cc/cc_dey.git;protocol=ssh" CC_GITHUB = "gitsm://github.com/digi-embedded/cc_dey.git;protocol=https" @@ -16,7 +16,7 @@ CC_GITHUB = "gitsm://github.com/digi-embedded/cc_dey.git;protocol=https" CC_GIT_URI ?= "${@oe.utils.conditional('DIGI_INTERNAL_GIT', '1' , '${CC_STASH}', '${CC_GITHUB}', d)}" SRC_URI = " \ - ${CC_GIT_URI};branch=${SRCBRANCH} \ + ${CC_GIT_URI};nobranch=1 \ file://cloud-connector-init \ file://cloud-connector.service \ " diff --git a/meta-digi-dey/recipes-digi/dey-examples/dey-examples-src.inc b/meta-digi-dey/recipes-digi/dey-examples/dey-examples-src.inc index 97a2d77b4..175fa89e4 100644 --- a/meta-digi-dey/recipes-digi/dey-examples/dey-examples-src.inc +++ b/meta-digi-dey/recipes-digi/dey-examples/dey-examples-src.inc @@ -1,11 +1,11 @@ # Copyright (C) 2019-2022 Digi International Inc. SRCBRANCH = "dey-4.0/maint" -SRCREV = "${AUTOREV}" +SRCREV = "d9e0146e41f5d7002fac251e5a69be5a2bb2d7ce" DEY_EXAMPLES_STASH = "${DIGI_MTK_GIT}/dey/dey-examples.git;protocol=ssh" DEY_EXAMPLES_GITHUB = "${DIGI_GITHUB_GIT}/dey-examples.git;protocol=https" DEY_EXAMPLES_GIT_URI ?= "${@oe.utils.conditional('DIGI_INTERNAL_GIT', '1' , '${DEY_EXAMPLES_STASH}', '${DEY_EXAMPLES_GITHUB}', d)}" -SRC_URI = "${DEY_EXAMPLES_GIT_URI};branch=${SRCBRANCH}" +SRC_URI = "${DEY_EXAMPLES_GIT_URI};nobranch=1" diff --git a/meta-digi-dey/recipes-digi/libdigiapix/libdigiapix_git.bb b/meta-digi-dey/recipes-digi/libdigiapix/libdigiapix_git.bb index f0f12c259..52ea53dd0 100644 --- a/meta-digi-dey/recipes-digi/libdigiapix/libdigiapix_git.bb +++ b/meta-digi-dey/recipes-digi/libdigiapix/libdigiapix_git.bb @@ -7,7 +7,7 @@ LICENSE = "ISC" LIC_FILES_CHKSUM = "file://${COMMON_LICENSE_DIR}/ISC;md5=f3b90e78ea0cffb20bf5cca7947a896d" SRCBRANCH ?= "dey-4.0/maint" -SRCREV = "${AUTOREV}" +SRCREV = "9ae2f513d2ccc88b4038547709c673e86996068e" LIBDIGIAPIX_URI_STASH = "${DIGI_MTK_GIT}/dey/libdigiapix.git;protocol=ssh" LIBDIGIAPIX_URI_GITHUB = "${DIGI_GITHUB_GIT}/libdigiapix.git;protocol=https" @@ -15,7 +15,7 @@ LIBDIGIAPIX_URI_GITHUB = "${DIGI_GITHUB_GIT}/libdigiapix.git;protocol=https" LIBDIGIAPIX_GIT_URI ?= "${@oe.utils.conditional('DIGI_INTERNAL_GIT', '1' , '${LIBDIGIAPIX_URI_STASH}', '${LIBDIGIAPIX_URI_GITHUB}', d)}" SRC_URI = " \ - ${LIBDIGIAPIX_GIT_URI};branch=${SRCBRANCH} \ + ${LIBDIGIAPIX_GIT_URI};nobranch=1 \ file://99-digiapix.rules \ file://libdigiapix.conf \ file://digiapix.sh \