Commit Graph

2035 Commits

Author SHA1 Message Date
Hector Palacios 32f4ba9b6d tf-a-stm32mp: obtain password to use during FIP image signing process
The FIP image is signed internally by this recipe. The password must be
set in FIP_SIGN_KEY_PASS. With the signing script, the password is
randomly generated and saved in key_pass.txt.
This prefunc obtains the password(s) from the file to set FIP_SIGN_KEY_PASS
so that the FIP can be properly signed.

Signed-off-by: Hector Palacios <hector.palacios@digi.com>
2023-05-10 17:33:23 +02:00
Hector Palacios d6af2d336c tf-a-stm32mp: automate the signing of TF-A image
Add as deploy postfunc, the signing of TF-A image by calling Digi signing
script.

Signed-off-by: Hector Palacios <hector.palacios@digi.com>
2023-05-10 17:33:23 +02:00
Hector Palacios fa1c877758 trustfence: image_types: do not sign artifacts for STM platforms
For the moment, do not sign aditional artifacts, such as the ramdisk,
the kernel or the boot scripts for STM platforms.

In the specific case of the ramdisk, simply copy it over with the
expected filename extension.

Signed-off-by: Hector Palacios <hector.palacios@digi.com>
2023-05-10 17:33:23 +02:00
Hector Palacios 13c136dbc5 trustfence: add recipe to generate the PKI tree
Several recipes depend on the PKI creation.
Create a small recipe to just run this function which
is moved from the trustfence.bbclass.

Signed-off-by: Hector Palacios <hector.palacios@digi.com>
2023-05-10 17:33:23 +02:00
Hector Palacios f6738c3cb2 trustfence: add artifacts signing script for STM platforms
This script can be called stand-alone or from DEY.
Syntax is :
  trustfence-sign-artifact.sh -p <platform> [-t input-unsigned-image> <output-signed-image>]

If files are omitted, it at least generates random keys if they do not
exist.

Signed-off-by: Hector Palacios <hector.palacios@digi.com>
2023-05-10 17:33:23 +02:00
Hector Palacios 762a4a8315 u-boot-dey: split do_deploy:append to postfuncs
The do_deploy:append did three things:
- adapt the U-Boot filenames to 'u-boot-<platform>-<config>.<ext>'
- sign/encrypt the U-Boot files (only for iMX6 family)
- sign the boot scripts

Convert the first two actions into functions (the third already was) and
call them conditionally as postfuncs.
Also skip the signing of U-Boot files if the platform is not based on
iMX6 family.

Signed-off-by: Hector Palacios <hector.palacios@digi.com>
2023-05-10 17:33:23 +02:00
Hector Palacios 9b165196bb global: create DIGI_SOM variable and reformulate DIGI_FAMILY variable
Certain platforms share a processor family but need to be differentiated
between them. DEY was using the variable DIGI_FAMILY as the SOM name
rather than the family. It becomes useful to have both (DIGI_SOM as the
more specific, and DIGI_FAMILY as the more generic).

This is the case, for example, of:

- ccmp1 (family)
  - ccmp15 (SOM)
  - ccmp13 (SOM)
- ccimx8m (family)
  - ccimx8mm (SOM)
  - ccimx8mn (SOM)

Both variables are used on the machine overrides.
Where DIGI_FAMILY was used, use now DIGI_SOM.

Signed-off-by: Hector Palacios <hector.palacios@digi.com>
2023-05-10 17:33:23 +02:00
Hector Palacios 39dd22c471 trustfence: add recipe to install STM sign tools
This recipe downloads a tarball that contains the binaries:
- STM32MP_KeyGen_CLI
- STM32MP_SigningTool_CLI

from ST Microelectronics STM32CubeProgrammer v2.12.0.

Signed-off-by: Hector Palacios <hector.palacios@digi.com>
2023-05-10 17:33:23 +02:00
Hector Palacios 1a81de2c2f trustfence-sign-tools: rename sign script with SOC vendor suffix
This is in preparation of using the same script name for different SOC
vendors (NXP and STM).

Signed-off-by: Hector Palacios <hector.palacios@digi.com>
2023-05-10 17:33:23 +02:00
Hector Palacios 74ed606339 trustfence: use conditionals for NXP-specific stuff
Set TRUSTFENCE_DEK_PATH to "0" for CCMP1 (not using dek.bin), as if this
was disabled.
Set temporarily TRUSTFENCE_ENCRYPT_ENVIRONMENT to "0" for CCMP1 until
environment encryption is fully supported.

Signed-off-by: Hector Palacios <hector.palacios@digi.com>
2023-05-10 17:33:23 +02:00
Hector Palacios 3229e37e88 trustfence-sign-tools: make dependency of cst-tool NXP-specific
While on it, merge the two RDEPENDS assignments in one.

Signed-off-by: Hector Palacios <hector.palacios@digi.com>
2023-05-10 17:33:23 +02:00
Hector Palacios 090c4f6616 trustfence-sign-tools: convert DEPENDS to RDEPENDS
Dependencies of this recipe are run-time dependencies, not build-time.
While on it, move them to specific native/nativesdk recipe.

Signed-off-by: Hector Palacios <hector.palacios@digi.com>
2023-05-10 17:33:23 +02:00
Hector Palacios dda629e968 trustfence-sign-tools: split recipe into native and nativesdk
This recipe builds the script (that depends on cst-tool) that is used to
sign the images. It's only run natively.

Signed-off-by: Hector Palacios <hector.palacios@digi.com>
2023-05-10 17:33:23 +02:00
Hector Palacios 56f323044c global: rename DEY_BUILD_PLATFORM to DEY_SOC_VENDOR
The name of the variable was not very intuitive of what
it contains. This variable expands to the SoC vendor
(NXP or STM).

Signed-off-by: Hector Palacios <hector.palacios@digi.com>
2023-05-10 17:33:23 +02:00
Arturo Buzarra 30ce41ad5b meta-digi: fix binary names in Google Coral recipes
Commit 065cf3e9 ("kirkstone migration: general update to the new override
syntax") incorrectly renamed binaries in a massive change. This commit restores
the binary names to the original.

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

Signed-off-by: Arturo Buzarra <arturo.buzarra@digi.com>
2023-05-10 09:11:19 +02:00
Tatiana Leon 70b0a17b0e cloudconnector: new variable to allow custom cloudconnector package definition
By default, our 'cloudconnector' package is installed.
This can be overriden by defining 'CLOUDCONNECTOR_PKG' in the 'local.conf'
with the custom package that includes this application.

Signed-off-by: Tatiana Leon <Tatiana.Leon@digi.com>
2023-05-09 11:47:25 +02:00
Gabriel Valcazar 163b229beb Move Coral-related recipes to dynamic Freescale layer
These are recipes we created to support Google Coral on i.MX platforms. ST's
machine learning layer provides similar recipes, so to avoid conflicts, move
the recipes meant for i.MX platforms to a dynamic layer.

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

Signed-off-by: Gabriel Valcazar <gabriel.valcazar@digi.com>
2023-05-08 13:00:59 +02:00
Gabriel Valcazar faa2ce67d4 Remove meta-st-stm32mpu-ai dependency with st-openstlinux layer
This dependency is only required if you wish to build ST's reference images,
which isn't our case. Add said reference images' recipes to the BBMASK to
avoid build errors.

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

Signed-off-by: Gabriel Valcazar <gabriel.valcazar@digi.com>
2023-05-08 13:00:59 +02:00
Javier Viguera 9141451583 meta-digi: cosmetic, delete machine variants dead code
We removed machine variants support years ago.

Signed-off-by: Javier Viguera <javier.viguera@digi.com>
2023-05-05 14:39:34 +02:00
Isaac Hermida 181ce4761a cc93: iw612: rename name of main wlan interface
rename interface sta_name to be "wlan0" instead of "mlan0", so it keeps
compatibility with other platforms.

Signed-off-by: Isaac Hermida <isaac.hermida@digi.com>
2023-05-05 14:00:01 +02:00
Javier Viguera d193b5e3a7 ccimx93: add NPU overlay
Support for Ethos NPU has been enabled in the kernel.

Signed-off-by: Javier Viguera <javier.viguera@digi.com>
2023-05-04 18:25:28 +02:00
Javier Viguera eb1bc0eeb3 meta-digi-arm: fix regression in optee userspace support
OPTEE_PKGS variable must have a default (empty) value to prevent bitbake
parsing errors.

This fixes a build failure for MP1 platforms where the variable was
undefined in the commit that added the support.

Signed-off-by: Javier Viguera <javier.viguera@digi.com>
2023-05-04 18:24:36 +02:00
Javier Viguera 28f57c5fcd remove-pkg-postinst-ontarget: support other runtime packages
A recipe may generate different runtime packages, with names other than
PN. This commit allows removing the ontarget postinst script for those
other runtime package names. To do so, just define REMOVE_POSTINST_RPN
before including this class in the recipe.

The first user is in the following commit.

Signed-off-by: Javier Viguera <javier.viguera@digi.com>
2023-05-04 10:22:06 +02:00
Javier Viguera beb9fd02e6 meta-digi-arm: add optee userspace for IMX platforms that support it
NXP platforms that have 'optee' in the MACHINE_FEATURES, will install
optee userspace packages (ccimx8m and ccimx93 at the moment).

Signed-off-by: Javier Viguera <javier.viguera@digi.com>
2023-05-03 18:32:21 +02:00
Isaac Hermida 5f5855744d init-ifupdown: ccimx93: add p2p and AP support
https://onedigi.atlassian.net/browse/DEL-8346

Signed-off-by: Isaac Hermida <isaac.hermida@digi.com>
2023-04-20 17:05:00 +02:00
Isaac Hermida fb9a3c9814 nxp-wlan-sdk: iw612-sdk: add nxp tools
Add nxp-wlan-sdk repice as a verbatim copy and add our bbappend
for fixing the build.
This recipe include some tools, mainly for RF porpouses.

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

Signed-off-by: Isaac Hermida <isaac.hermida@digi.com>
2023-04-20 17:05:00 +02:00
Gonzalo Ruiz 7b2339869a ccmp1: add BT Test overlay to the default images
Add the overlay required to perform the BLE HCI Raw test to the
linux default images. That way, default images can be used to certify
the product.

Signed-off-by: Gonzalo Ruiz <Gonzalo.Ruiz@digi.com>
2023-04-20 13:54:54 +02:00
Hector Bujanda c981548c19 ccx: fix some outdated files so implementation matches 'cctags api’ repository
1)
CcxTagControlData struct in CORE/HDD/inc/CcxTagDefs.h had some fields missing compared
with 'cctags api’ which was producing CCX_TAG_DRVR_RSP_ERR_CTRL_SIZE.

2)
Then CCX_TAG_DRVR_RSP_ERR_PACKET_SIZE aroused because following paddings:
	CCX_TAG_MPDU_HEADER_PAD_SIZE = 2
	CCX_TAG_CONTENT_HEADER_PAD_SIZE = 3
where producing wrong alignements and sizes between the 'cctags api’ and the driver.

With changes in this commit, master branch of ‘CCxTagTest’ repository compiled
out of source code gets on well with 'cctags api’ repository and with qca driver in
both dey-2.4 and dey4.0.
Packets in the air match 100% in content in both dey-2.4 and dey4.0.

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

Signed-off-by: Hector Bujanda <hector.bujanda@digi.com>
2023-04-20 10:59:12 +02:00
Gabriel Valcazar 0fcd8906d4 Revert "imx-digi-base: add dummy MULTIUBI_BUILD value to fix Vigiles builds"
An official fix was added to meta-timesys in commit
ae4f6e9854361d4a6d71b6f8b87130268d990b32, so our workaround is no longer needed

This reverts commit 7a77130550.

Signed-off-by: Gabriel Valcazar <gabriel.valcazar@digi.com>
2023-04-19 11:19:55 +02:00
Hector Palacios 0e61017da8 libubootenv: add fall-back function to read HWID from nvmem
The HWID is populated on the device tree by the boot loader.
This can be used as a key modifier when encrypting the U-Boot
environment. Some old U-Boot versions however, did not populate
the HWID on the device tree. When updating firmware from an
old version to a new one, the library may not be able to read
the HWID from the DT and then be unable to unencrypt the
environment.

This patch implements a fall-back function to read the HWID
directly from the nvmem node (sysfs). Implementation has been
done for ccimx6 family only, where this case of old U-Boot
can happen.

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

https://onedigi.atlassian.net/browse/DEL-8444
(cherry picked from commit 222a91f213)
2023-04-19 09:39:43 +02:00
Tatiana Leon 8718734b46 ccimx6: ccimx6ul: ccimx8m: ccimx8x: ccimx93: install: only install system A by default, add an option to install B
https://onedigi.atlassian.net/browse/DEL-8232

Signed-off-by: Tatiana Leon <Tatiana.Leon@digi.com>
2023-04-18 17:49:03 +02:00
Gabriel Valcazar c9fb56629a cryptoauthlib: use digi-embedded github mirror
The commit we use to build the cryotpauthlib package is currently not part of
any branches or tags in the original MicrochipTech repo. To make sure the
package can always be built, use our mirror of the repo, which includes an
additional branch for the specific commit.

While at it, move the "nobranch=1" parameter to the GIT_URI variable, since
we're putting all other git parameters there, anyway. Also, remove the "branch"
parameter because it isn't needed in this case.

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

Signed-off-by: Gabriel Valcazar <gabriel.valcazar@digi.com>
2023-04-17 17:51:03 +02:00
Javier Viguera 7581e76560 nativesdk-packagegroup-sdk-host: add requirementes to build optee-os
Building optee-os with a Yocto generated SDK, fails due to those missing
packages.

Signed-off-by: Javier Viguera <javier.viguera@digi.com>
2023-04-17 12:37:32 +02:00
Gabriel Valcazar 7a77130550 imx-digi-base: add dummy MULTIUBI_BUILD value to fix Vigiles builds
Commit 32dd3d59c250f916115b339c29aa4dbfe50a3235 in poky breaks i.MX platform
builds when "vigiles" is inherited. While we wait for a fix in the community,
work around this issue by setting a dummy default value in the MULTIUBI_BUILD
variable.

Signed-off-by: Gabriel Valcazar <gabriel.valcazar@digi.com>
2023-04-11 17:25:00 +02:00
Javier Viguera 0f2f513f8b ccimx93: add more device tree overlays
Second ethernet and MikroE click board overlays.

Signed-off-by: Javier Viguera <javier.viguera@digi.com>
2023-04-03 18:39:35 +02:00
David Escalona bf88deb602 mount_digiparts.sh: add unit running check for systemd devices
For devices running 'systemd', the mount process is done through 'systemd-mount', which
spawns a system unit. Trying to mount the partition again throws an error stating that a
unit with the same name is already running. To avoid it, check if the unit is already
spawned before mounting the partition and, if so, just restart the unit.

Signed-off-by: David Escalona <david.escalona@digi.com>
2023-03-27 17:36:32 +02:00
Isaac Hermida 060e2f4fe1 ccimx93-dvk.conf: include WiFi and BT features support
https://onedigi.atlassian.net/browse/DEL-8346
2023-03-27 16:34:06 +02:00
Isaac Hermida 38831535fb ccimx93: iw612: add WiFi support
https://onedigi.atlassian.net/browse/DEL-8346

Signed-off-by: Isaac Hermida <isaac.hermida@digi.com>
2023-03-27 16:34:06 +02:00
Isaac Hermida 4200b2f06a add nxp-wlan-sdk and kernel-module-nxp-wlan NXP verbatim copies
add a verbatim copy of those recipes as they are provided by nxp in langdale-6.1.1-1.0.0

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

Signed-off-by: Isaac Hermida <isaac.hermida@digi.com>
2023-03-27 12:53:40 +02:00
Javier Viguera c01c394806 meta-digi: rework distro features configuration
Instead of changing POKY_DEFAULT_DISTRO_FEATURES, do the distro features
configuration directly in the DISTRO_FEATURES variable. Also, add a couple
of variables (MACHINE_DISTRO_FEATURES_ADD/REMOVE) that allow machines
for extra tweaking the distro features.

While on it, clean up some distro features:

  - pulseaudio: already added by DISTRO_FEATURES_BACKFILL
  - bluez5, splashscreen, initrd, gplv3: not used (dead code)

Signed-off-by: Javier Viguera <javier.viguera@digi.com>
2023-03-22 11:46:53 +01:00
Isaac Hermida c30b947408 kernel-module-qualcomm: add script to load the wlan module
In rare cases, the wlan module may fail to load. In this scenario, forcing the
MMC driver to rebind the interface resolves the issue, making the WLAN module
load more reliably.
This only affects to modules where the qca chip is connected through the
MMC interface.

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

Signed-off-by: Isaac Hermida <isaac.hermida@digi.com>
2023-03-22 10:46:19 +01:00
Javier Viguera d76bb3ac2c machine: restrict udev extra rules to systemd or udevd device managers
There are other device managers (e.g. mdev) that do not understand those
udev rules, so do not install them unconditionally.

Signed-off-by: Javier Viguera <javier.viguera@digi.com>
2023-03-21 17:05:15 +01:00
Hector Palacios 661f59967c trustfence: add function to generate a PKI tree if it doesn't exist
The stand-alone signing script 'trustfence-sign-artifact.sh' checks
if a valid PKI tree exists (by checking the existance of four SRK
files) and if they don't, it calls trustfence-gen-pki.sh (which is
a wrapper over different generators (for HAB or AHAB) to create one.

Recipes such as 'dualboot' or 'recovery-initramfs' may need to call
openssl functions over the PKI tree. These recipes do not currently
generate the PKI tree; they expect it to be already in place.
This might not be the case if the trustfence-sign-artifact.sh script
has not been called yet.

Originally, a fake dependency on virtual/kernel recipe was made to
force it, but it doesn't quite work since the calling only happens
on deploy() while regular DEPENDS doesn't wait for this task.
If the PKI does not exist, a recipe that requires the PKI tree will
fail.

The solution is to create a function on the trustfence.bbclass that
allows any recipe to check for the existance of a PKI tree and
generate it if it doesn't exist. This is repeated inside the
trustfence-sign-artifact.sh, but it needs to be in both places
because this script must work stand-alone.

The generation of the PKI tree takes some seconds so this commit
adds a lock dir to prevent race conditions when called from
different recipes.

It also removes the fake dependency on virtual/kernel and adds a
dependency on trustfence-cst-native (which is the recipe that
provides the PKI generation tool).

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

https://onedigi.atlassian.net/browse/DEL-8430
(cherry picked from commit 6a8bf7afff)
2023-03-21 13:36:58 +01:00
Javier Viguera 4ef4794f20 Merge tag 'dey-4.0-r2.2' into dey-4.0/master
Digi Embedded Yocto 4.0-r2.2

Signed-off-by: Javier Viguera <javier.viguera@digi.com>
2023-03-20 11:05:11 +01:00
Francisco Gil b59f31c114 meta-digi: update revisions for dey-4.0-r2.2
Signed-off-by: Francisco Gil <francisco.gilmartinez@digi.com>
2023-03-10 15:46:34 +01:00
Arturo Buzarra 358a7cc414 meta-digi: revert revisions to AUTOREV
Signed-off-by: Arturo Buzarra <arturo.buzarra@digi.com>
2023-03-08 18:59:27 +01:00
Arturo Buzarra de3ba53ef3 meta-digi: update revisions for dey-4.0-r2.1
Signed-off-by: Arturo Buzarra <arturo.buzarra@digi.com>
2023-03-08 18:58:58 +01:00
Tatiana Leon ef9e14ab5b pulseaudio: launch pulseaudio in system mode
By launching in system mode it is possible to play music from a shell using
pulseaudio. With change all platforms and images (with or without graphical
support) have pulseaudio working.

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

Signed-off-by: Tatiana Leon <Tatiana.Leon@digi.com>
2023-03-08 12:05:52 +01:00
Arturo Buzarra e7b0a7affc cmp15: apply DT overlay for the DVK v1 on boards without board_version defined
This commit modifies the boot script condition to apply the overlay for DVK v1
on boards without the board_version variable defined.

Signed-off-by: Arturo Buzarra <arturo.buzarra@digi.com>
2023-03-08 10:57:05 +01:00
Hector Palacios ea9a34f205 ccmp15/ccmp13: remove rs232 device tree overlays
These overlays have been removed from the kernel.

Signed-off-by: Hector Palacios <hector.palacios@digi.com>
2023-03-07 18:14:20 +01:00