Commit Graph

1572 Commits

Author SHA1 Message Date
Gabriel Valcazar f416de4e91 hardknott: bump DEY version
Signed-off-by: Gabriel Valcazar <gabriel.valcazar@digi.com>
2022-01-05 11:09:46 +01:00
Gabriel Valcazar 120ff50370 meta-digi-dey: filter out the weston_9.0.0.imx recipe from meta-freescale
The weston recipe we ported from NXP's meta-imx layer has the same name,
causing warnings to appear when applying our patches. To avoid confusion,
ignore the meta-freescale version of the recipe so that ours is the only
option.

Signed-off-by: Gabriel Valcazar <gabriel.valcazar@digi.com>
(cherry picked from commit 9e68d61f7c465800d62913c044e43c541f2eacd7)
2022-01-03 11:54:00 +01:00
Gabriel Valcazar 02111d6f7a weston: make our .bbappend version-specific
Otherwise, the .bbappend applies to all existing weston recipes, and since our
patch is only available in our layer, bitbake will print warnings about the
patch not being found for those other recipes. This is harmless, since DEY
always uses NXP's version of weston, but it can be confusing, so avoid the
warnings altogether.

Signed-off-by: Gabriel Valcazar <gabriel.valcazar@digi.com>
(cherry picked from commit d4464a8211bff6b315a8ed5d094b8c25099f4130)
2022-01-03 11:53:48 +01:00
Gabriel Valcazar ef85b7d8f4 Merge tag 'dey-3.2-r2.2' into dey-3.2/master
Digi Embedded Yocto 3.2-r2.2

Manually changed recipes to use the master branches instead of the fixed SHA1
from the last release.

Signed-off-by: Gabriel Valcazar <gabriel.valcazar@digi.com>
2022-01-03 11:49:48 +01:00
Gabriel Valcazar 23d067b8b9 meta-digi: update revisions for dey-3.2-r2.2
Signed-off-by: Gabriel Valcazar <gabriel.valcazar@digi.com>
2021-12-09 18:12:40 +01:00
Arturo Buzarra c8c3381ba3 meta-digi: revert revisions to AUTOREV
Signed-off-by: Arturo Buzarra <arturo.buzarra@digi.com>
2021-12-02 23:26:47 +01:00
Arturo Buzarra 44ff44680f meta-digi: update revisions for dey-3.2-r2.1
Signed-off-by: Arturo Buzarra <arturo.buzarra@digi.com>
2021-12-02 23:26:47 +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
Gabriel Valcazar b97d824d38 busybox: add support to run mdev in daemon mode
This mode is necessary in the recovery initramfs to be able to properly detect
any external storage device that might contain an update package. The
configuration option associated with this mode became explicit after upgrading
busybox to v1.34.1, so enable it in our defconfig.

Signed-off-by: Gabriel Valcazar <gabriel.valcazar@digi.com>
2021-11-30 14:08:50 +01:00
Francisco Gil 24063490ea recovery-initramfs-init: fix condition for nand devices
The nand devices doesn't need to call the mount_cryptrootfs
script.

Reported-by: Francisco Gil <francisco.gilmartinez@digi.com>
Signed-off-by: Arturo Buzarra <arturo.buzarra@digi.com>
2021-11-25 08:41:03 +01:00
Gabriel Valcazar f3aab304c6 busybox: upgrade to v1.34.1
Backport the recipes from the honister poky branch. This version includes fixes
for several CVEs:

https://thehackernews.com/2021/11/14-new-security-flaws-found-in-busybox.html

Sync our defconfig with the latest version while keeping our custom config
changes.

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

Signed-off-by: Gabriel Valcazar <gabriel.valcazar@digi.com>
2021-11-16 13:16:34 +01:00
Hector Palacios 116fb5e203 meta-digi-dey: append 'dey' distro override to PACKAGECONFIG_remove
Some recipes were forcibly removing conflicting packages.
This does not allow to add those packages back for users that
want to use meta-digi layer, but a different distro than 'dey'.
With the 'dey' distro override, such removals are only done
if using this distro.

Reported-by: Michael Burr <michael.burr@digi.com>
Signed-off-by: Hector Palacios <hector.palacios@digi.com>

https://onedigi.atlassian.net/browse/DEL-7712
2021-11-12 09:01:44 +01:00
Hector Palacios fe2a1f281e Merge branch 'dey-3.2/master' into dey-3.2/maint
Signed-off-by: Hector Palacios <hector.palacios@digi.com>
2021-11-11 16:23:43 +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
Francisco Gil efa9d527a1 MM: Stop MM daemon before going to suspend
In the cc6ul we are not powering-off the supply of the XBee.
This is making that after a suspend/resume action the XBee
hangs due to ModemManager hasn't been stopped before the suspend.

Stopping ModemManager before going to suspend solves the issue.

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

Signed-off-by: Francisco Gil <francisco.gilmartinez@digi.com>
2021-11-08 16:17:50 +01:00
Arturo Buzarra d81444a574 swu-images: fix support to preinstallation script in swu update package
Since commit 11558352 ("swu-images: add "installed-directly" flag to
sw-description") the swu package images are streamed into the target without
any temporary copy to support devices with low memory available, that forces a
different order according with the swupdate documentation because scripts
should packed before the rest. This means that all the pre, post and shell
scripts will be executed after the images will be installed. This behavior
breaks the current support to mount the cryptorootfs node before install an
encrypted rootfs.

This commit moves the shell script to mount the cryptorootfs node to the
recovery initramfs and modifies the swupdate command line to call the shell
script before the images installation.

https://onedigi.atlassian.net/browse/CC8X-320

Signed-off-by: Arturo Buzarra <arturo.buzarra@digi.com>
2021-11-08 08:39:18 +01:00
Arturo Buzarra b03a2af5b2 recovery-initramfs-init: fix support to identify encrypted rootfs images
Since we added support for compressing rootfs images, we need to manage SWU
packages with a regular rootfs image and with compressed images. That support
was missing in the identification process when the SWU packet was verified.
This commit fixes the identification of compressed rootfs images.

https://onedigi.atlassian.net/browse/CC8X-320

Signed-off-by: Arturo Buzarra <arturo.buzarra@digi.com>
2021-11-08 08:22:11 +01:00
Gabriel Valcazar 4e303ab542 swu-images: remove ccimx6ul preinstallation script
Since commit bf8c73322b, the script is no longer
used, so remove it.

Signed-off-by: Gabriel Valcazar <gabriel.valcazar@digi.com>
2021-11-05 14:20:36 +01:00
Hector Palacios 71b3623b59 init-ifupdown: adapt recipe for read-only-rootfs
This recipe had a post install script to do the following:
 - create runlevel symlinks.
 - comment the 'auto' lines of /etc/network/interfaces if running on
   a non-Wi-Fi variant.
 - add Atheros or QCA bridge examples depending on the detected chip.
 - add wlan1 interface only if QCA chip is detected.

This post install cannot run on a read-only-rootfs so the recipe has been
reworked to do the same things at build time:

 - the runlevel symlinks have been removed because they are taken care
   of by a poky class.
 - add a pre-up condition (the existance of a wireless entry on the device
   tree) so that the interface is not brought up if the condition is not met.
 - for the cc6/cc6n, since the Wi-Fi chip can be Atheros or QCA, add
   specific wlan1 and br0 fragments with a pre-up condition basing on the
   detected ID of the Wi-Fi chip

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

https://onedigi.atlassian.net/browse/DEL-7708
2021-11-05 11:30:12 +01:00
Hector Palacios 0ba9b85574 hostapd: adapt recipe for read-only-rootfs
The access point configuration files are dynamically modified on a post
install script to generate an SSID name based on the last digits of the
MAC address (physical or virtual) assigned to a wlanX interface.

On read-only file systems, this is not possible, so add some conditional
code to the do_install() to use instead the $DIGI_FAMILY name.

Caveat: if several identical SOMs with read-only-rootfs co-exist on the
same network as APs, they will identify with the same SSID.

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

https://onedigi.atlassian.net/browse/DEL-7708
2021-11-05 11:18:16 +01:00
Javier Viguera c89a66480b meta-digi: remove postinst on target when using read-only-rootfs image feature
Signed-off-by: Javier Viguera <javier.viguera@digi.com>
2021-11-05 11:18:16 +01:00
Gabriel Valcazar f3210db348 ccimx6sbc: adapt recipes to support Atheros and Qualcomm wireless chips
Some packages require different scripts, configuration files or installations
depending on the wireless chip assembled on the target. In general, the way
to support both chips in one image is to have the recipes install both
versions of the aforementioned files, then leave only the strictly necessary
version once the wireless chip can be deduced.

In the case of the init-ifupdown recipe, this involves installing temporary
configuration fragments that are later erased. In the case of the standby
script, the logic can be implemented in a single file.

https://onedigi.atlassian.net/browse/DEL-7661
https://onedigi.atlassian.net/browse/DEL-7666

Signed-off-by: Gabriel Valcazar <gabriel.valcazar@digi.com>
2021-11-03 15:58:53 +01:00
Gabriel Valcazar dcd97799c9 ccimx6sbc: install Qualcomm-related packages along with the Atheros ones
The idea is to have the support for both chips co-exist in the same image, then
have the system detect which chip is being used during runtime.

https://onedigi.atlassian.net/browse/DEL-7661
https://onedigi.atlassian.net/browse/DEL-7666

Signed-off-by: Gabriel Valcazar <gabriel.valcazar@digi.com>
2021-11-03 15:58:53 +01:00
Gabriel Valcazar 7ea02c26aa qualcomm: adapt firmware and module recipes to be compatible with the ccimx6sbc
This allows the packages to be included in the ccimx6sbc images. While at it,
include the Qualcomm bluez patches in ccimx6 builds. These patches aren't
destructive, they simply add functionality required by the Qualcomm chip, so
they shouldn't have any secondary effects when using the Atheros chip.

https://onedigi.atlassian.net/browse/DEL-7661
https://onedigi.atlassian.net/browse/DEL-7666

Signed-off-by: Gabriel Valcazar <gabriel.valcazar@digi.com>
2021-11-03 15:58:53 +01:00
Arturo Buzarra 67c1ef2c9e recovery-initramfs-init: fix psplash communication FIFO path
The latest version of psplash changed the default path to store the
communication FIFO with other processes to "/run" to allow keeping the
information between reboots, however we are using this tool from an initramfs
where "/run" does not exist, producing multiple errors trying to write to a
nonexistent path, delaying the update process.

This commit forces psplash to use an existing path like "/tmp" to handle the
communication FIFO, because we don't need to maintain the update information.

https://onedigi.atlassian.net/browse/CC8X-318

Signed-off-by: Arturo Buzarra <arturo.buzarra@digi.com>
2021-10-29 11:26:43 +02:00
Arturo Buzarra 4a54512d64 recovery-initramfs-init: fix psplash communication FIFO path
The latest version of psplash changed the default path to store the
communication FIFO with other processes to "/run" to allow keeping the
information between reboots, however we are using this tool from an initramfs
where "/run" does not exist, producing multiple errors trying to write to a
nonexistent path, delaying the update process.

This commit forces psplash to use an existing path like "/tmp" to handle the
communication FIFO, because we don't need to maintain the update information.

https://onedigi.atlassian.net/browse/CC8X-318

Signed-off-by: Arturo Buzarra <arturo.buzarra@digi.com>
2021-10-29 09:35:53 +02:00
Francisco Gil 3334568347 bluez5: patch to fix CVE-2021-37577
This CVE is fixed in bluez 5.57

Signed-off-by: Francisco Gil <francisco.gilmartinez@digi.com>
2021-10-06 12:27:43 +02:00
Hector Palacios cc2df395c5 uboot: ccimx6ul: rename variable for single MTD system partition
Rename from 'ubisysvols' to 'singlemtdsys'.

Signed-off-by: Hector Palacios <hector.palacios@digi.com>
2021-09-29 13:44:50 +02:00
Gabriel Valcazar 1e19618157 linux-dey: add config fragment to enable SELinux configuration options
These options should only be enabled when using SELinux, so apply them only
when "selinux" is in the DISTRO_FEATURES. The fragment is a copy of the one in
meta-selinux with the addition of DEFAULT_SECURITY_DAC and LSM.

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

Signed-off-by: Gabriel Valcazar <gabriel.valcazar@digi.com>
2021-09-15 10:16:28 +02:00
Gabriel Valcazar abba0948a9 refpolicy: adapt reference policy to DEY prebuilt image features
The default policy provided by meta-selinux breaks a lot of the features in
DEY, so adapt it to make most features work. Note that this is simply an
example, end users should create their own policies for their own needs.

Make these changes toggleable so that users can use the reference policy
instead.

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

Signed-off-by: Gabriel Valcazar <gabriel.valcazar@digi.com>
2021-09-15 10:16:28 +02:00
Gabriel Valcazar a7b8288511 images: include packagegroup-core-selinux if "selinux" is in DISTRO_FEATURES
This packagegroup includes all of the userspace packages needed to use SELinux.
For now, use the same variant of the packagegroup, which contains all available
packages.

Since the meta-selinux layer isn't available in all platforms, implement this
change via a dynamic layer.

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

Signed-off-by: Gabriel Valcazar <gabriel.valcazar@digi.com>
2021-09-15 10:16:28 +02:00
Gabriel Valcazar 4876bc07b6 openssl: update to v1.1.1l
This fixes the following CVEs:

    * CVE-2021-3711
    * CVE-2021-3712

Port the recipe and patches from the dunfell poky branch, since the hardknott
version contains additional changes aside from the revision update.

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

Signed-off-by: Gabriel Valcazar <gabriel.valcazar@digi.com>
2021-09-13 16:53:57 +02:00
Gabriel Valcazar 8cb6075524 openssl: update to v1.1.1l
This fixes the following CVEs:

    * CVE-2021-3711
    * CVE-2021-3712

Port the recipe and patches from the dunfell poky branch, since the hardknott
version contains additional changes aside from the revision update.

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

Signed-off-by: Gabriel Valcazar <gabriel.valcazar@digi.com>
2021-09-13 16:33:09 +02:00
Hector Palacios 6910a11eab recovery: turn is_dualboot_enabled() into generic function
The new function compares the value of the variable with
one given as parameter.

Signed-off-by: Hector Palacios <hector.palacios@digi.com>
2021-09-09 17:38:44 +02:00
Hector Palacios ec08b1277a recovery-initramfs-init: add support for ubisysvols
Adapt the format_ubi_volume() function to wipe out UBI volumes
instead of formatting MTD partitions.

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

https://onedigi.atlassian.net/browse/DEL-7614
2021-09-09 17:38:44 +02:00
Hector Palacios 9352fc1395 digi: [cosmetic] remove final slash from Digi remotes and move it to recipes
Signed-off-by: Hector Palacios <hector.palacios@digi.com>
2021-09-07 11:01:29 +02:00
Hector Palacios 90706f5d39 recovery: free strings returned by uboot_getenv()
The function uboot_getenv() is a wrapper over libuboot_get_env() and
requires that the returned strings are freed when no longer in use.

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

https://onedigi.atlassian.net/browse/DEL-7645
(cherry picked from commit 27ce7a4f20)
2021-08-27 12:49:31 +02:00
Hector Palacios c93945c995 recovery: [cosmetic] replace whitespaces with tabs where appropriate
Signed-off-by: Hector Palacios <hector.palacios@digi.com>
(cherry picked from commit f806979c84)
2021-08-27 12:49:25 +02:00
Hector Palacios 846bccc8bf recovery: rework is_dualboot_enabled() function
- The function is only used internally in this file, so make it static.
- Convert the function from 'int' to 'bool', since no other values are
  evaluated.
- Only return true if the variable 'dualboot' is set to 'yes'. Before,
  the function returned true if 'dualboot' was different than 'no'.

Signed-off-by: Hector Palacios <hector.palacios@digi.com>
(cherry picked from commit 9a519570ba)
2021-08-27 12:49:22 +02:00
Hector Palacios 53759cd29c recovery: check variable returned by uboot_getenv() is not NULL
The use of this function, which is a wrapper over libuboot_get_env(),
requires checking if the returned string is NULL.
Manipulations of such string without checking whether it's NULL may lead
to segfault errors.
This was seen during firmware update on a device that didn't have the
'dualboot' variable set.

Reported-by: Chandrababu Pigilam <chandrababu.pigilam@digi.com>
Signed-off-by: Hector Palacios <hector.palacios@digi.com>

https://onedigi.atlassian.net/browse/DEL-7645
(cherry picked from commit 8a4484bbd6)
2021-08-27 12:49:16 +02:00
Hector Palacios 27ce7a4f20 recovery: free strings returned by uboot_getenv()
The function uboot_getenv() is a wrapper over libuboot_get_env() and
requires that the returned strings are freed when no longer in use.

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

https://onedigi.atlassian.net/browse/DEL-7645
2021-08-25 16:20:43 +02:00
Hector Palacios f806979c84 recovery: [cosmetic] replace whitespaces with tabs where appropriate
Signed-off-by: Hector Palacios <hector.palacios@digi.com>
2021-08-25 16:20:43 +02:00
Hector Palacios 9a519570ba recovery: rework is_dualboot_enabled() function
- The function is only used internally in this file, so make it static.
- Convert the function from 'int' to 'bool', since no other values are
  evaluated.
- Only return true if the variable 'dualboot' is set to 'yes'. Before,
  the function returned true if 'dualboot' was different than 'no'.

Signed-off-by: Hector Palacios <hector.palacios@digi.com>
2021-08-25 16:20:43 +02:00
Hector Palacios 8a4484bbd6 recovery: check variable returned by uboot_getenv() is not NULL
The use of this function, which is a wrapper over libuboot_get_env(),
requires checking if the returned string is NULL.
Manipulations of such string without checking whether it's NULL may lead
to segfault errors.
This was seen during firmware update on a device that didn't have the
'dualboot' variable set.

Reported-by: Chandrababu Pigilam <chandrababu.pigilam@digi.com>
Signed-off-by: Hector Palacios <hector.palacios@digi.com>

https://onedigi.atlassian.net/browse/DEL-7645
2021-08-25 16:20:24 +02:00
Gabriel Valcazar feec2aa4f7 glib-2.0: backport 2.65 patch to prevent NetworkManager segmentation faults
NetworkManager's main library went through a major overhaul in v1.22, changing
the way it interacts with glib among other things. When using a NetworkManager
version equal or newer than v1.22 along with a glib version between 2.63.3 and
2.65, a race condition can happen, randomly causing segmentation faults.

Since Yocto 3.2 uses NetworkManager 1.22.14 and glib 2.64.5, the race condition
is reproducible, but it can be fixed with the patch introduced in this commit.
The patch in question is commit e4a690f5dd959e74b2d6054826f61509892c8aa7 in the
glib git repo.

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

Signed-off-by: Gabriel Valcazar <gabriel.valcazar@digi.com>
2021-08-16 15:26:40 +02:00
Gabriel Valcazar 78e8a75ff2 glib-2.0: backport 2.65 patch to prevent NetworkManager segmentation faults
NetworkManager's main library went through a major overhaul in v1.22, changing
the way it interacts with glib among other things. When using a NetworkManager
version equal or newer than v1.22 along with a glib version between 2.63.3 and
2.65, a race condition can happen, randomly causing segmentation faults.

Since Yocto 3.2 uses NetworkManager 1.22.14 and glib 2.64.5, the race condition
is reproducible, but it can be fixed with the patch introduced in this commit.
The patch in question is commit e4a690f5dd959e74b2d6054826f61509892c8aa7 in the
glib git repo.

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

Signed-off-by: Gabriel Valcazar <gabriel.valcazar@digi.com>
2021-08-11 12:38:10 +02:00
Mike Engel c5b57d3e0c ml-security: update to new version
This commit updates the ML security package to
hardknott-5.10.35-2.0.0 release by NXP.

Signed-off-by: Mike Engel <Mike.Engel@digi.com>
2021-08-11 10:39:26 +02:00
Mike Engel 37832e8b3b glibc: upgrade to version 2.33 for eIQ support
Signed-off-by: Mike Engel <Mike.Engel@digi.com>
2021-08-11 10:39:26 +02:00
Mike Engel 11b1aee7e7 opencv: update to latest NXP eIQ version
This commit updates the eIQ support to the hardknott-5.10.35-2.0.0
release by NXP.

Signed-off-by: Mike Engel <Mike.Engel@digi.com>
2021-08-11 10:39:25 +02:00