Commit Graph

28 Commits

Author SHA1 Message Date
Hector Palacios fc641ce680 dey-image: enable DEY_IMAGE_INSTALLER by default
This generates an installer.zip image with all the firmware
images, including install scripts for UUU, SD card, and USB.
This is helpful to share the artifacts with manufacturing
or for deploying to external media such as microSD or USB stick.

Signed-off-by: Hector Palacios <hector.palacios@digi.com>
2025-06-16 08:35:19 +02:00
Gabriel Valcazar 74b2a65a19 Move common SDK modifications to a new bbclass, dey-image-sdk
Our new dey-toolchain recipe was missing the logic needed to create the
"dey-version" file in the SDK's installation path. Move this logic from the
dey-image bbclass to a new bbclass meant exclusively for SDK logic, and inherit
it where needed. While at it, move other common SDK modifications to this
class.

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

Signed-off-by: Gabriel Valcazar <gabriel.valcazar@digi.com>
2024-11-27 13:49:27 +01:00
Gabriel Valcazar db613ceff9 classes/images: Drop ';' delimiter from ROOTFS/IMAGE*COMMAND variables
This is a cosmetic commit that mirrors poky commit 6fd8af0d30e5.

Signed-off-by: Gabriel Valcazar <gabriel.valcazar@digi.com>
2024-11-27 12:41:39 +01:00
Gabriel Valcazar 171e5a5db1 trustfence.bbclass: copy public key to fs only if TRUSTFENCE_SIGN is enabled
Commit 998598415a moved this logic to the
trustfence.bbclass file, but in doing so, it removed the TRUSTFENCE_SIGN check
it used to have. The check is needed for two reasons:

* The signing of SWU packages only occurs when TRUSTFENCE_SIGN is enabled, so
  there's no need to copy the key if it's disabled
* When building a project from scratch that has Trustfence enabled but
  TRUSTFENCE_SIGN disabled, a PKI is never generated and the key doesn't exist.
  Because of this, the key won't be found and an error will occur. Note that
  if your project is already pointing to a populated PKI, the error won't
  happen, only if there's no PKI to begin with.

Although the PKI is guaranteed to exist by the time the rootfs is populated,
make sure to check that it has been properly generated and create it if it
doesn't exist. This logic depends on the trustfence-gen-pki.sh from
trustfence-sign-tools-native, so add it as a dependency for
dey-image-recovery-initramfs. The dependency is already there for another
feature in the dey-image recipes, so simply reflect this new dependency in a
comment.

Signed-off-by: Gabriel Valcazar <gabriel.valcazar@digi.com>
(cherry picked from commit 8e52c27d5a8e8071c3a17754e91c1819bcceee15)
2024-11-14 13:30:03 +01:00
Gabriel Valcazar a274463266 dey-image: inherit populate_sdk_qt[5/6] only in dey-image-qt to avoid SDK bloat
When it comes to inheriting this qt bbclass, we used to do so for every image
inheriting the "dey-image" bbclass that had "dey-qt" in its IMAGE_FEATURES. In
theory, only dey-image-qt follows these requirements.

However, starting in DEY 3.0, we added support for multiple graphical images,
all of them sharing the same characteristics save for a defining IMAGE_FEATURE.
To implement this, all images have the IMAGE_FEATURE "dey-${GRAPHICAL_CORE}",
with GRAPHICAL_CORE having a default value of "qt" and being overwritten in
each image recipe with its respective value: "qt", "webkit", "crank" or "lvgl".
The problem is that, when checking whether to inherit populate_sdk_qt[5/6] or
not, it's still very early in the recipe parsing process and GRAPHICAL_CORE
still has its default value of "qt", meaning the "dey-qt" IMAGE_FEATURE is
considered present for all graphical images. In turn, this results in qt
packages being included in all graphical image SDKs.

Move the inherit clause to the dey-image-qt recipe and remove the check so
that the qt packages only get installed in the dey-image-qt SDK.

Signed-off-by: Gabriel Valcazar <gabriel.valcazar@digi.com>
(cherry picked from commit 593ff866578e6d341ec4d8a09581922c6390e2a4)
2024-11-08 10:30:52 +01:00
Arturo Buzarra 984def64fd meta-digi-dey: sysinfo: fix build info filename from "build" to "buildinfo"
Commit 99f1425340 ("image-buildinfo: Improve and extend to SDK coverage too")
in the Poky layer changes the name of the default build information file from
"build" to "buildinfo", so this commit reflects this change by adapting the
sysinfo script.

Signed-off-by: Arturo Buzarra <arturo.buzarra@digi.com>
2024-11-07 12:33:07 +01:00
David Escalona e65be961cd meta-digi-dey: swupdate: reorganize 'swupdate' custom classes and extensions
We expect new types of SWU update packages to be created in the future. To avoid splitting
all the code in different classes based on the update type, create the generic class
'dey-swupdate' to hold all the custom code and the 'dey-swupdate-common' class to hold all
the required variables. This basically renames the old 'swupdate-files' and 'swupdate-files-common'
classes.

While on it, reorganize the 'swupdate-images' recipe to move variable declarations and
functionallity to the correct place:
  - Move all variable declarations to 'swupdate-digi-common' class and organize them in
    functional groups.
  - Improve the way files are included in the 'SWUPDATE_IMAGES' by using the update type
    variables.
  - Move the update script copy to the 'do_swuimage' prepend function. Until now, the copy
    process was executed in the 'fill_description' method, which should only touch the
    'sw-description' file.
  - Rename some variables to use 'SWUPDATE' prefix.
  - Minor cosmetic changes.

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

Signed-off-by: David Escalona <david.escalona@digi.com>
2023-08-14 10:36:37 +02:00
David Escalona 94d4bbbe9f meta-digi-dey: swupdate-files: add firmware update support based on files
Implement a new mechanism to allow users to create update packages based on files and folders to modify
the active system.

This is done through the new class 'swupdate-files', which creates a tar.gz update file in the image
distribution output directory containing all the files and directories to create/update. The 'tar.gz'
file is used later by the 'swu-images' recipe to generate the final SWUpdate package. The SWU package
installation process extracts the tar.gz file in the root folder ("/") of the active system.

Users can specify the list of files and directories to include in the update package using the
'SWUPDATE_FILES_LIST' variable. These files will be directly copied from the generated system rootfs and
placed in the tar.gz archive. Additionally, users can provide their custom 'tar.gz' file to use in the update
by specifying its location in the 'SWUPDATE_FILES_TARGZ_FILE' variable. In any case, all the paths to include
in the update package must be relative to "/", as it is the base directory where tar.gz file contents are
extracted.

The update process for dual boot systems sets a new u-boot flag so that active bank is not swapped once
installation is complete and system reboots.

The SWU update mechanism based on files provides a custom update script which takes care of preparing the
system for the installation process. Just like in the SWU updates based on images, users can customize this
script or override it with the 'SWUPDATE_SCRIPT' variable, specifying the location of the new script to use.

If both the 'SWUPDATE_FILES_LIST' and 'SWUPDATE_FILES_TARGZ_FILE' variables are empty, a standard images
SWUpdate package will be generated instead.

Signed-off-by: David Escalona <david.escalona@digi.com>
2023-07-06 11:00:05 +02:00
David Escalona 96af1bd3de meta-digi-dey: dey-image: add new 'sw-versions' file to track system firmware version
https://onedigi.atlassian.net/browse/DEL-8574
https://onedigi.atlassian.net/browse/DEL-8575

Signed-off-by: David Escalona <david.escalona@digi.com>
2023-06-21 18:23:50 +02:00
Gabriel Valcazar 26798cfb93 imx-gpu-viv: avoid pulling in kernel-module-imx-gpu-viv
We used to use BAD_RECOMMENDATIONS to remove this package in ccimx6 builds,
we enable the imx-gpu-viv driver as built-in in our kernel, but this method
isn't working anymore. Instead, undo the specific RRECOMMENDS that pulls the
module in.

Apply the change for the aarch32 version of the package only, since this change
is only needed for the ccimx6 platforms.

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

Signed-off-by: Gabriel Valcazar <gabriel.valcazar@digi.com>
2023-06-06 10:26:41 +02: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
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 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
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
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
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
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
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
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
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 aaf2524a08 meta-digi-dey: implement class to generate installer zip package
It's not enabled by default. It's controlled by DEY_IMAGE_INSTALLER
variable in the project's local.conf.

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

Signed-off-by: Javier Viguera <javier.viguera@digi.com>
2017-02-02 13:32:18 +01:00
Javier Viguera 0732296873 dey-image: support building QT SDK for DEY images
The meta-qt5 layer provides a 'populate_sdk_qt5' class with all what's
needed to build a SDK based on an image recipe.

Inherit the class here so it's available for all DEY image recipes
depending on 'dey-qt' image feature.

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

Signed-off-by: Javier Viguera <javier.viguera@digi.com>
2015-12-01 19:35:06 +01:00
Javier Viguera 7f3e1a4d1a meta-digi-dey: use 'extrausers' class to set root password
This simplifies the code and as an extra allows to override the default
root password from the project's local.conf (setting MD5_ROOT_PASSWD
variable)

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

Signed-off-by: Javier Viguera <javier.viguera@digi.com>
2015-03-13 18:43:12 +01:00
Javier Viguera ef92164fb2 meta-digi-dey: use 'image-buildinfo' to create '/etc/build'
Poky added a new class that provides the same functionality we
implemented in our 'dey-image' class. So just use that class instead
of reimplementing it in our layer.

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

Signed-off-by: Javier Viguera <javier.viguera@digi.com>
2015-03-13 18:43:12 +01:00
Javier Viguera 8b2e4812fc meta-digi-dey: create sares-image bbclass
Remove 'dey-test' image feature and create a SARES bbclass with the
same functionality. This makes easier the creation of images suitable
for SARES testing just adding:

INHERIT += "sares-image"

to your project's local.conf

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

Signed-off-by: Javier Viguera <javier.viguera@digi.com>
2015-03-13 18:43:11 +01:00
Alex Gonzalez 36cdf24425 meta-digi-dey: move packagegroup definitions to distro configuration
After the upstream commit in d63c8a1597c9bd0a838cb59ca461ac432b630a90,
bitbake checks to see if the image feature has a valid packagegroup
associated.

For this check to work dey features need to be defined for all images,
not only dey images, so the definitions need to move to the distro
configuration file.

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

Signed-off-by: Alex Gonzalez <alex.gonzalez@digi.com>
Signed-off-by: Javier Viguera <javier.viguera@digi.com>
2014-01-17 13:27:37 +01:00
Javier Viguera 55ead71345 meta-digi: use SERIAL_CONSOLES instead of SERIAL_CONSOLE
SERIAL_CONSOLE variable has been deprecated in poky. The new
SERIAL_CONSOLES allows to configure multiple devices.

Signed-off-by: Javier Viguera <javier.viguera@digi.com>
2014-01-14 17:19:38 +01:00
Alex Gonzalez 8988542df3 meta-digi: Rename from DEL to DEY.
The final product will be called "Digi Embedded for Yocto" or DEY for
short.

This commit renames all relevant files.

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

Signed-off-by: Alex Gonzalez <alex.gonzalez@digi.com>
2013-06-12 13:18:37 +02:00