Commit Graph

4594 Commits

Author SHA1 Message Date
Javier Viguera daafef6972 ccimx93-dvk: fix machine overrides order
ARM64 generic overrides were in the middle of the chain with more
precedence than IMX overrides.

From:
MACHINEOVERRIDES="imx-generic-bsp:imx-nxp-bsp:imxdrm:imxpxp:mx9-generic-bsp:mx9-nxp-bsp:mx93-generic-bsp:mx93-nxp-bsp:ccimx93:ccimx93:aarch64:armv8-2a:use-nxp-bsp:ccimx93-dvk"

To:
MACHINEOVERRIDES="aarch64:armv8-2a:use-nxp-bsp:imx-generic-bsp:imx-nxp-bsp:imxdrm:imxpxp:mx9-generic-bsp:mx9-nxp-bsp:mx93-generic-bsp:mx93-nxp-bsp:ccimx93:ccimx93:ccimx93-dvk"

Signed-off-by: Javier Viguera <javier.viguera@digi.com>
2023-09-15 12:19:31 +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
Arturo Buzarra 09dbf79801 README: dey-4.0-r4 release notes
Signed-off-by: Arturo Buzarra <arturo.buzarra@digi.com>
2023-09-11 18:18:32 +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
Francisco Gil 1e513f89a7 installer: squashfs: add fallback option to flash squashfs images
If the default r/w rootfs is not found it will try to do a
fallback to the squashfs image.

In the nand devices additionally we need to set the rootfstype
to squashfs.

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

Signed-off-by: Francisco Gil <francisco.gilmartinez@digi.com>
2023-09-11 08:48:57 +02:00
Hector Palacios dbf1db98cf ccmp1: boot script: add support for booting from microSD
When booting from a microSD, the variable 'boot_device' is
set to "mmc". Check this to fall back to booting Linux from
the microSD partitions.

Signed-off-by: Hector Palacios <hector.palacios@digi.com>
2023-09-08 13:46:09 +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
Hector Palacios bda889282c ccmp1: don't execute task that generates flashlayout files
These are files for programming images with STM32CubeMX tool.
We don't use the tool or the files. Remove the task to avoid build
warnings.

Signed-off-by: Hector Palacios <hector.palacios@digi.com>
2023-09-07 16:22:30 +02:00
Hector Palacios 6aeedd19d5 ccmp1: don't set TF_A_CONFIG explicitly
The include in meta-st-stm32mp layer will generate this basing on
BOOTDEVICE_LABELS.

Signed-off-by: Hector Palacios <hector.palacios@digi.com>
2023-09-07 16:22:30 +02:00
Hector Palacios da11d76ae0 ccmp1: define custom WKS_FILE_DEPENDS
Define dependencies for creating a wic sdcard bootable image.

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

https://onedigi.atlassian.net/browse/DEL-8650
2023-09-07 16:22:30 +02:00
Hector Palacios d3ba672d51 ccmp1: build ext4.gz and boot.vfat images when sdcard boot is enabled
Signed-off-by: Hector Palacios <hector.palacios@digi.com>

https://onedigi.atlassian.net/browse/DEL-8650
2023-09-07 16:22:30 +02:00
Hector Palacios b80a7ced0e ccmp1: add ccmp1 platforms to supported list when enabling sdcard boot
Signed-off-by: Hector Palacios <hector.palacios@digi.com>

https://onedigi.atlassian.net/browse/DEL-8650
2023-09-07 16:22:30 +02:00
Hector Palacios d76a83fa38 ccmp1: fix default BOOTDEVICE_LABELS and set default BOOTSCHEME_LABELS
BOOTDEVICE_LABELS defines the supported boot device (NAND by default).
BOOTSCHEME_LABELS defines the which kind of boot is supported.

Signed-off-by: Hector Palacios <hector.palacios@digi.com>
2023-09-07 16:22:30 +02:00
Hector Palacios 1085b73dcc Revert "ccmp1: allow override of TF_A_CONFIG"
We will use BOOTDEVICE_LABELS as a means to add 'sdcard'
configuration to TF_A_CONFIG within meta-st-stm32 so there
is no need to have a wrapper variable in meta-digi.

This reverts commit 7cf314ba80.

Signed-off-by: Hector Palacios <hector.palacios@digi.com>
2023-09-07 16:22:30 +02:00
Hector Palacios e89385894d Revert "ccmp1x: create new variable to be able to truly override TF_A_CONFIG"
We will use BOOTDEVICE_LABELS as a means to add 'sdcard'
configuration to TF_A_CONFIG within meta-st-stm32 so there
is no need to have a wrapper variable in meta-digi.

This reverts commit c6f19a099c.

Signed-off-by: Hector Palacios <hector.palacios@digi.com>
2023-09-07 16:22:30 +02:00
Francisco Gil 894a28de64 ccmp1: add weak assignment for KERNEL_EXTERNAL_DEFCONFIG
Digi's mechanism to use a custom Linux kernel defconfig is
based on setting the variable KERNEL_DEFCONFIG, however ST
implements their own mechanism with a custom variable
KERNEL_EXTERNAL_DEFCONFIG. When providing an external defconfig,
the variable needs to be set, otherwise a build error
will be generated.  So to keep compatibility with NXP
platforms, this commit weakly assigns KERNEL_EXTERNAL_DEFCONFIG
to a default value "defconfig".

Signed-off-by: Francisco Gil <francisco.gilmartinez@digi.com>
2023-09-07 14:45:32 +02:00
Mike Engel b4e886f216 Revert "udev: disable uSD card mounting for the CCMP1"
Reverted due to u-boot mtd environment partition change (DEL-8652)

This reverts commit a3af0c8597.

https://onedigi.atlassian.net/browse/DEL-8502
2023-09-07 10:32:37 +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
David Escalona 910ee4ab44 u-boot-dey: boot: update all boot scripts to synchronize boot variables for dualboot systems
Until now, for dualboot systems, all boot variables were calculated on each boot depending on the value of the
'active_system'. These variables are used to boot the device but were not saved, which could lead to a missmatch
between their value in the environment and their required values to correctly boot the system. This commit
simplifies a bit the variables calculation and adds a block to synchronize their value in the environment.

Signed-off-by: David Escalona <david.escalona@digi.com>
2023-09-04 18:23:58 +02:00
David Escalona 3c9384a99c u-boot-dey: altboot: remove the 'altboot' script for all platforms
All the 'altboot' script functionality has been moved directly to the 'altbootcmd' command
in U-Boot, so this script is no longer necessary. Remove it for all platforms.

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

Signed-off-by: David Escalona <david.escalona@digi.com>
2023-09-04 14:17:16 +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
Hector Palacios 39fadff26a install_linux_fw_sd/usb: add helper msg to set image-name
The install scripts from SD/USB use a fixed image name.
If you are trying to install a different image you need to set
the env variable 'image-name' first.
Add a helper message if default files are not found to
avoid needing to go to the documentation.

Signed-off-by: Hector Palacios <hector.palacios@digi.com>
2023-09-01 17:17:04 +02:00
Hector Palacios a791bb4463 install_linux_fw: reset bootcount before resetting target
During firmware install, the target may be reset several times.
We don't want the bootcount to count these as boot attempts.

Signed-off-by: Hector Palacios <hector.palacios@digi.com>
2023-09-01 17:17:04 +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
Francisco Gil b2dddb2b4c readonly: change index for ubi volume to 1
Now in the ccmp1X platform the index for the data partition is
hosted in the ubi1 volume instead of the ubi0.

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
Hector Palacios 8c0dc9af13 udev-extraconf: adapt mount rules and script for new ccmp1 partition table
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.

Signed-off-by: Hector Palacios <hector.palacios@digi.com>
2023-09-01 17:16:32 +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 00c87360ad Revert "ccmp15: force set TRUSTFENCE_KEY_INDEX to "0""
Since ccmp15 and ccmp13 have a different workflow, this change is no longer necessary.
This reverts commit 1650cc973a.
2023-08-30 09:53:56 +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
Arturo Buzarra 4d6947e02a trustfence: stm: improve error handling for PKI tree generation script
Any errors in the PKI tree generation are not reported to bitbake, so the
script fails silently. This commit adds a validation of the script execution,
and if it fails, it aborts the execution and notifies to bitbake.

Signed-off-by: Arturo Buzarra <arturo.buzarra@digi.com>
2023-08-30 09:53:56 +02:00
Arturo Buzarra a8809e68c7 trustfence: stm: fix PKI generation for CCMP13 platform
The KeyGen tool to generate 8 key pairs requires 8 consecutive passwords,
however, when the shell expands the passwords variable, it interprets it as a
single string instead of 8 different strings and fails.

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
David Escalona 88f74279b1 recipes-bsp: u-boot: boot-scripts: update boot scripts to use new 'bootcount' mechanism
The 'bootcount' value is now incremented and stored in the system on every boot and
not only then the 'upgrade_available' flag is set. Also, ensure the value is cleared
when the 'altboot' script is executed by running the new U-Boot command 'bootcount reset'.

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

Signed-off-by: David Escalona <david.escalona@digi.com>
2023-08-29 09:48:04 +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