Commit Graph

2117 Commits

Author SHA1 Message Date
Gabriel Valcazar 09c4645894 mp1: cmsis-svd: switch from master branch to main branch
Otherwise, bitbake's git client won't be able to fetch the sources if there are
no mirrors available.

Signed-off-by: Gabriel Valcazar <gabriel.valcazar@digi.com>
2023-11-28 16:31:32 +01:00
Javier Viguera 3cfce77c0f ccimx93: update ML package for NXP release 6.1.36-2.1.0
As part of the integration of the new ML package, also update the
ethos-u-firmware binary built from Stash:

Repo: emp/ethos_u_firmware.git
Revision: a0352b0cf7267c896b55980dedd08daddc780733
Source: NXP's MCUXpresso SDK_2.14.0_MIMX9352xxxxK

And, drop deepview-rt support for ccimx93, as NXP has done the same in
6.1.36-2.1.0 release.

Signed-off-by: Javier Viguera <javier.viguera@digi.com>
2023-11-28 15:51:38 +01:00
Hector Palacios 8f40cddfc6 trustfence: rework configuration for signing FIT images
- Set variables required for FIT signing inside python function, under the
  condition of having TRUSTFENCE_SIGN="1".
- Define two sign keys using TRUSTFENCE_ wrapper constants. Default values:
  - 'fitcfg' for configuration nodes inside the FIT
  - 'fitimg' for image nodes inside the FIT
- Enable FIT_SIGN_INDIVIDUAL to also sign individual images inside the FIT
- Set FIT_GENERATE_KEYS by default (kernel-fitimage.bbclass already checks
  if the keys exist before generating new ones)

Signed-off-by: Hector Palacios <hector.palacios@digi.com>
2023-11-28 12:53:30 +01:00
Gabriel Valcazar c497caca66 lvgl: configure app dimensions in main recipe file instead of lv-drivers.inc
This change isn't functional, but necessary if we want to be able to separate
the logic in the include file and the demo recipe. This way the include file is
agnostic and can be included into other recipes if needed.

Signed-off-by: Gabriel Valcazar <gabriel.valcazar@digi.com>
2023-11-23 17:55:58 +01:00
Gabriel Valcazar d1c5919298 qt5: set default QT_QPA_PLATFORM values for mp1 platforms
Otherwise, launching a Qt5 app will result in errors and the QPA platform will
need to be set manually to get it to work.

Signed-off-by: Gabriel Valcazar <gabriel.valcazar@digi.com>
2023-11-23 11:35:32 +01:00
Gabriel Valcazar 54c9de6a74 qt5: set default QT_QPA_PLATFORM values for mp1 platforms
Otherwise, launching a Qt5 app will result in errors and the QPA platform will
need to be set manually to get it to work.

Signed-off-by: Gabriel Valcazar <gabriel.valcazar@digi.com>
2023-11-22 16:06:07 +01:00
Javier Viguera b48f2806eb ccimx93: update graphics package for NXP release 6.1.36-2.1.0
Backport of graphics package for ccimx93 from NXP's Mickledore-based
6.1.36-2.1.0 release. Mainly copies and appends of graphics recipes
from the new release, and restricted to ccimx93 by changing the
COMPATIBLE_MACHINE, so it does not affect other platforms.

Notice, that the new version of weston used now by the ccimx93 requires
a different profile file (weston-socket.sh). This profile supercedes the
old 'weston.sh'.

Signed-off-by: Javier Viguera <javier.viguera@digi.com>
2023-11-21 18:23:26 +01:00
Javier Viguera 3aee8c39f7 ccimx93: update multimedia package for NXP release 6.1.36-2.1.0
Backport of multimedia package for ccimx93 from NXP's Mickledore-based
6.1.36-2.1.0 release. Mainly copies and appends of multimedia recipes
from the new release, and restricted to ccimx93 by changing the
COMPATIBLE_MACHINE, so it does not affect other platforms.

Signed-off-by: Javier Viguera <javier.viguera@digi.com>
2023-11-21 18:23:26 +01:00
Javier Viguera 5794b18cd2 meson: backport version 1.0.1 from yocto 4.2
This is required to build the new version of gstreamer used by NXP for
the ccimx93 and integrated in following commits.

Signed-off-by: Javier Viguera <javier.viguera@digi.com>
2023-11-21 18:23:26 +01:00
Gabriel Valcazar 2a015f3f87 Add support for dey-image-lvgl images
LVGL is a free and open-source embedded graphics library that is able to run
in environments with limited resources.

This image includes a desktop environment and an LVGL widget demo (lvgl_demo)

https://onedigi.atlassian.net/browse/DEL-8740

Signed-off-by: Gabriel Valcazar <gabriel.valcazar@digi.com>
2023-11-16 11:39:03 +01:00
Gabriel Valcazar c0789c416b lvgl-demo-fb: generalize for any backend and add improvements
Rename the recipe to lvgl-demo to reflect the generalization and select the
most appropriate backend for each platform. Aside from making sure each backend
builds and runs fine, add some usability improvements:

    * Specify the mouse as the default evdev device instead of the touchscreen
    * Use common resolution variables to be able to configure the app's
      dimensions easily

https://onedigi.atlassian.net/browse/DEL-8740

Signed-off-by: Gabriel Valcazar <gabriel.valcazar@digi.com>
2023-11-16 11:38:56 +01:00
Gabriel Valcazar 33a93ccae4 Copy lvgl-demo-fb recipe from meta-openebedded master branch
https://onedigi.atlassian.net/browse/DEL-8740

Signed-off-by: Gabriel Valcazar <gabriel.valcazar@digi.com>
2023-11-14 14:24:46 +01:00
Francisco Gil 66af49ef9e update firmware: some improvements in update firmware script
Signed-off-by: Francisco Gil <francisco.gilmartinez@digi.com>
2023-11-13 17:23:06 +01:00
Mike Engel df9b1cf329 ccmp1: add signed FIT image support
This commit adds signed FIT image support for the CCMP1
platforms when using Trustfence.

https://onedigi.atlassian.net/browse/DEL-8591

Signed-off-by: Mike Engel <Mike.Engel@digi.com>
2023-10-30 12:58:19 +01:00
David Escalona 7bf452e85a swu: enable 'upgrade-available' flag on single systems and file updates
ConnectCore 6 based products require the use of the 'upgrade_available' environment flag to save the
bootcount value between resets. Extend the use of this U-Boot variable for single system updates and
updates based on files.

Signed-off-by: David Escalona <david.escalona@digi.com>
2023-10-20 16:33:27 +02:00
Tatiana Leon cb6b4fe67a cccs: increment the wait time to restart cccs services when they fail to start
This commits sets 30s between restart attempt after a failure.

Signed-off-by: Tatiana Leon <Tatiana.Leon@digi.com>
2023-10-16 12:18:13 +02:00
Arturo Buzarra e2ee631832 meta-digi: [cosmetic] alphabetize compatible machine string
Signed-off-by: Arturo Buzarra <arturo.buzarra@digi.com>
2023-10-10 14:58:58 +02:00
Gabriel Valcazar 3ccbcdec0f packagegroup-qt6-dey: remove qtquick3d-dev
This package was inadvertantly pulling in a lot of dependencies into our
images that make use of Qt6. Most of these packages consisted of *-dev
packages, which are only useful for development with the SDK.

Remove this package along with its dependencies to significantly reduce the
dey-image-qt rootfs image size.

Note that this change was already done in commit
8979331ef8, but it was accidentally reverted when
upgrading to Qt 6.5 in commit a5c6f2b795.

Signed-off-by: Gabriel Valcazar <gabriel.valcazar@digi.com>
(cherry picked from commit 0d6d6d219f)
2023-10-10 13:50:44 +02:00
Gabriel Valcazar 0d6d6d219f packagegroup-qt6-dey: remove qtquick3d-dev
This package was inadvertantly pulling in a lot of dependencies into our
images that make use of Qt6. Most of these packages consisted of *-dev
packages, which are only useful for development with the SDK.

Remove this package along with its dependencies to significantly reduce the
dey-image-qt rootfs image size.

Note that this change was already done in commit
8979331ef8, but it was accidentally reverted when
upgrading to Qt 6.5 in commit a5c6f2b795.

Signed-off-by: Gabriel Valcazar <gabriel.valcazar@digi.com>
2023-10-10 13:23:57 +02:00
Arturo Buzarra 614c7c62c8 meta-digi-dey: bump distro version to 4.0-r5
Signed-off-by: Arturo Buzarra <arturo.buzarra@digi.com>
2023-10-09 15:47:41 +02:00
Tatiana Leon ef1857fac5 connectcore-demo: fix systemd service dependency on connectcore-demo-server.service
This fix systemd error on boot:

[    6.974370] systemd[1]: /lib/systemd/system/connectcore-demo-example.service:3: Failed to add dependency on connectcore-demo-server, ignoring: Invalid argument

Signed-off-by: Tatiana Leon <Tatiana.Leon@digi.com>
2023-10-09 15:36:23 +02:00
Arturo Buzarra 65f7ca3999 Merge tag 'dey-4.0-r4.1' into dey-4.0/master
Digi Embedded Yocto 4.0-r4.1

Signed-off-by: Arturo Buzarra <arturo.buzarra@digi.com>
2023-10-09 15:33:18 +02:00
Tatiana Leon 0d9b393afc connectcore-demo: fix systemd service dependency on connectcore-demo-server.service
This fix systemd error on boot:

[    6.974370] systemd[1]: /lib/systemd/system/connectcore-demo-example.service:3: Failed to add dependency on connectcore-demo-server, ignoring: Invalid argument

Signed-off-by: Tatiana Leon <Tatiana.Leon@digi.com>
2023-09-29 10:50:18 +02:00
Javier Viguera 07525e1c2c trustfence: relax the expression to match AHAB based SRK certs
Current pattern does not match the SRKs generated for the ccimx93. The
ccimx93 does not support subordinated SGK certs, so the name of the SRKs
do not contain the "_ca_" pattern. So relax the expression used in the
trustfence bbclass to match the SRKs generated for both platforms.

  # For the ccimx93
  $ ls -1 crts/SRK1*crt.pem
  crts/SRK1_sha512_secp521r1_v3_usr_crt.pem

  # For the ccimx8x
  $ ls -1 crts/SRK1*crt.pem
  crts/SRK1_sha512_secp521r1_v3_ca_crt.pem

Signed-off-by: Javier Viguera <javier.viguera@digi.com>
2023-09-25 14:23:40 +02:00
Javier Viguera 34e82e9bac trustfence-initramfs: make compatible with ccimx93
Signed-off-by: Javier Viguera <javier.viguera@digi.com>
2023-09-25 14:23:40 +02:00
Javier Viguera f1bdbe74c8 trustfence: decouple signing external artifacts
Some platforms do not support signing external artifacts (kernel, dtb,
etc.) yet, so we need to decouple the signing of the bootloader from the
signing of the external artifacts.

This commit generalizes the code, so instead of having platform exceptions
scattered along the recipes, we create a new variable used conditionally
to sign or not the external artifacts.

Signed-off-by: Javier Viguera <javier.viguera@digi.com>
2023-09-25 14:23:40 +02:00
Isaac Hermida 441164c575 dey-examples: connectcore-demo: restart service on suspend
If the system is send to suspend mode, the bluetooth core is reconfigured.
Therefore, restart the service if it is running, to configure the ble
service.

https://onedigi.atlassian.net/browse/DEL-8694

Signed-off-by: Isaac Hermida <isaac.hermida@digi.com>
2023-09-20 10:43:34 +02:00
Francisco Gil ff071a17be meta-digi: revert revisions to AUTOREV
Signed-off-by: Francisco Gil <francisco.gilmartinez@digi.com>
2023-09-15 16:42:58 +02:00
Francisco Gil c7b6a9d637 meta-digi: update revisions for dey-4.0-r4.1
Signed-off-by: Francisco Gil <francisco.gilmartinez@digi.com>
2023-09-15 16:41:49 +02:00
David Escalona 7001c87e16 dualboot: pass pubkey to swupdate when available
Signed-off-by: David Escalona <david.escalona@digi.com>
2023-09-15 14:46:09 +02:00
Francisco Gil d6a42cf8e5 meta-digi-dey: remove zstd packageconfig to reduce recovery size
Signed-off-by: Francisco Gil <francisco.gilmartinez@digi.com>
2023-09-15 14:46:03 +02:00
David Escalona 600a5f1625 swupdate: fix new SWU package types to be compatible with Trustfence
Signed-off-by: David Escalona <david.escalona@digi.com>
2023-09-14 16:51:57 +02:00
David Escalona 904464c313 trustfence: fix function that copies public key
Bitbake was always copying the public key 1 to the rootfs, no matter what the value specified in
the 'TRUSTFENCE_KEY_INDEX' variable was. This commit fixes the issue by enclosing the variable
between curly braces so that bitbake is able to expand it and calculate the correct key index.

Signed-off-by: David Escalona <david.escalona@digi.com>
2023-09-14 16:50:40 +02:00
Hector Palacios 58b3bdb584 swupdate: restore a full defconfig out of a .config
Commit 429125cce0 created a minimal version 'defconfig'
that doesn't include all the default configuration options
of swupdate.

However, an anonymous python function inside the swupdate
repository establishes dependencies basing on configuration
switches it finds (or not) in the 'defconfig' file and any
additional configuration fragments.
For this reason, a minimal 'defconfig' cannot be used in
this recipe and a full configuration file (that also includes
default options) must be used instead.

Reported-by: Stephan Klatt
Signed-off-by: Hector Palacios <hector.palacios@digi.com>
Signed-off-by: Javier Viguera  <javier.viguera@digi.com>
2023-09-14 14:00:57 +02:00
Francisco Gil 337f3b2ef3 libdigiapix: pwm: correct the name of the pwm dtbo
Signed-off-by: Francisco Gil <francisco.gilmartinez@digi.com>
2023-09-13 12:00:51 +02:00
Francisco Gil 02562fded0 libdigiapix: adc: fix index in configuration file
There was a missmatch between the configuration file and the
correct adc in the ccmp15 platform.

Also a whitespace is removed from ccmp13 configuration file.

https://onedigi.atlassian.net/browse/DEL-8702

Signed-off-by: Francisco Gil <francisco.gilmartinez@digi.com>
2023-09-12 11:32:07 +02:00
Francisco Gil c544b3252a installer: squashfs: add squashfs images to the installer
https://onedigi.atlassian.net/browse/DEL-8638

Signed-off-by: Francisco Gil <francisco.gilmartinez@digi.com>
2023-09-11 08:48:57 +02:00
Arturo Buzarra 386a97590f switch to building from maintenance branches for dey-4.0-r4
Signed-off-by: Arturo Buzarra <arturo.buzarra@digi.com>
2023-09-08 10:33:34 +02:00
Arturo Buzarra 8db6c71a95 Merge branch 'dey-4.0/master' into dey-4.0/maint
Signed-off-by: Arturo Buzarra <arturo.buzarra@digi.com>
2023-09-08 10:33:10 +02:00
Tatiana Leon 2f2f68dc34 dey-examples: cccs: move cccs examples to dey-examples repository
ConnectCore Cloud Services examples are included in 'dey-examples' repository
so they can be built from here and also imported in Eclipse/Digi Application
Development Environment for Linux with the samples wizard.

The example 'upload_file' has been removed since currently there is no support
for binary data points in the CCCS daemon/client model.

https://onedigi.atlassian.net/browse/DEL-8628

Signed-off-by: Tatiana Leon <Tatiana.Leon@digi.com>
2023-09-06 13:02:01 +02:00
Tatiana Leon f13c0e60cf cc: cccs: replace cloudconnector recipe with new ConnectCore Cloud Services
This recipe generates several packages:

   * 'cccs' includes the CCCS shared library
   * 'cccs-daemon' includes the binary and resources to execute the CCCS daemon
     (daemon, service and init scripts, configuration file)
   * 'cccs-cert' includes the required certificate to use CCCS daemon
   * 'cccs-gs-demo' includes the binary and resources to execute the CCCS get
     started demo (binary, service and init scripts)
   * 'cccs-legacy' includes the binary (all-in-one) application to execute
     the legacy CCCS application (aka cloud-connector) and the configuration
     file
   * 'cccs-legacy-dev' includes resources to develop legacy CCCS applications
     (all-in-one) (header files inside 'cloud-connector' and 'cloudconnector.pc'
     pkg config file)
   * 'cccs-legacy-staticdev' includes static resources to develop legacy CCCS
     applications (all-in-one) (static library)

This commit also renames:
   * 'CLOUDCONNECTOR_PKGS' variable to 'CCCS_PKGS'.
   * 'CC_DEVICE_TYPE' variable to 'CCCS_DEVICE_TYPE'.

https://onedigi.atlassian.net/browse/DEL-8628

Signed-off-by: Tatiana Leon <Tatiana.Leon@digi.com>
2023-09-06 13:01:50 +02:00
Javier Viguera a26c96e35f meta-digi-dey: remove not needed STM specific bbappends
Those bbappends are enabling 'examples' PACKAGECONFIG. This is now done
in the distro config file.

https://onedigi.atlassian.net/browse/DEL-8675

Signed-off-by: Javier Viguera <javier.viguera@digi.com>
2023-09-04 10:23:31 +02:00
Javier Viguera a5c6f2b795 meta-digi-dey: upgrade QT6 to version 6.5
QT v6.5 is a long term support (LTS) and is the version used in newer
releases from NXP (based on Yocto 4.2 mickledore)

This commit basically backports the QT v6.5 from meta-freescale community
layer (mickledore) with some recipe's polishing from meta-imx.

https://onedigi.atlassian.net/browse/DEL-8675

Signed-off-by: Javier Viguera <javier.viguera@digi.com>
2023-09-04 10:23:31 +02:00
Francisco Gil 50554f257c swupdate: add configuration file for ccmp1X platforms
Now we can't determine if the rootfs is ubifs/squashfs
in the ccmp1X platforms, so we need to add again the rootfstype
parameter but only for ccmp1X platforms.

Signed-off-by: Francisco Gil <francisco.gilmartinez@digi.com>
2023-09-01 17:17:04 +02:00
Hector Palacios 7e81e706a1 recovery-initramfs: adapt format_ubi_volume() to new partition layout of ccmp1
The ccmp1 has two MTD partitions (UBI, UBI_2) with different system
volumes.
Previously, the fact of having two ubi devices was taken as proof of
being on a multi-MTD system (one that has one UBI volume per partition).
Instead, this commit reformulates the condition to having a partition of
the same name than the UBI volume.

For the case of the ccmp1, add a new for loop to iterate across any number
of UBI devices.

Signed-off-by: Hector Palacios <hector.palacios@digi.com>
2023-09-01 17:16:54 +02:00
Isaac Hermida eba8e21d72 p2p scripts: generalize support getting name from configuration
The P2P interface may have a different name, for instance, in the ccimx93 it
is wfd (wifi direct).
Generalize Digi P2P scripts to use the name from the platform config file.

https://onedigi.atlassian.net/browse/DEL-8468

Signed-off-by: Isaac Hermida <isaac.hermida@digi.com>
2023-09-01 14:55:37 +02:00
Gabriel Valcazar 3641b93750 qt6: add preliminary support for mp1 platforms
Make sure all packagegroups and examples needed for Qt6 support are accesible
to both NXP and STM-based platforms.

https://onedigi.atlassian.net/browse/DEL-8655

Signed-off-by: Gabriel Valcazar <gabriel.valcazar@digi.com>
2023-09-01 11:37:10 +02:00
Arturo Buzarra acd2ee22c1 trustfence: stm: rework PKI tree generation for CCMP15 platforms
PKI tree generation for the STM32MP15 cpu provides the undesired file
"publicKeysHashHashes.bin", which is only required by STM32MP13. This commit
generates the PKI tree according to the KeyGen tool documentation to avoid
generate this extra file and avoid confusing the end user.

Signed-off-by: Arturo Buzarra <arturo.buzarra@digi.com>
2023-08-30 09:53:56 +02:00
David Escalona fd6d797eae meta-digi-dey: swu-images: enable upgrade available feature only for CCIMX6
The CCIMX6 platform is the only one that will keep using the 'bootcount' value stored in the environment.
For this reason, that is the only platform requiring the 'upgrade_available' flag to be set after a
firmware update. For the rest of the platforms, remove it.

https://onedigi.atlassian.net/browse/DEL-8506

Signed-off-by: David Escalona <david.escalona@digi.com>
2023-08-29 14:55:44 +02:00
David Escalona 981c5e44bb meta-digi-dey: core: add 'bootcount' to DEY core package group to reset bootcount on boot
While on it, remove the block of the 'dualboot' script that was taking care of this action.

https://onedigi.atlassian.net/browse/DEL-8506

Signed-off-by: David Escalona <david.escalona@digi.com>
2023-08-29 14:55:44 +02:00
David Escalona 7174a42e87 meta-digi-dey: bootcount: add new binary application to manage the bootcount
Add a user space application to manage the bootcount from the running system. This application
allows to read, reset and set the bootcount:

Usage: bootcount [options]
  -r              --read           Read the current bootcount value (Default action)
  -s <value>      --set=<value>    Set current bootcount to a specific value.
  -x              --reset          Reset bootcount value to zero.

The binary checks the running platform underneath to perform the correct system access.

While on it, add a service to automatically execute the binary on boot to reset the bootcount value.

https://onedigi.atlassian.net/browse/DEL-8506

Signed-off-by: David Escalona <david.escalona@digi.com>
2023-08-29 14:55:44 +02:00
Mike Engel 32078060f7 swu-images: add sha256 entry for script files.
This commit adds sha256 entry for the script files into
the sw-descrition. It is necessary for the Trustfence
authentication to have the included script files signed.

https://onedigi.atlassian.net/browse/DEL-8649

Signed-off-by: Mike Engel <Mike.Engel@digi.com>
2023-08-28 12:34:52 +02:00
Isaac Hermida 6bddaddb2c hostapd: ccimx93: add code for WPA3 strict mode
Signed-off-by: Isaac Hermida <isaac.hermida@digi.com>
2023-08-28 08:22:23 +02:00
Hector Palacios 13e28b293d recovery-initramfs: remove copying of public key
This is now handled by trustfence.bbclass at image level.

Signed-off-by: Hector Palacios <hector.palacios@digi.com>
2023-08-24 11:49:49 +02:00
Hector Palacios 388a3d13d5 trustfence: fix path creation and calling on copy_public_key()
In the context of the class, we must use ${IMAGE_ROOTFS} instead of ${D}.
Change the calling of the function to POSTPROCESS (after the rootfs has
been created) instead of POSTINSTALL (after the packages have been
installed).

Signed-off-by: Hector Palacios <hector.palacios@digi.com>
2023-08-24 11:48:56 +02:00
Francisco Gil c85d064bdd recovery: squashfs: change the way to determine nand device
There is a corner case in the cc6ul where the update from
recovery was failing.

If the u-boot variable rootfstype is set to squashfs u-boot
modify the bootargs adding "root=/dev/ubiblock1_0". The grep
of the command line was failing and detecting the device as
mmc and making the firmware update process fail.

Modify the grep to use the same system that we are using in
the update-firmware script.

Signed-off-by: Francisco Gil <francisco.gilmartinez@digi.com>
2023-08-23 11:04:22 +02:00
Francisco Gil a56790c072 swupdate: get rid of rootfstype u-boot variable
This variable is only needed in the cc6ul, that's the reason
to create another sw-description only for the ccimx6ul.

Signed-off-by: Francisco Gil <francisco.gilmartinez@digi.com>
2023-08-22 16:19:09 +02:00
Hector Palacios 998598415a dey-image: generate public key after rootfs install
When TrustFence is enabled, a PKI tree is generated.
In the case of NXP platforms, the PKI contains public certificates
from which the public key needs to be extracted using an openssl
command.
In the case of STM platforms, the PKI contains directly the
public key.

In all cases, we need the public key to be installed in the
rootfs /etc/ssl/certs/ folder, so that it can be used by
swupdate to authenticate signed SWU packages.
Up to now, this was being done on the dualboot recipe, but the
installation of the public key should really be only dependant
on the fact of TF being enabled.

This commit:
 - Removes the generation of the public key from dualboot.bb.
 - Generates a patch to extract the public key from the certificate
   as part of the PKI tree generation (on NXP platforms).
 - Installs the public key during a post install function after
   the final rootfs has been created.
 - For NXP platforms, extracts the public key using openssl if
   it does not exist (for backwards compatibility).

Signed-off-by: Hector Palacios <hector.palacios@digi.com>
2023-08-21 09:21:30 +02:00
Javier Viguera d5e33fa947 bluez5: bdaddr: support setting MAC address for NXP's iw612
That's the wifi/bt chip used on the ccimx93.

Signed-off-by: Javier Viguera <javier.viguera@digi.com>
2023-08-17 10:23:00 +02:00
Javier Viguera 787bab09d3 busybox: backport hwclock support to get/set RTC parameters
This allows to set RTC configuration parameters. For example, the rv3028
RTC included in ccmp1 and ccimx93 has the "backup switching mode"
configuration in a register that is saved to an eeprom. By default the
BSM value is 00, which means backup switchover disabled. This means that
even if you connect a coin cell to our DVK, the RTC will ignore it.

With this commit, the BSM can be configured to direct switching mode
(DSM) or level switching mode (LSM) so the RTC uses the battery when the
device is powered off.

Signed-off-by: Javier Viguera <javier.viguera@digi.com>
2023-08-17 10:23:00 +02:00
David Escalona f9396581fd meta-digi-dey: swupdate: add firmware update support based on differences for R/O systems
Implement a new mechanism to allow users to create update packages based on differences for read-only
systems. The update mechanism requires full knowledge of the current software running on the device in order
to compute a sensitive patch. For this reason, only systems without user modifications in the rootfs/boot
partitions are eligible for this kind of updates. At the moment, only the 'rootfs' partition supports the
read-only squashfs file system type, so it is the only partition supporting incremental updates. The 'boot'
partition will still be updated but as a full image.

This new feature is done making use of the SWUpdate 'rdiff' handler, which applies binary deltas with the
functionallity provided by the rsync library. During the update process, the contents of the active 'rootfs'
partition are read as the base and written to the inactive 'rootfs' partition applying the delta binary patch
on-the-fly. To ensure the delta file is applied using the correct base, the firmware update process verifies
the contents of the 'rootfs' base partition before applying the update.

The binary delta file is automatically generated by the DEY build system using the resulting 'rootfs' squashfs
image as target and the user specified file as source. The file is then packaged with the rest of components in
the SWU update image. Users must specify the base source file in their project configuration file using the
new variable 'SWUPDATE_RDIFF_ROOTFS_SOURCE_FILE'. Also, 'read-only-rootfs' image feature should be set in the
project to generate this new SWU update package.

Since a base and a target 'rootfs' partition is required during the update, only 'dualboot' systems can benefit
from this new feature.

Note: If variable 'SWUPDATE_RDIFF_ROOTFS_SOURCE_FILE' is configured in the project but any of 'SWUPDATE_FILES_LIST'
      or 'SWUPDATE_FILES_TARGZ_FILE' variables is also set, the build system will prioritize a SWU update package
      based on files instead of a differences package.

https://onedigi.atlassian.net/browse/DEL-8624

Signed-off-by: David Escalona <david.escalona@digi.com>
2023-08-14 10:59:16 +02:00
David Escalona e65be961cd meta-digi-dey: swupdate: reorganize 'swupdate' custom classes and extensions
We expect new types of SWU update packages to be created in the future. To avoid splitting
all the code in different classes based on the update type, create the generic class
'dey-swupdate' to hold all the custom code and the 'dey-swupdate-common' class to hold all
the required variables. This basically renames the old 'swupdate-files' and 'swupdate-files-common'
classes.

While on it, reorganize the 'swupdate-images' recipe to move variable declarations and
functionallity to the correct place:
  - Move all variable declarations to 'swupdate-digi-common' class and organize them in
    functional groups.
  - Improve the way files are included in the 'SWUPDATE_IMAGES' by using the update type
    variables.
  - Move the update script copy to the 'do_swuimage' prepend function. Until now, the copy
    process was executed in the 'fill_description' method, which should only touch the
    'sw-description' file.
  - Rename some variables to use 'SWUPDATE' prefix.
  - Minor cosmetic changes.

https://onedigi.atlassian.net/browse/DEL-8624

Signed-off-by: David Escalona <david.escalona@digi.com>
2023-08-14 10:36:37 +02:00
David Escalona 3bd1541f09 meta-digi-dey: swupdate: add 'UBIVOL_RDIFFHANDLER' support to MTD based systems
Writing directly into UBI volumes is not allowed, so a special 'rdiff' handler capable of
write data in UBI volumes is required. This commits adds the new handler and enables it in
MTD based systems.

https://onedigi.atlassian.net/browse/DEL-8624

Signed-off-by: David Escalona <david.escalona@digi.com>
2023-08-14 10:35:58 +02:00
David Escalona a203487d8f meta-digi-dey: swupdate: add 'RDIFFHANDLER' support to defconfig
The 'RDIFF' handler allows to apply incremental updates using rdiff delta files in the
swu update package. This functionallity is only recommended for read-only file systems,
where the source partition cannot be modified externally by users.

https://onedigi.atlassian.net/browse/DEL-8624

Signed-off-by: David Escalona <david.escalona@digi.com>
2023-08-14 10:35:38 +02:00
Hector Palacios ae327e8dae trustfence: stm: move generation of PKI out of sign script
Create a new script for the generation of PKI tree for STM platforms
and leave the trustfence-sign-artifact script exclusively for signing.
The new gen-pki script only requires the platform as an argument and the
path to where to save the tree (if it doesn't exist) in
CONFIG_SIGN_KEYS_PATH.

This commit also reverts commit 13c136dbc5 by getting rid of the
trustfence-genpki-native.bb recipe and moving back the PKI generation
functions into trustfence.bbclass. This recipe didn't quite guarantee
that the PKI was generated on time for the recipes that required the
keys to exist, anyway.
Instead, the PKI generation function must be called right after
do_compile() of recipe tf-a-stm32mp to be ready for do_deploy() where
the key is used.

Signed-off-by: Hector Palacios <hector.palacios@digi.com>
2023-08-14 09:19:16 +02:00
Isaac Hermida 3bfcc31563 sound: max98088: update card name
Starting at kernel 6.1, the maxim98088 driver has been migrated
from the old imx-max98088.c driver to NXP’s new audio framework
fsl-asoc-card.c.
Update the sound stuff to match the new audio card and some of
the new controls.

https://onedigi.atlassian.net/browse/DEL-8596

Signed-off-by: Isaac Hermida <isaac.hermida@digi.com>
2023-08-08 10:29:16 +02:00
Javier Viguera e2bbc06fea swupdate: fix non-parallel build
Building swupdate with '-j1' fails with:

swupdate$ make -j1
scripts/kconfig/conf  --silentoldconfig Kconfig
  CC      ipc/network_ipc.o
  CC      ipc/network_ipc-if.o
  CC      ipc/progress_ipc.o
  LD      ipc/built-in.o
  LD      libswupdate.so.0.1
Failed:
aarch64-dey-linux/11.3.0/ld: cannot find ipc-static/lib.a: No such file or directory
collect2: error: ld returned 1 exit status

That's due to trying to link a static library that has not been compiled
yet. That dependence seems spurious and we added it in a patch, so
remove it to fix non-parallel builds.

https://onedigi.atlassian.net/browse/DEL-8445

Signed-off-by: Javier Viguera <javier.viguera@digi.com>
2023-08-04 13:10:56 +02:00
Isaac Hermida bc4aaf2237 ccimx93: bluetooth-init: adjust recipes to btnxpuart driver
The btnxpuart driver uses internally the serial port to manage the chip, and
loads the BT FW independently of the WiFi subsystem.
While on it, add support in the bluetooth-init script to be able to power the
chip when the WiFi support is not present.

https://onedigi.atlassian.net/browse/DEL-8632

Signed-off-by: Isaac Hermida <isaac.hermida@digi.com>
2023-08-01 18:54:00 +02:00
Javier Viguera b804a2c8d8 Revert "sdk: dey-image-webkit: fix creation of dey-image-webkit toolchain"
This reverts commit ef84752539.

Fixed upstream:
https://git.yoctoproject.org/poky/commit/?id=80bf4d4f9ad5013851687e7d81bbeda93351d089

Signed-off-by: Javier Viguera <javier.viguera@digi.com>
2023-07-31 13:56:57 +02:00
Mike Engel e1976ca2fb trustfence: add environment encryption
Signed-off-by: Mike Engel <Mike.Engel@digi.com>
2023-07-28 13:29:51 +02:00
Javier Viguera 19373e38f8 systemd: remove console on virtual terminals
This reuses the same variable from sysvinit (USE_VT) to disable running
getty/login on virtual terminals.

Signed-off-by: Javier Viguera <javier.viguera@digi.com>
2023-07-28 12:40:38 +02:00
Javier Viguera f75c78dd8f swu-images: swu.inc: configure directories needed for fill_description
fill_description copies some artifacts to the images deploy directory,
so that should be created beforehand. Otherwise it may fail on the
'do_unpack' task depending on how bitbake schedules the tasks.

Signed-off-by: Javier Viguera <javier.viguera@digi.com>
2023-07-07 18:01:49 +02:00
David Escalona 94d4bbbe9f meta-digi-dey: swupdate-files: add firmware update support based on files
Implement a new mechanism to allow users to create update packages based on files and folders to modify
the active system.

This is done through the new class 'swupdate-files', which creates a tar.gz update file in the image
distribution output directory containing all the files and directories to create/update. The 'tar.gz'
file is used later by the 'swu-images' recipe to generate the final SWUpdate package. The SWU package
installation process extracts the tar.gz file in the root folder ("/") of the active system.

Users can specify the list of files and directories to include in the update package using the
'SWUPDATE_FILES_LIST' variable. These files will be directly copied from the generated system rootfs and
placed in the tar.gz archive. Additionally, users can provide their custom 'tar.gz' file to use in the update
by specifying its location in the 'SWUPDATE_FILES_TARGZ_FILE' variable. In any case, all the paths to include
in the update package must be relative to "/", as it is the base directory where tar.gz file contents are
extracted.

The update process for dual boot systems sets a new u-boot flag so that active bank is not swapped once
installation is complete and system reboots.

The SWU update mechanism based on files provides a custom update script which takes care of preparing the
system for the installation process. Just like in the SWU updates based on images, users can customize this
script or override it with the 'SWUPDATE_SCRIPT' variable, specifying the location of the new script to use.

If both the 'SWUPDATE_FILES_LIST' and 'SWUPDATE_FILES_TARGZ_FILE' variables are empty, a standard images
SWUpdate package will be generated instead.

Signed-off-by: David Escalona <david.escalona@digi.com>
2023-07-06 11:00:05 +02:00
David Escalona e5392996ed meta-digi-dey: swupdate: enable 'ARCHIVE' handler support to directly install 'tar.gz' files
Signed-off-by: David Escalona <david.escalona@digi.com>
2023-07-06 11:00:05 +02:00
David Escalona 429125cce0 meta-digi-dey: swupdate: clean defconfig file
Make the 'defconfig' file a real defconfig by including only differences with respect default
values. While on it, improve the recipe:

  - Enable 'BOOTLOADERHANDLER' by default in the 'defconfig'. We were unconditionally setting
    this value to 'y' in the recipe, so move it to the default configuration.
  - Move 'UBI' configuration values to 'mtd.cfg' file to be added only when device filesystem is
    MTD based. Until now, 'UBI' support was always added by default.
  - Move the 'SIGNED_IMAGES' configuration entry to a '.cfg' file like we are doing with the rest
    of the functionallity. Use 'oe.utils.conditional' checking 'TRUSTFENCE' feature for this.

Signed-off-by: David Escalona <david.escalona@digi.com>
2023-07-06 11:00:05 +02:00
David Escalona 4395fa1f11 meta-digi-dey: swupdate-images: add SWUpdate script support
Enable scripting support during the installation of system images with SWU. A new shell
script is included by default in all the SWU update packages that will be executed just
before the update starts and just after it finishes. The script is empty and contains two
place-holders that will be called in the two scenarios mentioned before.

Users can customize this script to execute specific actions based on their final product
needs or provide their own one by setting its location in the 'SWUPDATE_SCRIPT' variable.

While on it, rename the 'sw-description_template' file to 'sw-description-images_template'
as it is more accurate with the update mechanism it is used for.

Signed-off-by: David Escalona <david.escalona@digi.com>
2023-07-06 11:00:03 +02:00
Francisco Gil 1e5bd003bd recovery-initramfs: get rid off singlemtdsys variable
This variable is not defined in ccmp1 platforms, making the
swupdate for single mtd failing.

Instead of reading this variable from uboot environment,
determine if the system is multimtd checking the existence
of /dev/ubi1.

Signed-off-by: Francisco Gil <francisco.gilmartinez@digi.com>
2023-07-06 08:18:22 +02:00
Francisco Gil 614c457139 update-firmware: squashsf: modify the logic to include the ro systems
In a squashfs the mount points are different and the current logic
wasn't working.

It's more reliable to check the /proc/cmdline to determine if
the system is a nand or an emmc.

Added also logic to get the active partition in nand devices
when the rootfs is squashfs.

https://onedigi.atlassian.net/browse/DEL-8558

Signed-off-by: Francisco Gil <francisco.gilmartinez@digi.com>
2023-07-03 11:30:33 +02:00
Francisco Gil e395d4a98c sw-update: read-only: modify swu descriptor for squashfs rootfs
When a squashfs image is flashed we need to delete the compression
field in the swupdate descriptor.

Also the rootfstype u-boot variable needs to be set to squashfs.

https://onedigi.atlassian.net/browse/DEL-8558

Signed-off-by: Francisco Gil <francisco.gilmartinez@digi.com>
2023-07-03 11:30:27 +02:00
Isaac Hermida 6feaa6e3c0 ccimx93: bluetooth-init: leave the interface up after attaching
Ensure we leave the Bluetooth interface up after attaching it. If not,
under some circumstances, it could be down.

https://onedigi.atlassian.net/browse/DEL-8608

Signed-off-by: Isaac Hermida <isaac.hermida@digi.com>
2023-06-30 11:04:44 +02:00
Isaac Hermida fbb261d4b8 ethos-u-driver-stack: use ethosu_firmware without debug port
The default ethosu_firmware in github reconfigures the uart2 to be used as
debug port. Those pins are used to manage the HW flow control for the Bluetooth
chip.
Build a custom ethosu_firmware that does not reconfigure the uart2 pins.

Compiled from internal "ethos_u_firmware.git" repository on Stash,
with revision 48a4b9e6a0770212aac529fb7f81ed2e6ff51cbd

md5sum: 0bf8686fcabec7378483755106dc6433

https://onedigi.atlassian.net/browse/DEL-8587

Signed-off-by: Isaac Hermida <isaac.hermida@digi.com>
2023-06-28 11:54:16 +02:00
Javier Viguera 54a0d44df3 onnxruntime: update revision and fix rdepends
Backport changes from NXP's lf-6.1.1-1.0.0 release for the ccimx93.

Signed-off-by: Javier Viguera <javier.viguera@digi.com>
2023-06-26 16:20:30 +02:00
Javier Viguera 4992b9934f ethos-u: backport driver, firmware and vela python tool
From NXP's lf-6.1.1-1.0.0 release for the ccimx93.

Signed-off-by: Javier Viguera <javier.viguera@digi.com>
2023-06-26 16:20:28 +02:00
Javier Viguera 9acc53d948 flatbuffers: update to version 2.0.7
Backport from NXP's lf-6.1.1-1.0.0 release for the ccimx93 (meta-ml
layer).

This version of flatbuffers is needed for ethos-u-vela version 3.6.0
(backported in following commit).

Signed-off-by: Javier Viguera <javier.viguera@digi.com>
2023-06-26 16:19:42 +02:00
Isaac Hermida cbe83df69a packagegroup-imx-ml: add missing packages for imx93
These packages are new from NXP's release (lf-6.1.1_1.0.0).

https://onedigi.atlassian.net/browse/DEL-8137
https://onedigi.atlassian.net/browse/DEL-8563

Signed-off-by: Isaac Hermida <isaac.hermida@digi.com>
Signed-off-by: Javier Viguera <javier.viguera@digi.com>
2023-06-26 16:18:23 +02:00
Isaac Hermida 7e1b8bd65d deepview-rt: fix build error when using tensorflow version 2.10
Update binary package to match backported version of tensorflow-lite.

https://onedigi.atlassian.net/browse/DEL-8137
https://onedigi.atlassian.net/browse/DEL-8563

Signed-off-by: Isaac Hermida <isaac.hermida@digi.com>
Signed-off-by: Javier Viguera <javier.viguera@digi.com>
2023-06-26 16:16:33 +02:00
Isaac Hermida 43ea95739a tensorflow-lite: add support for version 2.10
Backport tensorflow-lite recipes from NXP's lf-6.1.1_1.0.0 release (Langdale based)

https://onedigi.atlassian.net/browse/DEL-8137
https://onedigi.atlassian.net/browse/DEL-8563

Signed-off-by: Isaac Hermida <isaac.hermida@digi.com>
Signed-off-by: Javier Viguera <javier.viguera@digi.com>
2023-06-26 14:48:57 +02:00
Isaac Hermida 4f659d2094 eiq-examples: add eiq tools
Backport EIQ examples recipe from NXP's lf-6.1.1_1.0.0 release (Langdale based)

https://onedigi.atlassian.net/browse/DEL-8137
https://onedigi.atlassian.net/browse/DEL-8563

Signed-off-by: Isaac Hermida <isaac.hermida@digi.com>
2023-06-23 08:43:55 +02:00
David Escalona a04af0cbc1 meta-digi-dey: swu-images: simplify sw-description file
The fact of including both storage types (mtd and mmc) in the same 'sw-description' file is not providing any kind
of benefit. Instead, it makes the file larger, complex and harder to maintain. Additionally, most of the images
entries share the same structure and contents, changing only names and mount points. This commit simplifies the
'sw-description' file by configuring the storage type and the images to include in the SWU package at build
time, using a generic 'sw-description' template and template files for 'mmc' and 'mtd' images.

While on it, use the new 'DEY_FIRMWARE_VERSION' variable for SWU package version and fix the recipe to not include
all 'SRC_URI' files in the SWU update image, but only the required files for the update. Also, make use of variable
substitution provided by SWU class in the 'sw-description' file.

Note: SWU U-Boot update will be broken after this change. Waiting for official support with a robust implementation.

https://onedigi.atlassian.net/browse/DEL-8537
https://onedigi.atlassian.net/browse/DEL-8538

Signed-off-by: David Escalona <david.escalona@digi.com>
2023-06-21 18:23:50 +02:00
David Escalona 96af1bd3de meta-digi-dey: dey-image: add new 'sw-versions' file to track system firmware version
https://onedigi.atlassian.net/browse/DEL-8574
https://onedigi.atlassian.net/browse/DEL-8575

Signed-off-by: David Escalona <david.escalona@digi.com>
2023-06-21 18:23:50 +02:00
David Escalona a3bbd8a56f meta-digi-dey: sysinfo: include the new firmware version variable in the 'sysinfo' report
While on it, rename the old "Firmware" variable to "DEY version", as it refers explicity to the DEY
distribution version.

https://onedigi.atlassian.net/browse/DEL-8539

Signed-off-by: David Escalona <david.escalona@digi.com>
2023-06-21 18:23:50 +02:00
David Escalona ce14f12ac5 meta-digi-dey: fw_version: add new variable to store global system firmware version
https://onedigi.atlassian.net/browse/DEL-8539

Signed-off-by: David Escalona <david.escalona@digi.com>
2023-06-21 18:23:50 +02:00
Tatiana Leon 6e30a8127e cloudconnector: set 'MACHINE' as the default device type
If 'CC_DEVICE_TYPE' is not defined or it is empty use 'MACHINE' as the device
type in the Cloud Connector configuration file.

This commit also limits its length to a maximum of 255 characters.

https://onedigi.atlassian.net/browse/DEL-8531

Signed-off-by: Tatiana Leon <Tatiana.Leon@digi.com>
2023-06-21 16:57:27 +02:00
Mike Engel 33bad0022e qtmultimedia: add QT environment variable for camera support
Signed-off-by: Mike Engel <Mike.Engel@digi.com>
2023-06-06 16:06:00 +02:00
Mike Engel d4c8c2ba31 qtbase: change profile script for QT6
Signed-off-by: Mike Engel <Mike.Engel@digi.com>
2023-06-06 16:06:00 +02:00
Francisco Gil 3d3ba69b08 update-firmware: squashsf: modify the logic to include the ro systems
In a squashfs the mount points are different and the current logic
wasn't working.

It's more reliable to check the /proc/cmdline to determine if
the system is a nand or an emmc.

Added also logic to get the active partition in nand devices
when the rootfs is squashfs.

https://onedigi.atlassian.net/browse/DEL-8558

Signed-off-by: Francisco Gil <francisco.gilmartinez@digi.com>
2023-06-06 13:04:21 +02:00
Francisco Gil 6a70b52356 sw-update: read-only: modify swu descriptor for squashfs rootfs
When a squashfs image is flashed we need to delete the compression
field in the swupdate descriptor.

Also the rootfstype u-boot variable needs to be set to squashfs.

https://onedigi.atlassian.net/browse/DEL-8558

Signed-off-by: Francisco Gil <francisco.gilmartinez@digi.com>
2023-06-06 13:04:21 +02:00
Gabriel Valcazar 26798cfb93 imx-gpu-viv: avoid pulling in kernel-module-imx-gpu-viv
We used to use BAD_RECOMMENDATIONS to remove this package in ccimx6 builds,
we enable the imx-gpu-viv driver as built-in in our kernel, but this method
isn't working anymore. Instead, undo the specific RRECOMMENDS that pulls the
module in.

Apply the change for the aarch32 version of the package only, since this change
is only needed for the ccimx6 platforms.

https://onedigi.atlassian.net/browse/DEL-8540

Signed-off-by: Gabriel Valcazar <gabriel.valcazar@digi.com>
2023-06-06 10:26:41 +02:00
Arturo Buzarra bb8cd7e954 meta-digi-dey: bump distro version to 4.0-r4
Signed-off-by: Arturo Buzarra <arturo.buzarra@digi.com>
2023-06-02 12:31:18 +02:00
Javier Viguera eecc3cf6c1 systemd-conf: configure KEY_POWER events on ccimx93
To support suspend/resume and software controlled poweroff.

Signed-off-by: Javier Viguera <javier.viguera@digi.com>
2023-05-26 14:04:02 +02:00