Commit Graph

78 Commits

Author SHA1 Message Date
Javier Viguera 0368bb6b4e meta-digi-dey: add QT6 support
https://onedigi.atlassian.net/browse/DEL-8347

Signed-off-by: Javier Viguera <javier.viguera@digi.com>
2023-02-02 18:03:38 +01:00
Javier Viguera 14e504344f meta-digi-dey: make QT5 optional
Remove the 'qt5-layer' hardcoded dependence for 'digi-dey' and
dynamically get whether QT5 is being used in the project. This is done
with a new class _qt-version.bbclass_ that is able to get that
information from the project.

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

Signed-off-by: Javier Viguera <javier.viguera@digi.com>
2023-02-02 18:03:38 +01:00
Hector Palacios b4c65056fa dey-image-installer: remove boot-artifacts.bbclass
The class 'boot-artifacts.bbclass' was created to generate a
list of the bootable artifacts that must be copied from the
deploy dir to the installer ZIP file, so that the installer
has all the possible bootloader files to update any variant
of the hardware.
The class was somewhat over-engineered to produce the list,
specially for the cc8x, with the variants of SoC revision,
RAM size and width. With the arrival of ST family, it got
more complex, as the artifacts don't even come from U-Boot
recipe.

To remove complexity, this commit removes the bbclass and
moves the list to the platform config file.

Signed-off-by: Hector Palacios <hector.palacios@digi.com>
2023-01-18 10:55:47 +01:00
Javier Viguera 9d40092ce5 meta-digi: rework u-boot support
Instead of overriding the whole do_compile function, just to reconfigure
u-boot for Trustfence, create a do_configure pre-function that takes care
of that. This allows the removal of duplicated code.

Also, disable the generation of u-boot environment artifacts. We are
not using them and so many u-boot artifacts in the deploy directory
are confusing.

Finally, adjust the names of the TF u-boot artifacts in the do_deploy
append function.

Signed-off-by: Javier Viguera <javier.viguera@digi.com>
2022-12-22 12:37:46 +01:00
Francisco Gil b52339d591 dualboot: move the things to the corresponding class
we can get rid of dualboot.bbclass moving things to different
layers.

Signed-off-by: Francisco Gil <francisco.gilmartinez@digi.com>
2022-11-15 07:49:17 +01:00
Arturo Buzarra 49dbae051e dey-image-installer: fix recipe to add USB driver installation script
Signed-off-by: Arturo Buzarra <arturo.buzarra@digi.com>
2022-11-10 10:57:16 +01:00
Arturo Buzarra feab76d675 dey-image-installer: fix ZIP installer generation for ccmp1 platforms
The ccmp1 build generates ubifs images for the NAND on the device and vfat and
ext4 images for the SD card. This commit reuses the already implemented
mechanism to match only ubifs images for the ccmp1 platforms.

Signed-off-by: Arturo Buzarra <arturo.buzarra@digi.com>
2022-11-10 10:57:16 +01:00
Francisco Gil 9cd5ae591d usb_driver: add a script to install Cypress usb driver
The new DVKs of the cc8mn, cc8mm and ccmp1 have a new ftdi
usb to serial chip that is recognized as a thermal device by default.

With the install_usb_driver.sh script this driver is replaced
to a USB to serial driver.

This script is included for the needed platforms in the zip
installer provided in the getting started.

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

Signed-off-by: Francisco Gil <francisco.gilmartinez@digi.com>
2022-10-26 11:30:46 +02:00
Hector Palacios 1105a8fecd dualboot: move contents of meta-digi-dualboot layer into meta-digi as a class
- create dualboot.bbclass that
  - sets DUALBOOT_ENABLED variable
  - defines partition names and function for changing the sw-description
    for swupdate
- move files from layer into meta-digi

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

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

Signed-off-by: Francisco Gil <francisco.gilmartinez@digi.com>
2022-10-26 11:29:23 +02:00
Javier Viguera 90b3c244da meta-digi: do not install kernel image in rootfs
It's just a waste of space as we already have the kernel image in the
'linux' partition and that gets mounted under /mnt/linux.

Signed-off-by: Javier Viguera <javier.viguera@digi.com>
2022-07-08 13:23:58 +02:00
Gabriel Valcazar 712907b1c3 trustfence: add artifact authentication to U-Boot in signed image builds
Signed image support in U-Boot has been split into two separate configurations:
one that adds artifact authentication support and another that signs the U-Boot
binary at the end of the build. Reflect this change in meta-digi.

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

Signed-off-by: Gabriel Valcazar <gabriel.valcazar@digi.com>
2022-03-22 12:47:32 +01:00
Gabriel Valcazar cea6ef12c3 hardknott: imx-gpu-viv-6: remove kernel-module-imx-gpu-viv from RRECOMMENDS
This package was originally being added via RDEPENDS, and its removal was
missing when porting the newer file from NXP's meta-imx. Re-incorporate the
removal to avoid including the package in our images, but do so by adding it
to our images' BAD_RECOMMENDATIONS.

Signed-off-by: Gabriel Valcazar <gabriel.valcazar@digi.com>
2022-01-05 11:09:46 +01:00
Hector Palacios 7c1ab66835 trustfence: avoid encryption of read-only SQUASHFS
SQUASHFS read-only rootfs cannot be unencrypted on-the-fly
so skip encryption if read-only-rootfs is active.

Signed-off-by: Hector Palacios <hector.palacios@digi.com>
2021-12-01 13:11:37 +01:00
Hector Palacios f4f84881d7 trustfence: if read-only rootfs enabled, add config switch to U-Boot
When TrustFence and a read-only rootfs are enabled, U-Boot must
authenticate the SQUASHFS root file system. Add config switch to force
U-Boot to authenticate this image.

Signed-off-by: Hector Palacios <hector.palacios@digi.com>
2021-12-01 13:10:44 +01:00
Mike Engel 2145614724 images: add function to sign read only rootfs when Trustfence is enabled
Signed-off-by: Mike Engel <Mike.Engel@digi.com>
2021-11-11 13:37:30 +01:00
Gabriel Valcazar bbdf745661 dey-image-qt: compress .ext4 images by default
Since these images are highly compressable, this greatly reduces the amount of
space taken up by build artifacts.

Modify the code used to generate the .sdcard and .installer.zip files so that
they contain the decompressed .ext4 image.

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

Signed-off-by: Gabriel Valcazar <gabriel.valcazar@digi.com>
2021-06-29 12:48:26 +02:00
Gabriel Valcazar e2cd4f6d9a trustfence-initramfs: remove support for platforms with NAND internal storage
This initramfs only makes sense in platforms with an eMMC as the internal
storage, due to how the partition encryption support is implemented. In
plaatforms that use NAND instead, ths initramfs offers no functionality and
increases the recovery image size, so remove it.

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

Signed-off-by: Gabriel Valcazar <gabriel.valcazar@digi.com>
2021-05-27 12:10:44 +02:00
Gabriel Valcazar 82a76a7106 trustfence: split filesystem encryption support into two variables
Previously, TRUSTFENCE_INITRAMFS_IMAGE was the only variable used to configure
rootfs encryption. Now that any partition can be encrypted and the rootfs
encryption still needs to be handled differently, use two variables instead.

    * TRUSTFENCE_ENCRYPT_PARTITIONS to control partition encryption in general
    * TRUSTFENCE_ENCRYPT_ROOTFS to control rootfs encryption

As with most trustfence functionality, enable both by default. Leave
TRUSTFENCE_INITRAMFS_IMAGE as an internal variable only.

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

Signed-off-by: Gabriel Valcazar <gabriel.valcazar@digi.com>
2021-05-27 12:10:43 +02:00
Arturo Buzarra 6e96028691 gatesgarth migration: features_check: remove custom recipe reusing the upstream version
Recipe was added in poky layer

https://jira.digi.com/browse/DEL-7508

Signed-off-by: Arturo Buzarra <arturo.buzarra@digi.com>
2021-05-05 19:18:11 +02:00
Gonzalo Ruiz 39baff1e60 trustfence: add new TRUSTFENCE_SRK_REVOKE_MASK variable
In order to revoke SRKs in platforms with AHAB we need to set a mask
during the signing/encryption process.

Create new TRUSTFENCE_SRK_REVOKE_MASK variable to export the
SRK_REVOKE_MASK variable required by the imx-boot signing script.

The revoke mask is not necessary for signing/encryption of other artifacts,
so set it by default to 0x0.

Signed-off-by: Gonzalo Ruiz <Gonzalo.Ruiz@digi.com>
2021-01-13 17:00:29 +01:00
Arturo Buzarra 8b3b8b5516 uboot: add script to update firmware from a USB stick
Create scripts to install DEY firmware using a USB stick.

https://jira.digi.com/browse/DEL-6802

Signed-off-by: Arturo Buzarra <arturo.buzarra@digi.com>
2020-12-03 15:46:22 +01:00
Hector Bujanda 306f0c2d43 recipes-graphics: xserver-xorg: Update recipes to new BSP release imx_5.4.47_2.2.0
Includes:
xserver-xorg: Upgrade to 1.20.8 version [YOCIMX-4697]

    Backport the recipes from poky master as the xserver is already upgraded to 1.20.8.

    Signed-off-by: Neena Busireddy <neenareddy.busireddy@nxp.com>
xserver-xorg: Remove comment that is no longer valid

    Signed-off-by: Tom Hochstein <tom.hochstein@nxp.com>
xserver-xorg: Fix patch fuzz

    Signed-off-by: Tom Hochstein <tom.hochstein@nxp.com>

Signed-off-by: Hector Bujanda <Hector.Bujanda@digi.com>

Added FILESEXTRAPATHS_prepend to reuse some recipes from poky layer.
Patches refreshed with devtool finish --force-patch-refresh

Signed-off-by: Hector Bujanda <Hector.Bujanda@digi.com>
2020-11-04 12:59:23 +01:00
Arturo Buzarra 496d8f8eda dey-image-installer: add release version to readme file in ZIP installer
This commit replaces the hardcoded text from the readme file by the environment
variables adding from this way the release version to the file content.

Signed-off-by: Arturo Buzarra <arturo.buzarra@digi.com>
2020-10-22 13:33:45 +02:00
Arturo Buzarra 9cdc344927 zeus migration: dey-image: update SDK_POSTPROCESS_COMMAND variable to match with zeus version
Commit 3418d1326c ("populate_sdk_base: provide options to set sdk type")
in poky layer introduces a new mechanism to create different archive types
for the sdk, and the function tar_sdk was renamed to archive_sdk.
This commit updates the custom SDK_POSTPROCESS_COMMAND variable with the new
function name.

https://jira.digi.com/browse/DEL-7013

Signed-off-by: Arturo Buzarra <arturo.buzarra@digi.com>
2020-05-04 15:09:37 +02:00
Gonzalo Ruiz 25c1ea59b0 trustfence: Add custom CONFIG_SIGN_MODE to UBOOT_EXTRA_CONF
This configuration is required to sign and encrypt U-Boot images during
build time, as it is done for ccimx6ul platform.

Signed-off-by: Gonzalo Ruiz <Gonzalo.Ruiz@digi.com>
2020-04-08 14:23:18 +02:00
Mike Engel e550d82c77 meta-digi-arm: uboot: Add firmware install script using fastboot support.
This commit adds a installation script that uses fastboot support to
update the target firmware.

Signed-off-by: Mike Engel <Mike.Engel@digi.com>

https://jira.digi.com/browse/DEL-6845
2020-03-10 10:38:59 +01:00
Hector Palacios 6c9341bd8a trustfence: disable environment encryption for CC8X
Environment encryption is not yet supported in U-Boot.
Unset TRUSTFENCE_ENCRYPT_ENVIRONMENT on the machine configuration
and remove the platform conditional on the class.

Signed-off-by: Hector Palacios <hector.palacios@digi.com>
2020-02-12 18:50:19 +01:00
Hector Palacios 8320168821 trustfence: homogenize SIGN_MODE variables
* prefix TRUSTFENCE_ to variable SIGN_MODE for DEY
* prefix CONFIG_ to variable SIGN_MODE for script

Signed-off-by: Hector Palacios <hector.palacios@digi.com>
2020-02-12 18:50:19 +01:00
Gabriel Valcazar 6aa852dccd sdk: remove image name from default SDK path
Some configuration files inside of the SDK make use of the default SDK
installation path, so some tools might break unless the SDK is installed in said
default path.

Recently, we modified the default installation path to include the platform and
the image type, but the image type was added after the SDK was created, so even
though the environment script's paths include the image type, the "original"
default path in the config files inside of the SDK doesn't include the image
type. A side effect of this is that Qt5 apps cannot be built, since the qmake
and Qt configuration files are pointing to the "original" SDK path.

Remove the image type from the path so that the paths in the SDK's config files
match the real default installation path.

This partially reverts commit be0fe088e3.

https://jira.digi.com/browse/DEL-6972

Signed-off-by: Gabriel Valcazar <gabriel.valcazar@digi.com>
2020-02-10 18:11:25 +01:00
Mike Engel 909a8c9e83 Revert "ccimx8x: prohibit dey-image-qt from building when trustfence is enabled"
Added Trusfence support for the CC8X.

This reverts commit 8b5c710036.

https://jira.digi.com/browse/DEL-6917
2020-02-04 12:20:38 +01:00
Mike Engel 5beec04b6a trustfence: Add Trustfence support for CCMX8X
This commit adds Trustfence support for the CCMX8X
platform.

Signed-off-by: Mike Engel <Mike.Engel@digi.com>

https://jira.digi.com/browse/DEL-6917
2020-02-04 12:20:38 +01:00
Gabriel Valcazar be0fe088e3 sdk: add platform and image names to the default SDK installation path
Since the final image name is not available in a global scope, append it to the
default installation path in the SDK extraction script once it has been
packaged.

The new default installation path format is:

    /opt/dey/<version>/<platform>/<image>

https://jira.digi.com/browse/DEL-5264

Signed-off-by: Gabriel Valcazar <gabriel.valcazar@digi.com>
2019-11-29 16:44:23 +01:00
Hector Palacios 8b5c710036 Revert "Revert "ccimx8x: prohibit dey-image-qt from building when trustfence is enabled""
Trustfence is not yet fully supported for the CC8X.
Retore the warning.

This reverts commit 78534ca779.

Signed-off-by: Hector Palacios <hector.palacios@digi.com>
2019-09-03 18:42:42 +02:00
Jose Diaz de Grenu 5a893838c9 dey-image: [cosmetic] correct comment
Signed-off-by: Jose Diaz de Grenu <Jose.DiazdeGrenu@digi.com>
2019-08-29 16:34:02 +02:00
Hector Palacios 65ec66b659 dey-image-installer: loop on new BOOTABLE_ARTIFACTS variable
The artifacts that must go inside the installer ZIP image are not anymore
the ones in UBOOT_CONFIG. For CC8X, the artifacts are combinations of
UBOOT_CONFIG and RAM_CONFIGS.

This commit adds a function 'get_bootable_artifacts()' to boot-artifacts class
to generate a new variable BOOTABLE_ARTIFACTS with the list of bootable
artifacts DEY produces.

The installer recipe can then simply iterate on that list, rather than
needing to calculate it by itself.

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

https://jira.digi.com/browse/DEL-6641
2019-07-12 12:49:03 +02:00
Hector Palacios e50f6c3e91 u-boot: fix the use of boot image recipe and prefix
A variable called IMAGE_BOOTLOADER was being used without distinction for
referring to two different things:
 - the recipe that builds the bootable artifacts
 - the prefix of those artifacts

The value of this is "u-boot" for most platforms, but "imx-boot" for the
CC8X based platforms.

The name of the variable is misleading, so this commit splits it into two:
 - BOOTLOADER_IMAGE_RECIPE, to refer to the recipe
 - UBOOT_PREFIX, to refer to the prefix of the bootable artifact

With the separation, the variable UBOOT_SYMLINK becomes a generic formed
one, so it is moved to digi-defaults.inc.

While on it, fix the image_types_digi.bbclass which was not making use of
the original variable to establish all the dependencies.

Signed-off-by: Hector Palacios <hector.palacios@digi.com>
2019-07-12 11:04:47 +02:00
Mike Engel 78534ca779 Revert "ccimx8x: prohibit dey-image-qt from building when trustfence is enabled"
This reverts commit dce71c9348.
Add Trustfence support for the MX8X platform

Signed-off-by: Mike Engel <Mike.Engel@digi.com>
2019-07-08 17:41:01 +02:00
Arturo Buzarra 5eb88b8c5d sumo migration: meta-digi: replace the deprecated base_conditional function
Signed-off-by: Arturo Buzarra <arturo.buzarra@digi.com>
2019-01-11 13:26:44 +01:00
Gabriel Valcazar 419b8def29 dey-image-installer: generalize bootloader name to support imx-boot files
The generate_installer_zip() function had a hardcoded "u-boot" filename when adding
the bootloader to the list of files that are put in the installer .zip.

https://jira.digi.com/browse/DEL-6174

Signed-off-by: Gabriel Valcazar <gabriel.valcazar@digi.com>
2018-09-13 17:00:34 +02:00
Gabriel Valcazar dce71c9348 ccimx8x: prohibit dey-image-qt from building when trustfence is enabled
The message log level is "fatal" so the compilation ends as soon as possible.

Signed-off-by: Gabriel Valcazar <gabriel.valcazar@digi.com>
2018-07-06 13:46:23 +02:00
Jose Diaz de Grenu 80626aa749 swupdate: update to 2017.07
Rename recipe and fix the path of the progress binary. Also on the
rocko branch of meta-swupdate several signing mechanisms are
supported, and the value is used as a string to determine which one
to use.

Signed-off-by: Jose Diaz de Grenu <Jose.DiazdeGrenu@digi.com>
2018-01-23 14:33:17 +01:00
Tatiana Leon 7d2a07cf2f dey-image: create an sdk/toolchain dey version file with params to identify it
This commit creates a new file called 'dey-version-${REAL_MULTIMACH_TARGET_SYS}'
(for example, 'dey-version-cortexa7hf-neon-dey-linux-gnueabi') at the same level
as 'version-${REAL_MULTIMACH_TARGET_SYS}',
'site-config-${REAL_MULTIMACH_TARGET_SYS}', and
'environment-setup-${REAL_MULTIMACH_TARGET_SYS}' files.

The file contains the following parameters:
   * Machine. The name of the platform the toolchain was built for (ccimx6sbc,
     ccimx6ulsbc, ccimx6ulstarter).
   * Version: A versioning system for the generated toolchains. Currently is the
     distro version followed by the timestamp on which the current build started.
   * Image: The name of the image that triggered the population of the SDK
     (core-image-base, dey-image-aws, dey-image-qt-${GRAPHICAL_BACKEND})

The purpose of the 'dey-version-*' file is to be parsed by Eclipse so toolchains
can be autodetected.

This file is packaged with the rest of SDK/toolchain resources ('version-*',
'site-config-*', and 'environment-setup-*' files, and 'sysroots' directory)
when creating the SDK tarball and later the installation script.

The 'dey-version-*' file could also be created in a 'meta-environment.bbappend'
appending to the 'create_sdk_files()'. But from this recipe there is no access
to the name of the image that triggers the creation of the SDK (core-image-base,
dey-image-aws, dey-image-qt, etc.).

Currently, we are redefining 'SDK_POSTPROCESS_COMMAND' (from
'poky/meta/classes/populate_sdk_base.bbclass') to insert the generation of the
'dey-version-*' file just before creating the SDK tarball.

https://jira.digi.com/browse/DEL-5074

Signed-off-by: Tatiana Leon <tatiana.leon@digi.com>
2017-10-03 15:18:52 +02:00
Javier Viguera f397ee2289 greengrass: add support to preconfigure the package
If values are provided in the local.conf, the package will have the
'config.json' file preconfigured.

https://jira.digi.com/browse/DEL-4274

Signed-off-by: Javier Viguera <javier.viguera@digi.com>
2017-07-05 13:43:28 +02:00
Javier Viguera 991a087e85 awsiotsdk-c: rename bbclass to aws-iot
Rename the class so it's not specific to the C version of the AWS IoT
Device SDK, and can be used for anything related with AWS IOT (for
example Greengrass).

https://jira.digi.com/browse/DEL-4274

Signed-off-by: Javier Viguera <javier.viguera@digi.com>
2017-07-05 13:43:28 +02:00
Tatiana Leon 8a1a67f592 aws-iot-sdk: add variable to establish the logging level
Variable 'AWS_IOT_LOGGING_LEVEL' can be used from the project 'local.conf' to
establish the logging level of the AWS IoT Device SDK.

There are 6 incremental levels: none, error, warn, info, debug, and trace.

Default is 'debug'.

https://jira.digi.com/browse/DEL-4101

Signed-off-by: Tatiana Leon <tatiana.leon@digi.com>
2017-05-11 19:10:10 +02:00
Tatiana Leon 9a296b79a3 meta-digi: add awsiotsdk-c configuration class
This commit adds an awsiotsdk-c class to encapsulate all AWS IoT device SDK
configurations.

In general, the variables are the macros that users can configure in their
'aws_iot_config.h' file.

See for example, the header file for the 'shadow_sample' at GitHub:
https://github.com/aws/aws-iot-device-sdk-embedded-C/blob/master/samples/linux/shadow_sample/aws_iot_config.h

https://jira.digi.com/browse/DEL-4101

Signed-off-by: Tatiana Leon <tatiana.leon@digi.com>
2017-05-11 19:10:10 +02:00
Javier Viguera dba3244a3e dey-image-installer: fix missing artifacts in ZIP installer
With the migration to Morty, some of the paths to the artifacts (boot
and rootfs images) need to be updated.

While on it, also remove the temporary README.txt file which is not
needed after it has been packed in the zip installer.

https://jira.digi.com/browse/DEL-4013

Signed-off-by: Javier Viguera <javier.viguera@digi.com>
2017-03-31 18:02:52 +02:00
Tatiana Leon 38740f9a04 trustfence: get bytes from the console passphrase to feed the hash method
In Python 3, feeding string objects into hash method is not supported. Hashes
work on bytes, not on characters.

So we use 'encode()' on the passphrase to get the bytes object.

See:
 * https://docs.python.org/3/howto/pyporting.html#text-versus-binary-data
 * https://docs.python.org/3/library/hashlib.html#module-hashlib

This commit fixes build failures as:

Exception: TypeError: Unicode-objects must be encoded before hashing

https://jira.digi.com/browse/DEL-3984

Signed-off-by: Tatiana Leon <tatiana.leon@digi.com>
2017-03-27 10:38:13 +02:00
David Escalona 00d22c3d7e swu-sign: do not expand private sign key in TrustFence class
- Trying to set the complete SWU packages signature key in the
  TrustFence class was causing a build error when keys were not
  yet generated. To avoid this, set only the key wildcard in the
  TrustFence class and expand the variable in the SWU packages
  recipes, when keys already exist.

https://jira.digi.com/browse/DEL-3913

Signed-off-by: David Escalona <david.escalona@digi.com>
2017-03-15 12:02:17 +01:00
David Escalona 319576805a swupdate: add sign and hash support to swupdate packages generation
- Enabled signing support while generating the swupdate
  packages for 'core-image-base' and 'dey-image-qt'. The
  signing support is only enabled when 'TUSTFENCE_SIGN=1'
  and requires the recipe to set the private key that will
  be used to generate the signature.
- Enabled hash support while generating the swupdate
  packages for 'core-image-base' and 'dey-image-qt'. The
  hash support requires the sw-description files to include
  a new line for each image and/or file that will be added
  to the update package. The hash is automatically calculated
  and replaced in the sw-description files.

https://jira.digi.com/browse/DEL-3774

Signed-off-by: David Escalona <david.escalona@digi.com>
2017-03-07 17:04:21 +01:00