Commit Graph

4487 Commits

Author SHA1 Message Date
Arturo Buzarra 62fa660d05 Merge branch 'dey-4.0/master' into dey-4.0/maint
Signed-off-by: Arturo Buzarra <arturo.buzarra@digi.com>
2024-01-19 11:46:55 +01:00
David Escalona 2ecaf1ca55 swupdate: add support to update U-Boot in the redundant partition
The support to update U-Boot in the redundant partition must be enabled in the project
configuration file by setting the variable "SWUPDATE_UBOOTIMG_REDUNDANT" to "true":

SWUPDATE_UBOOTIMG_REDUNDANT = "true"

This feature is only available for the newer platforms: ccmp13, ccmp15 and ccimx93. Trying to
enable it in older platforms will display a warning and fallback to non-redundant update.

Signed-off-by: David Escalona <david.escalona@digi.com>
2024-01-19 10:33:44 +01:00
Javier Viguera 9348d94d22 ccimx93: update multimedia package for NXP release lf-6.1.55-2.2.0
Backport of multimedia package for ccimx93 from NXP's Mickledore-based
lf-6.1.55-2.2.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.

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

Signed-off-by: Javier Viguera <javier.viguera@digi.com>
2024-01-18 09:46:32 +01:00
Javier Viguera 5d74f18c2e imx-gst1.0-plugin: restrict patches to ccimx6ul
The JIRA in the patch description describes a problem in the CC6UL, so
do not use the patches on other platforms.

Signed-off-by: Javier Viguera <javier.viguera@digi.com>
2024-01-18 09:46:31 +01:00
Tatiana Leon 721039df6b cccs: add CCCS_CONF_PATH variable to define custom cccs configuration file
If 'CCCS_CONF_PATH' is defined, the specified file is installed as CCCS
configuration file without any modification.
It it is not defined or it is empty, the configuration file in cc_dey
('cc_dey/cccs-daemon/cfg_files/cccs.conf') is installed and modified if
required.

Signed-off-by: Tatiana Leon <Tatiana.Leon@digi.com>
2024-01-17 18:51:56 +01:00
Isaac Hermida efb80f3806 cc93: standby: decople bluetooth from WiFi actions
Do not make conditional the bluetooth actions on WiFi, as they can be
treated independently.

Signed-off-by: Isaac Hermida <isaac.hermida@digi.com>
2024-01-17 10:51:28 +01:00
Javier Viguera 65750ce196 ccimx93: move environment to the end of the bootX partitions
libubootenv treats negative offsets as backwards offset from the end of
the block device, so use that to move the environment to the last 16KiB
of the hardware boot partitions.

https://onedigi.atlassian.net/browse/DUB-1064

Signed-off-by: Javier Viguera <javier.viguera@digi.com>
2024-01-16 18:30:55 +01:00
David Escalona 6d898e51f9 swupdate: rework script to update U-Boot in NAND devices
Rework the script so that it has a similar structure as the MMC leaving it ready
to integrate new platforms.

Signed-off-by: David Escalona <david.escalona@digi.com>
2024-01-16 17:55:17 +01:00
David Escalona e25f3e4f5f swupdate: ccmp1: remove not required 'upgrade_available' U-Boot variable from tempalte
This variable is only required to enable the bootcount feature after an update when the bootcount value is
stored in the environment. This only happens in the CCIMX6 products, so it makes no sense to use it for the
CCMP1 devices.

Signed-off-by: David Escalona <david.escalona@digi.com>
2024-01-16 17:55:17 +01:00
David Escalona 10b22aea64 swupdate: add support to update U-Boot to boot1 partition in mmc devices
While on it, enable support to update encrypted U-Boot for all mmc platforms
supporting it. The install script extracts the DEK blob from the installed
U-Boot and appends it to the new U-Boot before flashing it.

Signed-off-by: David Escalona <david.escalona@digi.com>
2024-01-16 17:55:17 +01:00
David Escalona 76e2672b22 ccmp1: fix platform 'UBOOT_PREFIX' variable
Signed-off-by: David Escalona <david.escalona@digi.com>
2024-01-16 17:55:17 +01:00
David Escalona a0bc831353 meta-digi-arm: machine: add new 'BOOTLOADER_SEEK_BOOTPART' variable to platform configurations
This new variable establishes the number of 1Kb blocks to skip before writing U-Boot in the
bootloader partition.

Signed-off-by: David Escalona <david.escalona@digi.com>
2024-01-16 17:55:17 +01:00
David Escalona bf365df07a imx-boot: generate symlinks for trustfence artifacts
Signed-off-by: David Escalona <david.escalona@digi.com>
2024-01-16 17:55:17 +01:00
Arturo Buzarra ba1e3b8328 qt5: ccmp1: add support for EGLFS backend
EGLFS is a platform plugin for running single Qt applications in full-screen
mode, without a windowing system like X11 or Wayland.

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

Signed-off-by: Arturo Buzarra <arturo.buzarra@digi.com>
2024-01-16 13:32:46 +01:00
Francisco Gil 0817a4de93 cccs: dualboot: set by default on the fly to true
To work in a dualboot memory layout out of the box, the most
common use case of the firmware update through the cloud should
be on the fly because in nand platforms there is not enough
memory to keep the update file in the system.

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

Signed-off-by: Francisco Gil <francisco.gilmartinez@digi.com>
2024-01-15 11:42:35 +01:00
Javier Viguera 2c2c6e3896 ccimx93: remove A0 SOC revision overlay
With the update of the ethos-u firmware for the NPU in previous commit,
this overlay is no longer required.

Signed-off-by: Javier Viguera <javier.viguera@digi.com>
2024-01-12 13:11:19 +01:00
Isaac Hermida 02d1523591 ccimx93: update ML/AI packages for NXP release 6.1.55-2.2.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: bd5506ddba364ad04602d5009b77077f78450b97
Source: NXP's MCUXpresso SDK_2.14.2_MIMX9352xxxxM

Co-authored-by: Javier Viguera <javier.viguera@digi.com>

Signed-off-by: Isaac Hermida <isaac.hermida@digi.com>
Signed-off-by: Javier Viguera <javier.viguera@digi.com>
2024-01-12 12:09:21 +01:00
Javier Viguera 952edde975 meta-digi: update cmake-native to version 3.25
Backport a new version of cmake-native from Poky's mickledore release. This
is required by the new version of the onnxruntime package (updated in
the following commit).

Signed-off-by: Javier Viguera <javier.viguera@digi.com>
2024-01-12 12:09:21 +01:00
Gabriel Valcazar fdd8026d30 python3-connectcore-ble: update to v1.0.6
Set the PV variable to keep track of the currently used version.

Signed-off-by: Gabriel Valcazar <gabriel.valcazar@digi.com>
2024-01-11 18:14:04 +01:00
Gabriel Valcazar 3305d78ec1 python3-xbee: update to most recent available version
Set the PV variable to keep track of the currently used version.

Signed-off-by: Gabriel Valcazar <gabriel.valcazar@digi.com>
2024-01-11 18:14:04 +01:00
Gabriel Valcazar e954bd1e6d lvgl-demo: build from our github fork instead of patching the original repo
Our fork contains the same patches that were originally applied in this recipe.
This makes it easier for customers to identify the modifications necessary to
get LVGL working on our platforms.

Signed-off-by: Gabriel Valcazar <gabriel.valcazar@digi.com>
2024-01-11 12:14:56 +01:00
Mike Engel 70b65c121d libubootenv: fix HWID dump on Linux console when using fw_printenv
https://onedigi.atlassian.net/browse/DEL-8822

Signed-off-by: Mike Engel <Mike.Engel@digi.com>
2024-01-11 12:01:49 +01:00
Hector Palacios bf1eeabbf5 cc93: standby: add a small delay before resuming Wi-Fi
When switching off the 3.3V supply from the Wi-Fi during suspend,
around a 10% of the times, when resuming the Wi-Fi driver fails to load.

It was verified that a rebind operation over the mmc interface (which
eventually calls the script that loads the Wi-Fi module) makes it
load successfully, which denotes a timing issue during resume.

Adding a small delay on the resume operation before running the script
makes the Wi-Fi driver load at the first try.

Signed-off-by: Hector Palacios <hector.palacios@digi.com>

https://onedigi.atlassian.net/browse/DEL-8821
2024-01-10 13:15:12 +01:00
Hector Palacios 9248c9ab79 cc93 wlan: fix the check for Wi-Fi module correctly loaded
The result of the modprobe operation doesn't guarantee the driver loaded
correctly. The module may succeed and be loaded, but failures during the
probe may not propagate and result in an error of modprobe.
The valid condition is to check the existence of the interface in
/sys/class/net/wlan0.

Signed-off-by: Hector Palacios <hector.palacios@digi.com>

https://onedigi.atlassian.net/browse/DEL-8821
2024-01-10 09:34:57 +01:00
Francisco Gil 0aa5003267 read only: fix problem when mounting external devices
In commit a84d011 this was fixed for mount_digiparts.sh, but
was missing the fix in the mount.sh script.

In that commit there is a full explanation about why this
solves the issue.

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

Signed-off-by: Francisco Gil <francisco.gilmartinez@digi.com>
2024-01-09 16:36:20 +01:00
Francisco Gil 0cba27a016 udev: mount only media devices with filesystem on them
With this new rule, only the medias that contain a filesystem
on them are mounted, filtering several calls to mount.sh.

I have checked that this change doesn't increase the boot time
at all.

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

Signed-off-by: Francisco Gil <francisco.gilmartinez@digi.com>
2024-01-08 16:43:26 +01:00
Javier Viguera 4d8be061f0 ccimx93: update graphics package for NXP release lf-6.1.55-2.2.0
Backport of graphics package for ccimx93 from NXP's Mickledore-based
lf-6.1.55-2.2.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.

Signed-off-by: Javier Viguera <javier.viguera@digi.com>
2024-01-08 16:39:01 +01:00
Javier Viguera 46550c51cf ccimx93: remove MCA support as it's not populated
Signed-off-by: Javier Viguera <javier.viguera@digi.com>
2024-01-08 16:26:44 +01:00
Hector Bujanda 40802dff3d ccmp15: remove MCA entries as it will never be populated
Signed-off-by: Hector Bujanda <hector.bujanda@digi.com>
2024-01-08 13:24:10 +01:00
Gabriel Valcazar 214acb335d trustfence-initramfs: remove openssl-ossl-module-legacy
We removed this package from the recovery initramfs, but it was getting added
as a recommendation to the trustfence initramfs as well.

Signed-off-by: Gabriel Valcazar <gabriel.valcazar@digi.com>
2024-01-05 14:24:17 +01:00
Gabriel Valcazar 4e86570976 cryptsetup: remove udev packageconfig to prevent unwanted packages in intramfs
We use cryptsetup in both the recovery and trustfence initramfs to handle block
device encryption on platforms that use eMMC as the internal storage. In
meta-openembedded commit 1ce71d6ec31195280073adec0e400dda7c0dd8a7 (between
DEY 2.6 and 3.0), a lot of PACKAGECONFIG options were added to the cryptsetup
recipe, all of them enabled by default. One of these options is "udev", which
adds a runtime dependency with udev that in turn pulls in a lot of other
dependencies with it. This is unnecessary because we already use mdev in our
recovery image, and the other packages simply take up space as they aren't
needed at all.

Our eMMC partition encryption functionality, which is the reason why we need
cryptsetup to begin with, is unaffected by this change and still works as
expected. Keep in mind that it was working properly without udev in DEY 2.6 and
older DEY releases, so removing udev isn't an issue.

Remove this PACKAGECONFIG option to get rid of udev and its dependencies in
the recovery and trustfence initramfs.

Signed-off-by: Gabriel Valcazar <gabriel.valcazar@digi.com>
2024-01-05 14:24:17 +01:00
Gabriel Valcazar ba3f3481aa libcap: prevent linking against libpam
In theory, libcap's pam_cap module should use libpam's dlopen runtime linking
mechanism, but starting in libcap 2.53, this changed in order to support
distros that can only link it at build-time. Then, in 2.54, a compile-time
option was added (FORCELINKPAM) to allow users to force the link or not. In the
poky recipe for libcap, this option isn't set, so the library was getting
linked by default, dragging all of its dependencies with it.

For more info: https://bugzilla.kernel.org/show_bug.cgi?id=214023

Set the flag to "no" to avoid linking against libpam, removing its dependency
from the recovery image and saving some space.

Signed-off-by: Gabriel Valcazar <gabriel.valcazar@digi.com>
2024-01-05 14:24:12 +01:00
Hector Palacios efd5f898d8 ccmp1: move definition of TF-A and OP-TEE suffixes to platform
The TF-A and OP-TEE images have different suffixes depending
on whether TrustFence is enabled or not, but the suffix variables
themselves must exist independently of whether TF is enabled.
Currently, they were defined on the trustfence.bbclass, and the
variables did not exist when TF was disabled, which caused build
problems, for example, building the SWU file.

Signed-off-by: Hector Palacios <hector.palacios@digi.com>
2024-01-04 16:56:06 +01:00
Gabriel Valcazar 604dcbc20f ccimx6ul/ccmp1: compress recovery UBIFS image using zlib to reduce its size
This compression method has a better compression ratio than the default (lzo),
but the (de)compression speed is slower, leading to slower read/write speeds.
However, the recovery partition only gets accessed in specific use cases such
as software updates and partition encryption, and it contains an initramfs. The
UBIFS will only be read at boot time to load its elements, but once the
initramfs is loaded in RAM, there are no more read/write operations to the
UBIFS during runtime, so the speed penalty is minimal.

Take advantage of the improved compression ratio to reduce the size of the
recovery image. On the ccimx6ul, the size is reduced by 248 KiB.

https://onedigi.atlassian.net/browse/DEL-8819
https://onedigi.atlassian.net/browse/DEL-8825

Signed-off-by: Gabriel Valcazar <gabriel.valcazar@digi.com>
2024-01-04 11:24:20 +01:00
Gabriel Valcazar 82a96801de Remove "wipe" from recovery and trustfence initramfs
This package is purely vestigial and hasn't been used at all in any of our
initramfs images for over 7 years. It was used in the first implementation
of the trustfence initramfs (commit 4dd7d438af)
to securely erase the key used by cryptsetup, but two weeks later, that logic
was moved to trustfence-tool (commit a8c50c16ea)
and "wipe" was no longer needed. However, the package remained in the
dependencies of the trustfence initramfs, which were then used as reference for
the recovery initramfs, even though this initramfs didn't even need "wipe" to
begin with.

Removing this package saves 30.8 KiB in the ccimx6ul recovery image.

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

Signed-off-by: Gabriel Valcazar <gabriel.valcazar@digi.com>
2024-01-04 11:24:20 +01:00
Gabriel Valcazar a0309c2a39 recovery-initramfs: remove openssl-ossl-module-legacy from recovery image
This is added as a recommendation for libcrypto and only contains legacy
ciphers which are deemed outdated or unsafe. If any of the packages in the
image actually required this module, they would depend on it explicitly, but
this isn't the case. This saves 66.8 KiB on the ccimx6ul recovery image.

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

Signed-off-by: Gabriel Valcazar <gabriel.valcazar@digi.com>
2024-01-04 11:24:20 +01:00
Gabriel Valcazar 215ab5fedf libarchive: remove more unneeded packageconfigs to reduce recovery image size
We depend on libarchive so that swupdate can perform updates with .tar.gz
files, but by default, libarchive is configured to support a lot of additional
features that pull in even more dependencies. This increases the size of the
recovery image, which barely fits on platforms with limited internal storage
like the ccimx6ul. We already removed zstd support to mitigate this, but the
image size increased again after adding imx-kobs to it in commit
aa2480d1de.

Since libarchive isn't used by any other package in our system, remove the
configurations that bloat the recovery image and are not needed at all for
our file update use case. Note that removing the "lzo" packageconfig doesn't
remove its respective library from the image because mtd-utils also depends on
it, but it still reduces the size of libarchive. On the ccimx6ul, this removes
193 KiB worth of libraries and trims libarchive down by 20.5 KiB in the
recovery image.

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

Signed-off-by: Gabriel Valcazar <gabriel.valcazar@digi.com>
2024-01-04 11:24:20 +01:00
Hector Palacios cef235f61d swu: add sha256 to SWUPDATE_SCRIPT_NAME
These fields were added to default files, but not to the
special sw-description files for ccmp1 and cc6ul platforms.

Signed-off-by: Hector Palacios <hector.palacios@digi.com>
2024-01-03 13:05:05 +01:00
Mike Engel 0cd1c33a7b trustfence: use signed images suffixes for ccmp1 boot artifacts
When TrustFence is enabled, the boot artifacts (TFA and FIP)
have a 'signed' suffix. Handle this case so that the correct
symlinks are created and the correct artifacts are put into the
SWU file.

Signed-off-by: Mike Engel <Mike.Engel@digi.com>
Signed-off-by: Hector Palacios <hector.palacios@digi.com>
2024-01-03 13:05:05 +01:00
Hector Palacios 4f33afcbcf trustfence: split ccmp13 passwords in 8 files and set SWUPDATE keys
For signing SWU files we need to set a couple of variables:
 - SWUPDATE_PRIVATE_KEY_TEMPLATE to the private key file
 - SWUPDATE_PASSWORD_FILE to the password of the private key

The latter must only contain one password, whereas the current key_pass.txt
file had (for the ccmp13) the eight keys separated by a white space.

This commit:
 - If the file key_pass.txt exists, it extracts each key into a separate
   file key_pass0X.txt.
 - If the keys don't exist, generates separate files per key.
 - Changes the permissions of password files to 400.
 - Adapts the sign script to use the single password files.
 - Fixes a few quotes

Signed-off-by: Hector Palacios <hector.palacios@digi.com>
2024-01-03 13:05:05 +01:00
Javier Viguera 161c66f5f6 ccimx93: support building bootloader for soc revision A0
Starting with NXP release "lf-6.1.55-2.2.0" the IMX optee fork (based on
version 4.0.0) does not support SOC revision A0. This commit recovers
support to build a bootloader for A0, extending the optee patch for
ccimx93 to support A0 with a build time option, and then extending the
optee-os and imx-boot recipes to build two optee binaries and using them
to generate bootloaders for both SOC revisions.

Signed-off-by: Javier Viguera <javier.viguera@digi.com>
2024-01-03 12:00:07 +01:00
Javier Viguera e4d089a6ab optee: update to NXP's lf-6.1.55-2.2.0 release for ccimx93
Signed-off-by: Javier Viguera <javier.viguera@digi.com>
2024-01-03 12:00:07 +01:00
Javier Viguera 4566b10751 imx-boot, imx-mkimage: update to NXP's lf-6.1.55-2.2.0 release for ccimx93
Signed-off-by: Javier Viguera <javier.viguera@digi.com>
2024-01-03 12:00:07 +01:00
Javier Viguera 9eefe05979 imx-atf: update to NXP's lf-6.1.55-2.2.0 release for ccimx93
Signed-off-by: Javier Viguera <javier.viguera@digi.com>
2024-01-03 12:00:07 +01:00
Javier Viguera 20809e6cbf imx-boot-firmware: update to NXP's lf-6.1.55-2.2.0 release for ccimx93
This includes also an update and rename of the Edgelock Enclave firmware
package (firmware-ele-imx).

Signed-off-by: Javier Viguera <javier.viguera@digi.com>
2024-01-03 12:00:07 +01:00
Gabriel Valcazar 32e46e4f9b swupdate: change runtime config file suffix to avoid build-time config errors
We were using the .cfg suffix for both the build-time config fragments and the
runtime configuration file. During do_configure(), all files in SRC_URI ending
in .cfg were being merged together to create the final build configuration,
including said runtime file, which has a completely different syntax. In most
cases, the contents of this file were being ignored, but when tweaking
swupdate's configuration and re-building the package, sometimes strange errors
would prevent the build from finishing.

Change the runtime file's suffix entirely to separate it from the config
fragments and prevent it from being treated as such, and reflect the name
change in the defconfig and the recovery script.

Signed-off-by: Gabriel Valcazar <gabriel.valcazar@digi.com>
2024-01-02 11:14:23 +01:00
Hector Bujanda e02108dce5 ccmp15: add DT overlay for Cortex-M4 RemoteProc
https://onedigi.atlassian.net/browse/DEL-8823

Signed-off-by: Hector Bujanda <hector.bujanda@digi.com>
2023-12-29 11:42:48 +01:00
Gabriel Valcazar b6c453a8c1 dey.conf: continue using stable versions of swupdate and libubootenv
meta-swupdate recently added support for swupdate 2023.12 and libubootenv
0.3.5. This upgrade conflicts with our custom functionality in both packages,
so keep using 2023.05 and 0.3.2 respectively so DEY 4.0 can be built without
introducing possible functionality changes.

Signed-off-by: Gabriel Valcazar <gabriel.valcazar@digi.com>
2023-12-26 17:32:43 +01:00
Gabriel Valcazar a22d21ab84 dey.conf: continue using stable versions of swupdate and libubootenv
meta-swupdate recently added support for swupdate 2023.12 and libubootenv
0.3.5. This upgrade conflicts with our custom functionality in both packages,
so keep using 2023.05 and 0.3.2 respectively so DEY 4.0 can be built without
introducing possible functionality changes.

Signed-off-by: Gabriel Valcazar <gabriel.valcazar@digi.com>
2023-12-26 17:31:41 +01:00
Isaac Hermida 925b618e63 linux-dey: update to NXP's lf-6.1.55-2.2.0 release for ccimx93
Signed-off-by: Isaac Hermida <isaac.hermida@digi.com>
2023-12-21 17:57:16 +01:00