Commit Graph

4788 Commits

Author SHA1 Message Date
Hector Palacios 9ef54b7b8e optee-os-stm32mp: use OTP HUK when TrustFence enabled
When TrustFence is enabled, use the HUK programmed on the OTP
bits for the ccmp15 platform.

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

https://onedigi.atlassian.net/browse/DEL-9121
2024-07-16 08:09:56 +02:00
Isaac Hermida 0c642ed7ec Update Digi Copyright header
Standarize the Copyright header according to company policy.

Signed-off-by: Isaac Hermida <isaac.hermida@digi.com>
2024-07-15 09:28:58 +02:00
Francisco Gil bbb94ced74 docker: add missing config entry in STM platform for docker
Also some duplicated entries were removed.

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

Signed-off-by: Francisco Gil <francisco.gilmartinez@digi.com>
2024-07-09 11:45:29 +02:00
Isaac Hermida d439abd0d4 alsa: do not restore UCM profiles
There is a harmless error when restoring alsa profiles, as it also
attempts to restore UCM profiles.
Since we do not include UCM profiles for our sound cards, skip it.

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

Signed-off-by: Isaac Hermida <isaac.hermida@digi.com>
2024-07-05 13:02:40 +02:00
Francisco Gil ee26f14423 meta-digi: revert revisions to AUTOREV
Signed-off-by: Francisco Gil <francisco.gilmartinez@digi.com>
2024-07-02 12:06:59 +02:00
Francisco Gil 35cf4d61bc meta-digi: update revisions for dey-4.0-r6.1
Signed-off-by: Francisco Gil <francisco.gilmartinez@digi.com>
2024-07-02 10:19:59 +02:00
Francisco Gil 933a87483c README: dey-4.0-r6 release notes
https://onedigi.atlassian.net/browse/DEL-9077

Signed-off-by: Francisco Gil <francisco.gilmartinez@digi.com>
2024-07-02 08:35:47 +02:00
Gabriel Valcazar 85e59417a3 recovery: prevent partition encryption when singlemtdsys is enabled
In legacy NAND platforms like the ccimx6ul, it's possible to use a single-MTD
configuration with dualboot disabled, which allows access to the functionality
provided by the recovery partition. However, the partition encryption feature
requires a multi-MTD configuation, so said feature shouldn't be accessible in
this case.

Prevent access to partition encryption in a single-MTD system by:

    * Adding the "system" partition to the partition blacklist in both the
      recovery-utils library and the recovery initscript.
    * Checking the "singlemtdsys" environment variable before using any
      functionality related to partition encryption.

Signed-off-by: Gabriel Valcazar <gabriel.valcazar@digi.com>
2024-07-01 13:27:38 +02:00
Gabriel Valcazar 5695cf15db recovery-initramfs-init: fix "update" volume wipe when singlemtdsys is enabled
Currently, when wiping the update volume via the recovery partition on a
ccimx6ul with singlemtdsys enabled, the procedure fails with this error:

    [RECOVERY] Starting recovery...
    [RECOVERY] Wipe 'update' partition requested
    [RECOVERY] Formatting 'update' ubi volume
    ubi0 error: ubi_open_volume.part.0: cannot open device 0, volume 3, error -16
    ubiupdatevol: error!: cannot open "/dev/ubi0_3"
                  error 16 (Device or resource busy)

This is because the logic used to unmount a volume before formatting it is
expecting this entry format when running "mount":

    ubi0:update on /mnt/update type ubifs

While this is the format of the "mount" output in userspace for the rootfs
volume, other trivial volumes have this format instead:

    ubi0_3 on /mnt/update type ubifs

Adapt the logic to this format so that the "update" volume wipe procedure can
take place.

Signed-off-by: Gabriel Valcazar <gabriel.valcazar@digi.com>
2024-06-28 13:07:11 +02:00
Javier Viguera 17658bdffa Merge branch 'dey-4.0/master' into dey-4.0/maint
Merges Trustfence file-based encryption support.

Signed-off-by: Javier Viguera <javier.viguera@digi.com>
2024-06-28 12:14:26 +02:00
Gabriel Valcazar 8fad761961 ccimx6ul: install_linux_fw_uuu.sh: increase timeouts to account for large NANDs
When running the installation script on variants with larger NANDs, two of the
script's commands take longer than our intended timeouts under specific
circumstances:

    * When the variant has a NAND with 512 MiB or more and singlemtdsys is set
      to "yes", running ubivolscipt takes longer than our 10 second timeout.
      The larger the NAND storage size, the longer this command takes.
    * When the variant has a 1 GiB NAND, singlemtdsys is set to "yes" and
      dualboot is set to "no", the update of the recovery UBI volume takes
      longer than our 15 second timeout.

In both of these cases, the script fails and the installation process cannot
continue. Apply the following changes to prevent this:

    * Increase the ubivolscript timeout from 10 seconds to 30
    * Increase the recovery update timeout from 15 seconds to 20

Also, remove the command immediately before ubivolscript is run, since said
command is already being run at the beginning of ubivolscript.

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

Signed-off-by: Gabriel Valcazar <gabriel.valcazar@digi.com>
2024-06-27 17:48:10 +02:00
Javier Viguera ac23714967 optee-client: change secure storage path when TF is enabled
By default, the secure storage path in the REE is "/var/lib/tee". It is
part of the rootfs, and thus, it gets lost on a firmware update.

This commit changes that path to a different partition "/mnt/data/tee"
when Trustfence file-based encryption is enabled.

Signed-off-by: Javier Viguera <javier.viguera@digi.com>
2024-06-27 15:41:00 +02:00
Javier Viguera 3c1f32f09a optee-os: add SDK environment script to build trusted applications
Building Optee trusted applications (TA) depends on optee_client and the TA
devkit provided by optee_os. Our toolchain provides those dependencies, but
the SDK script which configures the environment for standalone building,
is not configuring some variables needed to build trusted applications.

This commit extends the SDK environment script to allow building TAs.

Signed-off-by: Javier Viguera <javier.viguera@digi.com>
2024-06-27 15:41:00 +02:00
Mike Engel 8a2a1beb08 fscrypt: include trustfence-fscrypt tool into rootfs
Add also 'e2fsprogs-tune2fs' to the image, as busybox's version of
tune2fs command does not support setting the "encrypt" feature of the
EXT4 filesystem.

Signed-off-by: Mike Engel <Mike.Engel@digi.com>
Signed-off-by: Javier Viguera <javier.viguera@digi.com>
2024-06-27 15:39:49 +02:00
Isaac Hermida fbe6481cd3 kernel-module-qualcomm: add lock file to avoid endless call to script in failure
Add a lock file to avoid to call the file continuously if the initial probe
failed.

Signed-off-by: Isaac Hermida <isaac.hermida@digi.com>
2024-06-27 11:18:11 +02:00
Isaac Hermida b4f48a6361 kernel-module-nxp-wlan: rebind mmc node if wlan load failed
Occassionally, the loading the WiFi driver might fail, because of the
MMC node was not correctly initialized.
Fix that by rebinding the MMC node. This fix implements a similar workaround
as in c30b947408.

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

Signed-off-by: Isaac Hermida <isaac.hermida@digi.com>
2024-06-27 11:18:11 +02:00
Gabriel Valcazar e0be8c3a1f ccimx6qpsbc: add missing "if" condition terminator in UUU install script
One of the conditions used to determine the U-Boot file was missing its
terminator, breaking the script.

Signed-off-by: Gabriel Valcazar <gabriel.valcazar@digi.com>
(cherry picked from commit 26dc437a25)
2024-06-26 12:16:22 +02:00
Hector Palacios f55c084064 libubootenv: flush changes to fw_env.config on post inst script
On devices with NAND as storage media, a post install script
modifies the fw_env.config file basing on the NAND geometry.
This only happens once after deployment, typically on production
environments. If the power is removed soon after the post install
script runs (which is a normal procedure on manufacturing
environments), there are chances that pending file system
operations have not been flushed, which may occasionally lead
to the fw_env.config file end up empty on the next reboot.

This commit adds a sync at the end of the post-install script
to guarantee the changes are written to the file system.

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

https://onedigi.atlassian.net/browse/DEL-9059
2024-06-26 11:25:23 +02:00
Gonzalo Ruiz 731bee3498 ccimx93-dvk: rename overlay for DLC0200CCP04DF-2 MIPI display
Signed-off-by: Gonzalo Ruiz <Gonzalo.Ruiz@digi.com>
2024-06-24 12:29:19 +02:00
Gonzalo Ruiz dead98301b ccimx93-dvk: add overlay for NHD-3.5-640480EF-MSXP MIPI display
https://onedigi.atlassian.net/browse/DEL-9036

Signed-off-by: Gonzalo Ruiz <Gonzalo.Ruiz@digi.com>
2024-06-24 12:25:15 +02:00
Javier Viguera 18c0c69314 Merge branch 'dey-4.0/master' into dey-4.0/maint
Signed-off-by: Javier Viguera <javier.viguera@digi.com>
2024-06-21 14:44:59 +02:00
Mike Engel 994906d1de linux: add kernel fragment to enable File system encryption support
https://onedigi.atlassian.net/browse/DEL-8944

Signed-off-by: Mike Engel <Mike.Engel@digi.com>
2024-06-18 14:31:18 +02:00
Javier Viguera 0e23efb9b1 trustfence: add variables for file-based encryption
On new platforms, trustfence will use file-based encryption instead of
full-disk encryption. Add base variables and platform defaults to allow
implementing file-based encryption.

Signed-off-by: Javier Viguera <javier.viguera@digi.com>
2024-06-18 14:19:21 +02:00
Javier Viguera 11ee0251d0 trustfence: ccimx93: disable boot artifacts encryption by default
Encrypting boot artifacts impacts the device's boot time, so disable them
by default. It is still possible to enable it in the project's config
file by setting the TRUSTFENCE_DEK_PATH option.

Signed-off-by: Javier Viguera <javier.viguera@digi.com>
2024-06-18 14:03:16 +02:00
Francisco Gil 7e493b74ae install script: enable trustfence if -k is selected
Also use the name DEK_FILE for all the files.

Signed-off-by: Francisco Gil <francisco.gilmartinez@digi.com>
2024-06-18 11:56:44 +02:00
Francisco Gil 828f5da09b install script: allow -k parameter to be used without arguments
There is a corner case that wasn't cover by the script, if you
use the script using a -k -t the "-t" would be the name of the
dek.bin.

This new implementation solves the issue.

Signed-off-by: Francisco Gil <francisco.gilmartinez@digi.com>
2024-06-18 11:56:44 +02:00
Francisco Gil d86648f791 install scripts: capitalize F from TrustFence
Signed-off-by: Francisco Gil <francisco.gilmartinez@digi.com>
2024-06-18 11:56:44 +02:00
Francisco Gil 85b0895297 install script: remove extra "-" in not signed/encrypted images
By default is trying to install an artifact imx-boot--<platform>
if trustfence is not enabled.

Signed-off-by: Francisco Gil <francisco.gilmartinez@digi.com>
2024-06-18 11:56:44 +02:00
Francisco Gil 87ec014630 ccmp1X: uuu: add support to flash trustfence artifacts
https://onedigi.atlassian.net/browse/DEL-9058

Signed-off-by: Francisco Gil <francisco.gilmartinez@digi.com>
2024-06-18 11:56:44 +02:00
Francisco Gil 86b97c888a ccimx93: uuu: add support to flash trustfence artifacts
https://onedigi.atlassian.net/browse/DEL-9058

Signed-off-by: Francisco Gil <francisco.gilmartinez@digi.com>
2024-06-18 11:56:44 +02:00
Francisco Gil 0a5274e06f firmware installation scripts: correct usage of u-boot variables
Some variables in the script belong to u-boot, not to the shell
running the script. Escape those variables so the shell does not
expand them.

Signed-off-by: Francisco Gil <francisco.gilmartinez@digi.com>
2024-06-18 11:56:44 +02:00
Javier Viguera 8633a4ed49 imx-atf: prevent console output when TF secure console is enabled
https://onedigi.atlassian.net/browse/DEL-9063

Signed-off-by: Javier Viguera <javier.viguera@digi.com>
2024-06-14 17:51:33 +02:00
Javier Viguera 970c0cac50 trustfence: ccimx93: implement missing secure console functionality
Unlike the rest of the NXP platforms, in u-boot, the ccimx93 allows
configuring a GPIO name to activate the console when secure console is
enabled. Those u-boot options were not translated to the trustfence code
in meta-digi.

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

Signed-off-by: Javier Viguera <javier.viguera@digi.com>
2024-06-14 17:51:33 +02:00
Gonzalo Ruiz 0d085e3062 ccmp15: add overlay for NHD-3.5-640480EF-MSXP MIPI display
https://onedigi.atlassian.net/browse/DEL-9036

Signed-off-by: Gonzalo Ruiz <Gonzalo.Ruiz@digi.com>
2024-06-14 10:49:11 +02:00
Mike Engel c157313de1 ccmp15: remove Cortex-M4 overlay from DEVICETREE list
This commit removes the Cortex-M4 overlay because the M4 has
been enabled now in the DTSI file.

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

Signed-off-by: Mike Engel <Mike.Engel@digi.com>
2024-06-12 11:26:18 +02:00
Gabriel Valcazar 4115044590 imx-boot: apply patches to fix CVE-2023-39902 on i.MX8M platforms
The patches have been backported from the lf-6.1.36-2.1.0 release of
imx-mkimage.

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

Signed-off-by: Gabriel Valcazar <gabriel.valcazar@digi.com>
2024-06-07 13:35:21 +02:00
Gabriel Valcazar d07e68b5a2 imx-boot: apply patches to fix CVE-2023-39902 on i.MX8M platforms
The patches have been backported from the lf-6.1.36-2.1.0 release of
imx-mkimage.

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

Signed-off-by: Gabriel Valcazar <gabriel.valcazar@digi.com>
2024-06-06 14:59:26 +02:00
Mike Engel 37f5db42ac tsn: add basic Time sensitive networking (TSN)
This commit adds some basic TSN support to DEY.
It includes the kernel configuration fragment with
the IEEE 802.1 support and the some user space tools
necessary to configure the network.

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

Signed-off-by: Mike Engel <Mike.Engel@digi.com>
2024-06-04 12:14:18 +02:00
Francisco Gil ecad5dba32 uuu: fix incorrect command for trustfence update from uuu
The command trustfence update doesn't require the partition argument.

Besides of that, remove extra fi on the cc8m platforms.

Signed-off-by: Francisco Gil <francisco.gilmartinez@digi.com>
2024-06-04 08:45:25 +02:00
Javier Viguera 584b263614 meta-digi: enable u-boot env encryption support on ccimx93
https://onedigi.atlassian.net/browse/DUB-1079

Signed-off-by: Javier Viguera <javier.viguera@digi.com>
2024-05-28 17:58:01 +02:00
Javier Viguera 66780aafc4 optee_os: implement Optee-based environment encryption
https://onedigi.atlassian.net/browse/DUB-1079

Signed-off-by: Javier Viguera <javier.viguera@digi.com>
2024-05-28 17:57:31 +02:00
Javier Viguera 720c5f7218 libubootenv: rework patchset with Digi-specific functionality
* Move Digi code out of the upstream files to minimize conflicts in
  version migrations.
* Remove all the TEE client copied code and use the libteeclient library.
* Some fixes in the Optee-based environment encryption
* Some simplifications in CAAM-based environment encryption.

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

Signed-off-by: Javier Viguera <javier.viguera@digi.com>
2024-05-28 17:57:01 +02:00
Hector Palacios 18ba3f592c ccmp15: add overlay for SOM hardware version 1
At the moment, this overlay adds RTC calibration to compensate
the drift observed in the 32kHz input frequency of hardware
version 1 of the SOM.

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

https://onedigi.atlassian.net/browse/DEL-8987
2024-05-14 16:29:08 +02:00
Gonzalo Ruiz a288a03ef5 firmware_qualcomm: ccimx8m: update US Board Data File calibration
Update BDF file used on CC8MN and CC8MM with a new calibration
(GOLDEN3) to obtain a flatter frequency response and a better EVM
performance.

Reference calibration file is obtained from 'qca6574au-le-2-2-2_qca_oem'
repo at tag 'r00005.1' under path
'wlanfw/cnss_proc/wlan/fw/target/sdio_dst/qc6174/bdwlan30.bin'
(MD5SUM: 8a40d95698825e1718bee640b1f7982a).

Target output powers tables and CTL tables remain intact.

Changes required to pass the EN 300 328 V2.2.2 blocking test also remain
intact.

New BDF file:
- bdwlan30_US.bin (86180198440e6ab53734aabf0112c6ba)

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

Signed-off-by: Gonzalo Ruiz <Gonzalo.Ruiz@digi.com>
2024-05-03 11:33:28 +02:00
Gonzalo Ruiz 59025531c5 ccmp15: add DT overlay for configuring a MIPI display
https://onedigi.atlassian.net/browse/DEL-8999

Signed-off-by: Gonzalo Ruiz <Gonzalo.Ruiz@digi.com>
2024-05-02 15:05:38 +02:00
Mike Engel cc8c038401 linux-dey-5.15: add RT functionality to CCMP1
This commit adds RT functionality to CCMP1. The patches
have been extracted from STM RT expansion package and
includes the maineline RT patches and the STM RT driver
patches and RT Kernel defconfig changes.

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

Signed-off-by: Mike Engel <Mike.Engel@digi.com>
2024-04-29 16:13:49 +02:00
Mike Engel 932c186225 packagegroups: add packages related to RT
This commit adds real time test tools to the system.

The hwlatedetct is a program that controls the kernel
hardware latency detector module. This is used to detect
large system latencies independent of Linux itself.

The rt-tests package is a test suite that includes the cyclictest
tool to measure the difference between a thread's intended
wake-up time and the time at which it actually wakes up.

Signed-off-by: Mike Engel <Mike.Engel@digi.com>
2024-04-29 16:13:49 +02:00
Mike Engel 2eb37cf30b linux-dey-6.1: add RT functionality to CCiMX93
This commit adds RT functionality to the CCiMX93
platform. The patches have been extracted from the
NXP real time edge BSP and include the maineline RT
patches and the NXP RT driver patches and RT Kernel
defconfig changes.

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

Signed-off-by: Mike Engel <Mike.Engel@digi.com>
2024-04-29 16:13:49 +02:00
Isaac Hermida e2caf16da4 mount: use the ubi class to check for attached devices
Use the generic sys class to check if a mtd device is attached.
The virtual node may not be present in some kernel versions.

Signed-off-by: Isaac Hermida <isaac.hermida@digi.com>
2024-04-26 14:10:14 +02:00
Javier Viguera c1fa1190d3 build-github.sh: pre-fetch source packages before building
We have intermittent build failures due to fetch errors of some large
source packages (like linux.git).

This commit tries to workaround those failures by downloading all the
source packages, with a retries mechanism, before starting the build.

Signed-off-by: Javier Viguera <javier.viguera@digi.com>
2024-04-25 16:43:12 +02:00