Commit Graph

215 Commits

Author SHA1 Message Date
Hector Palacios 41810d5c17 installers: add missing ##SIGNED## placeholder to uboot filenames
This gets substituted when TrustFence is enabled to "signed/encrypted"
or removed when TrustFence is disabled.

Signed-off-by: Hector Palacios <hector.palacios@digi.com>
2025-07-02 21:17:24 +02:00
Hector Palacios 9672b2a80a installer: uuu: prevent installing encrypted uboot on open device
Programming an encrypted bootloader can only be done after the
secure keys have been programed on the OTP bits, and the device
has been closed. Programming on an open device would result in a
non-secure configuration or a non-bootable device after the
close operation.

Create functions to detect the current TrustFence status and exit
the install script if the device is open and the artifacts are
encrypted.

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

https://onedigi.atlassian.net/browse/DEL-9699
2025-07-02 21:17:24 +02:00
Hector Palacios 01107a1d87 uuu installer: remove -t option and determine by filename
The `-t` option to program images with TrustFence didn't make
much sense because the install script is dynamically generated
at build-time with the name of the boot artifacts containing
"signed/encrypted" on their filenames.

This commit:
 - Removes `-t` option to simplify the script.
 - Determines if programming a signed/encrypted bootloader by
   looking at the bootloader filename.
 - For NXP platforms, reworks the function that updates the
   bootloader to properly program only-signed bootloaders (currently
   wrongly using `trustfence update`)

Signed-off-by: Hector Palacios <hector.palacios@digi.com>
2025-07-02 21:17:24 +02:00
Hector Palacios ac69566ecd installer: merge USB/SD installers into a single template
The USB and SD installers are U-Boot scripts that are practically
identical.
Merge them into a single template with a couple of machine variables that
determine the default device index in U-Boot for the USB or the microSD
card.

Do dynamic substitutions to create the two installers out of the template.

Signed-off-by: Hector Palacios <hector.palacios@digi.com>
2025-06-12 10:56:57 +02:00
Hector Palacios 5156fe26b3 installers: use if/elif/else to determine rootfs filename
The installer uses the regular rootfs filename or falls back to search
for a squashfs (read-only) rootfs image.
The UUU installers of eMMC-based platforms use an if/elif/else structure
to determine which file exist (in order of preference). Replicate this
structure on the rest of platforms and installers.
This avoids printing an error message if the default rootfs does not exist
but the read-only one does.
Also, reset 'rootfstype' variable if the default rootfs file exists, which
allows to install regular images over a previous read-only system.

Signed-off-by: Hector Palacios <hector.palacios@digi.com>
2025-06-12 10:56:57 +02:00
Hector Palacios 165b1ac4ce ccmp13: add device tree overlay for DVKv3
This overlay contains a workaround to make the USB-OTG
work as USB device when connected to a host.

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

https://onedigi.atlassian.net/browse/DEL-9610
(cherry picked from commit ec92f5fdd10a61e37ac3778d0d3aa1816bc6b0aa)
Signed-off-by: Hector Palacios <hector.palacios@digi.com>
2025-05-13 12:56:20 +02:00
Arturo Buzarra e87f7d0a5b u-boot-dey: ccmp1: refresh installer scripts for Yocto 5.0 support
This commit updates the installer scripts to support CCMP1 platforms under
Yocto 5.0, aligning them with the current behavior used for CCMP2.
Changes include:

- Adding support for the metadata partition, which is now required
- Including the optee/opteemin flavors in boot artifact filenames
- Ensuring the script structure and logic remain consistent with CCMP2 install scripts

Signed-off-by: Arturo Buzarra <arturo.buzarra@digi.com>
2025-05-06 09:02:10 +02:00
Hector Palacios 4fc71f42e6 uboot: install_uuu: adapt to install TrustFence images
- Add missing option '-t'
- Change variable for signed suffix

Signed-off-by: Hector Palacios <hector.palacios@digi.com>
2025-05-02 11:05:04 +02:00
Arturo Buzarra c59a5fdfe9 u-boot-dey: ccmp2: fix support for flashing Trustfence artifacts
Both boot artifacts now use the same signed label, so this commit removes
unnecessary logic and updates the UUU install script to support the new boot
artifact naming. It also fixes the detection of signed artifacts by checking
for the presence of the FIP artifact, instead of relying on a U-BOOT artifact
that does not exist on this platform.

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

Signed-off-by: Arturo Buzarra <arturo.buzarra@digi.com>
2025-03-26 08:53:12 +01:00
Arturo Buzarra 9106a8c382 u-boot-dey: use common FIT signature fragment for stm platforms
https://onedigi.atlassian.net/browse/DEL-9442

Signed-off-by: Arturo Buzarra <arturo.buzarra@digi.com>
2025-03-26 08:53:12 +01:00
Francisco Gil 96e1e8351d installers: escape quotes in assignment of variable
Assignment of variable 'force_erase' was done without escaping quotes
which led to wrong assignment and the script not forcing the erasure of
NAND partitions.

While on it, remove it from ccmp1 scripts where its use makes no sense
as the 'ubivolscript' script takes care of erasing the partitions.


Signed-off-by: Francisco Gil <francisco.gilmartinez@digi.com>
2025-03-05 16:57:31 +01:00
Hector Palacios ebbf61e15c global: rework Digi DT overlays filename structure
Device tree overlays now have the extension 'dtso' that
distinguishes them from board 'dts' files, so there is
no need for a prefix '_ov_' to tell if a file contains
a DT overlay.

To make them shorter and easier to tell the platform they
are for, change the filename format to:

  <platform-name>_<functionality>.dtso

where <platform-name> can be the name of the SOM or the
name of the DVK, so there is no need either to specify
'som' or 'board' on the filename.

Signed-off-by: Hector Palacios <hector.palacios@digi.com>
2025-02-10 18:04:06 +01:00
Arturo Buzarra 929886eeea meta-digi-arm: ccmp25-dvk: fix boot artifact names
Based on the boot schemes and sources supported for each platform, the boot
artifacts now include this information in their filenames. This commit updates
the filenames accordingly in several recipes.

Signed-off-by: Arturo Buzarra <arturo.buzarra@digi.com>
2024-12-19 09:47:07 +01:00
Javier Viguera 674d012e36 ccimx93: add support for single core 512M variants
https://onedigi.atlassian.net/browse/DEL-9221

Signed-off-by: Javier Viguera <javier.viguera@digi.com>
2024-10-03 18:13:36 +02:00
Mike Engel fe9e0d701a boot: change linux and recovery partition UUID for single mode
This commit changes the linux and recovery UUID when booting
the system in single mode.

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

Signed-off-by: Mike Engel <Mike.Engel@digi.com>
2024-09-23 17:55:48 +02:00
Francisco Gil e183f47816 ccimx9: bootscript: add logic to emulate a ccimx91 on a ccimx93
Based on the environment variable emulate-cc91:

* Limit the ram memory to 512MB
* Enable the overlay _ov_som_emulate-ccimx91_ccimx93.dtbo
* Disable the npu node

Signed-off-by: Francisco Gil <francisco.gilmartinez@digi.com>
2024-09-17 08:29:41 +02:00
Isaac Hermida b5ccc9f841 ccimx93: uboot bootscript: fix NPU overlay
When consolidating the bootscript, the variable soc_type was misspelled.

Signed-off-by: Isaac Hermida <isaac.hermida@digi.com>
2024-09-10 12:02:59 +02:00
Javier Viguera 315fcbddac install_linux_fw_uuu: update script to support ccimx91
Skip the SOC revision part, as for the ccimx91, only one imx-boot is
generated.

Signed-off-by: Javier Viguera <javier.viguera@digi.com>
2024-08-22 17:11:42 +02:00
Javier Viguera 2a9e657e0f ccmp25: implement firmware deployment scripts
https://onedigi.atlassian.net/browse/DEL-9120

Signed-off-by: Javier Viguera <javier.viguera@digi.com>
2024-07-25 19:18:47 +02:00
Arturo Buzarra c7cfefc6fe u-boot-dey: ccmp25: fix boot script to correctly parse HWID
In CCMP2 the HWID is stored in 3 consecutive fuse words, now the third word has
the following scheme:

  | 31..18 | 17 |   16  |15..12|  11..7  |6..3| 2..0 |
  +--------+----+-------+------+---------+----+------+
  |   --   | BT | Wi-Fi |  RAM | Variant | HV | Cert |
  +--------+----+-------+------+---------+----+------+

Signed-off-by: Arturo Buzarra <arturo.buzarra@digi.com>
2024-07-23 14:10:39 +02:00
Arturo Buzarra 28bcfecfaf uboot: add support to ConnectCore MP25 DVK platform
Add initial support cloned from ccmp15, based on v2022.10 from STM release
openstlinux-6.1-yocto-mickledore-mp2-v23.12.06.

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

Signed-off-by: Arturo Buzarra <arturo.buzarra@digi.com>
2024-07-22 17:12:33 +02:00
Hector Palacios 22238772ee Merge tag 'dey-4.0-r6.1' into dey-4.0/master
Digi Embedded Yocto 4.0-r6.1

Signed-off-by: Hector Palacios <hector.palacios@digi.com>
2024-07-19 13:35:27 +02:00
Mike Engel d11b291f9a meta-digi: add new CCMX91 platform into DEY
This commits adds the CCMX91 platform to the DEY
build system. Furthermore, it creates generic ccimx9
support to be used for the CCiMX91 and CCiMX93
platform.

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

Signed-off-by: Isaac Hermida <isaac.hermida@digi.com>
Signed-off-by: Mike Engel <Mike.Engel@digi.com>
2024-07-19 07:32:00 +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
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
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
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 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
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
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
Javier Viguera 3c26ef78e0 meta-digi: enable boot artifacts encryption support on ccimx93
Add a check on the existence of the "temp-fitimg-loaded" environment
variable before setting it. It is needed, as with encrypted FIT images,
we need to decrypt them before accessing the boot script. In such cases,
u-boot sets that variable to "no" so the boot script does not override it,
and the FIT image is loaded again before the final boot to the OS.

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

Signed-off-by: Javier Viguera <javier.viguera@digi.com>
2024-04-11 18:18:13 +02:00
Mike Engel 4b4d4b5a6b u-boot-dey: add install uboot on redundant partition
This commit adds instructions to update the redundant u-boot
partition.

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

Signed-off-by: Mike Engel <Mike.Engel@digi.com>
2024-04-05 17:08:22 +02:00
Gabriel Valcazar aabf4cb72d ccmp1: u-boot-dey: merge FIT signature config fragments into a single file
Unless we have a use case in which we need to apply these fragments separately,
we can merge them both into a single fragment.

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

Signed-off-by: Gabriel Valcazar <gabriel.valcazar@digi.com>
2024-03-19 13:26:47 +01:00
Gonzalo Ruiz 67be7da934 u-boot-dey: cc6: fix typo in uuu install script
Signed-off-by: Gonzalo Ruiz <Gonzalo.Ruiz@digi.com>
2024-03-14 16:41:56 +01:00
Javier Viguera be04b21ecd ccimx93: add support to build FIT images
Signed-off-by: Javier Viguera <javier.viguera@digi.com>
2024-03-04 10:44:58 +01:00
Mike Engel 9f9d016f5d ccmp1: fix the TFA naming with Trustfence enabled.
Signed-off-by: Mike Engel <Mike.Engel@digi.com>
2024-02-29 12:56:28 +01:00
Arturo Buzarra e7d90794f8 ccmp1: support different DDR3 configurations
This commit implements the support to allow different memory configurations for
the CCMP1 platforms, adding support to 512MB and 1GB memory variants for the CCMP15.

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

Signed-off-by: Arturo Buzarra <arturo.buzarra@digi.com>
2024-02-20 15:34:58 +01:00
Arturo Buzarra 9778490a30 u-boot-dey: ccmp1: disable CMD_BOOTZ when secure boot with FIT image is enabled
Command 'bootz' allows boot unsigned Linux zImages, so disable it when secure
boot is enabled using FIT images.

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

Signed-off-by: Arturo Buzarra <arturo.buzarra@digi.com>
2024-02-20 14:24:16 +01:00
Mike Engel a8f5951578 u-boot-dey: add support to installation script for Trustfence
This commit adds support to installation script for Trustfence
artifacts.

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

Signed-off-by: Mike Engel <Mike.Engel@digi.com>
2024-02-19 15:51:24 +01:00
Isaac Hermida 81d0ce168f u-boot-dey: installation scripts: minor fixes
Some minor fixes:
* return error code if installation fails
* cosmetic: update comment with options
* just exit after error and do not execute boolimit command

Signed-off-by: Isaac Hermida <isaac.hermida@digi.com>
2024-02-19 09:04:36 +01:00
Isaac Hermida 4a057144ee u-boot-dey: installation scripts: do not check recovery image for dual systems
Recovery image is not required for dual systems, so do not check it.

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

Signed-off-by: Isaac Hermida <isaac.hermida@digi.com>
2024-02-19 09:04:36 +01:00
Isaac Hermida 4372eaba01 u-boot-dey: unify installation scripts
https://onedigi.atlassian.net/browse/DEL-8860

Signed-off-by: Isaac Hermida <isaac.hermida@digi.com>
2024-02-19 09:04:36 +01:00
Gabriel Valcazar 1d15803ff2 ccimx93: installer: add helper msg to set image-name
Up until recently, we were only generating dey-image-qt images for the
ccimx93-dvk. Now that we are generating dey-image-lvgl images as well, make
sure to print the helper message to set image-name when installing said images.

Signed-off-by: Gabriel Valcazar <gabriel.valcazar@digi.com>
2024-01-31 11:38:27 +01:00
Gabriel Valcazar 26dc437a25 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>
2024-01-29 17:05:26 +01:00
Gabriel Valcazar 71940ead08 install_linux_fw_[sd/usb]: add missing comment character '#' to avoid an error
An additional line was added to a comment block without the '#' character,
resulting in the following error when running the script:

Unknown command '-' - try 'help'

Nonetheless, this error is harmless and the script continues as expected, which
is the reason why we hadn't found it until now.

Signed-off-by: Gabriel Valcazar <gabriel.valcazar@digi.com>
2024-01-25 18:37:42 +01:00
Isaac Hermida 75bd0d887b install_linux_fw_uuu: do not assing a default U-Boot file for 0x00 variants
In case a HWID is not set or the variant is unknown, do not set it to a default
U-Boot file but ask the user for the proper file.
This case should not happen, but cover it for safety.

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

Signed-off-by: Isaac Hermida <isaac.hermida@digi.com>
2024-01-25 12:15:51 +01:00