Commit Graph

590 Commits

Author SHA1 Message Date
Alejandro Navarro 45f84286a3 pulseaudio: disable memfd for CC6
Pulseaudio 9.0 relies on the syscall memfd_create, which was introduced
in kernel 3.17, but the version currently supported for the CC6 SBC is
3.14.

There is a corner case where the configure script does not detect the
actual kernel version, thus enabling memfd_create. When Pulseadio tries
to call memfd_create, it shows error messages, so disable memfd
explicitly.

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

Signed-off-by: Alejandro Navarro <alejandro.navarro@digi.com>
2017-04-27 16:59:57 +02:00
Mike Engel d3bb596732 meta-digi: revert revisions to AUTOREV
Signed-off-by: Mike Engel <Mike.Engel@digi.com>
2017-04-26 13:51:58 +02:00
Mike Engel 9fed79fd45 meta-digi: update revisions for dey-2.2-r1.3
Signed-off-by: Mike Engel <Mike.Engel@digi.com>
2017-04-26 13:48:57 +02:00
Javier Viguera bc8ac0507d init-ifupdown: disable wlan interfaces on non-wireless variants
Added a post-installation script to disable the wireless interfaces on
module variants without wireless support.

This fixes following messages on boot:

wlan: driver load failure
modprobe: can't load module wlan (extra/wlan.ko): No such device
...

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

Signed-off-by: Javier Viguera <javier.viguera@digi.com>
2017-04-21 16:53:32 +02:00
Javier Viguera a7105c70d0 init-ifupdown: remove wrong sed command
This 'sed' command was used in the past, when DHCP or MANUAL was
configured in the '/etc/network/interfaces' (for cellular). This is no
longer true as we always configure the interface with a custom (manual)
script.

This was breaking the rest of interfaces when configured to use 'dhcp':

iface eth0 inet manual
       umanualc_opts -S -b >/dev/null &

Signed-off-by: Javier Viguera <javier.viguera@digi.com>
2017-04-20 13:56:52 +02:00
Javier Viguera b56bdf126c modemmanager: add B230400 and B921600 missing baudrates
So they can be used by MM to open the serial port (configured via udev
tags).

Signed-off-by: Javier Viguera <javier.viguera@digi.com>
2017-04-20 13:56:52 +02:00
Javier Viguera 682d77e414 modemmanager: add more retries for port AT probing
Launching the MM on target's boot fails to detect the XBee cellular
because this needs more time to complete the initialization. So add some
more retries for the AT port probing to allow the XBee cellular to be
detected.

Signed-off-by: Javier Viguera <javier.viguera@digi.com>
2017-04-20 13:56:52 +02:00
Javier Viguera 68df122989 modemmanager: enable log file
Instead of redirecting the MM logging to '/dev/null' use a file, so we
can see what's going on in case of failure.

Signed-off-by: Javier Viguera <javier.viguera@digi.com>
2017-04-20 13:56:52 +02:00
Javier Viguera 3de76b2eae modemmanager: update revision to get flow control patches from repo
The flow control patches have been merged to the master branch, so
update the revision to remove those patches from our layer.

This reverts commit a7c51af5b8.

Signed-off-by: Javier Viguera <javier.viguera@digi.com>
2017-04-20 13:56:52 +02:00
Diaz de Grenu, Jose b75f48d1dc sysinfo: escape wildcard
Sysinfo was showing error messages if the working directory contains any file
with .log extension.

Signed-off-by: Diaz de Grenu, Jose <Jose.DiazdeGrenu@digi.com>
2017-04-19 10:57:26 +02:00
Mike Engel 247df66459 meta-digi: revert revisions to AUTOREV
Signed-off-by: Mike Engel <Mike.Engel@digi.com>
2017-04-12 11:45:47 +02:00
Mike Engel 4ba24391c2 meta-digi: update revisions for dey-2.2-r1.2
Signed-off-by: Mike Engel <Mike.Engel@digi.com>
2017-04-12 11:45:47 +02:00
Tatiana Leon b7facb3ff5 recovery init: log messages to the stderr instead of to stdout
Signed-off-by: Tatiana Leon <tatiana.leon@digi.com>
2017-04-11 14:30:17 +02:00
Tatiana Leon 15214a198e recovery init: check the update package before setting a key and/or formatting
The recovery init checks if the configured update package exists and it is valid
before setting a new key and/or formatting the rootfs partition.

This change avoids getting non-booting devices after performing a firmware
update with a non-existing or invalid update package.

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

Signed-off-by: Tatiana Leon <tatiana.leon@digi.com>
2017-04-11 14:30:17 +02:00
Alejandro Navarro 36d35d2ed4 sysinfo: add new wireless configuration files
We have introduced new default configuration files for wireless that do
not show on sysinfo, so add them if they exist.

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

Signed-off-by: Alejandro Navarro <alejandro.navarro@digi.com>
2017-04-11 11:31:59 +02:00
Javier Viguera a7c51af5b8 modemmanager: add flow control patch series
https://jira.digi.com/browse/DEL-3841

Signed-off-by: Javier Viguera <javier.viguera@digi.com>
2017-04-07 19:45:27 +02:00
Javier Viguera f67e7e949b modemmanager: add udev rules for XBee cellular
These rules are needed so the modem is detected.

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

Signed-off-by: Javier Viguera <javier.viguera@digi.com>
2017-04-07 19:45:27 +02:00
Javier Viguera a774da80be modemmanager: new recipe to build from git repository
The XBee cellular support is at the moment only in modemmanager's git
repository (master branch).

Also remove one Telit patch from the bbappend because it's already
included in the git repo.

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

Signed-off-by: Javier Viguera <javier.viguera@digi.com>
2017-04-07 19:45:27 +02:00
Javier Viguera ad122d2605 libqmi: new recipe for version 1.18.0
This version of libqmi is needed for newer versions of ModemManager.

Remove bbappend and patch to previous version as the patch is now
included in the new version.

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

Signed-off-by: Javier Viguera <javier.viguera@digi.com>
2017-04-07 19:45:27 +02:00
Hector Palacios 505eb19aa4 hostapd: let start-stop-daemon create PID and background process
The current script cannot launch the hostapd twice (for dual HostAP mode)
because start-stop-daemon finds an already existing PID for hostapd after
running the first instance.

The solution is:
 - Do not launch the hostapd in background (so that it does not fork the
   process, which assigns a different PID)
 - Use -b option of start-stop-daemon so that it launches the daemon in
   the background.
 - Let start-stop-daemon create the PID (since the hostapd will not fork
   now this PID will match the hostapd process, allowing to kill it later)

This solution also hides the hostapd log messages that appeared before.

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

https://jira.digi.com/browse/DEL-4045
2017-04-07 12:28:14 +02:00
Hector Palacios 2dcf33b283 hostapd: parametrize hostapd init script per interface
The original init script hardcodes the configuration file to use so it
cannot be re-utilized for concurrent AP/AP mode where two interfaces can
be used as SoftAP.

This commit uses the variable ${IFACE} to:
- select a specific configuration file per interface:
  /etc/hostapd_${IFACE}.conf
- create a specific PID file per interface:
  /var/run/hostapd.${IFACE}.pid

With this, the /etc/network/interfaces can use the script for using SoftAP
in different wireless interfaces.

Signed-off-by: Hector Palacios <hector.palacios@digi.com>
2017-04-05 18:15:27 +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
David Escalona 5a2b538bcd bluetooth-init: force hardware-init script to be executed first
- The Bluetooth daemon was always executed before setting up the
  hardware, generating several problems specifically in the CCIMX6SBC.
  This was causing the Bluetooth driver to override the Bluetooth name
  and alias, as well as avoiding any host function on Bluetooth profiles.
  Only pairing and ping was working, as well as client profile sides.
- This change also fixes some issues in the CCIMX6UL platforms with the
  Bluetooth daemon failing to perform several bluetoothctl operations.

https://jira.digi.com/browse/DEL-4000
https://jira.digi.com/browse/DEL-4015

Signed-off-by: David Escalona <david.escalona@digi.com>
2017-03-30 18:02:13 +02:00
David Escalona 98d514c1c2 dey-examples-hdp: update sample to python3
- Some Python modules are no longer available in DEY-2.2 since
  the official supported Python version is now 3. This caused the
  HDP application to fail importing some of the old modules. For this
  reason the sample application has been updated to use Python3
  syntax and modules.

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

Signed-off-by: David Escalona <david.escalona@digi.com>
2017-03-29 09:25:52 +02:00
Tatiana Leon c1709e4fd3 meta-digi: revert revisions to AUTOREV
Signed-off-by: Tatiana Leon <tatiana.leon@digi.com>
2017-03-28 18:54:25 +02:00
Tatiana Leon 28bc61a089 meta-digi: update revisions for dey-2.2-r1.1
Signed-off-by: Tatiana Leon <tatiana.leon@digi.com>
2017-03-28 18:20: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
Sebastian Pastor da6e2198b1 sysinfo: Add information about I/O Expander if present
Print the HW and FW versions for the I/O Expander in the CC6UL SBC platform.

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

Signed-off-by: Sebastian Pastor <sebastian.pastor@digi.com>
2017-03-24 18:42:23 +01:00
Javier Viguera 846f07b7ac meta-digi: change Freescale references to NXP
Mostly in config templates and readme files.

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

Signed-off-by: Javier Viguera <javier.viguera@digi.com>
2017-03-22 19:58:32 +01:00
Tatiana Leon f9194019b6 recovery init: detach 'update' MTD device from UBI if volume is not found
If the volume is not found, the partition cannot be wiped since it is attached.

Remove 'update' UBI device in:
 * mdev automount script if volume is not found
 * recovery init script before formatting 'update' partition

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

Signed-off-by: Tatiana Leon <tatiana.leon@digi.com>
2017-03-22 15:03:24 +01:00
Javier Viguera c7da3e532c meta-digi-dey: disable ICU support for ccimx6ul
ICU support was not included in the rootfs in previous DEY versions
but it's included now through runtime dependences of 'harfbuzz' and
'libical'.

The support is not strictly needed, as ICU is a library for Unicode
support for applications:

http://site.icu-project.org/home

This commit disables ICU support directly for 'harfbuzz' and adds a
patch for 'libical' that allows to disable it. Notice that it's only
disabled for the CC6UL, as the CC6 has no rootfs space problems.

Only the 'libicudata' library is 25MB:

25M  /usr/lib/libicudata.so.57.1

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

Signed-off-by: Javier Viguera <javier.viguera@digi.com>
2017-03-21 12:10:21 +01:00
Salvador Penalva 1e2ee0589f meta-digi-dey: support for old FWs of Telit HE910
The unlock retries feature from the Telit plugin does not work properly with
old versions of the Telit HE910 firmware. This has been fixed in upstream
commit: fbb607f0c25be3a4bb8692ee48445cf437345b6c

Signed-off-by: Salvador Penalva <salvador.penalva@digi.com>

https://jira.digi.com/browse/DEL-3863
2017-03-20 19:37:54 +01:00
Salvador Penalva 65a17c522c Revert "meta-digi-dey: Add fix to return correct error code."
This reverts commit 3123085e72.

we revert this commit because the patch was already applied on mm-1.6.4

Signed-off-by: Salvador Penalva <salvador.penalva@digi.com>
2017-03-20 19:37:54 +01:00
Mike Engel 3bb5312662 meta-digi-dey: Add mdev support into recovery ramdisk.
This commit adds mdev support into the recovery ramdisk to
mount/unmount storage devices for the firmware up tool.

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

https://jira.digi.com/browse/DEL-3692
2017-03-20 17:08:55 +01:00
Tatiana Leon 5888479c75 cellularifupdown: redirect udhcpc output to '/dev/null'
Signed-off-by: Tatiana Leon <tatiana.leon@digi.com>
2017-03-20 14:47:21 +01:00
Tatiana Leon b0171be93a busybox: disable '-n' udhcpc option from ifupdown
udhcpc's '-n' option means 'Exit if lease is not obtained'.

We want to keep udhcp client alive if lease is not obtained, so when it is
possible, an IP is assigned.

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

Signed-off-by: Tatiana Leon <tatiana.leon@digi.com>
2017-03-20 14:47:21 +01:00
Tatiana Leon 113deb8046 meta-digi-arm: launch udhcp client in background to reduce the boot time
udhcpc options added to 'network/interfaces':
 * '-S' to log to syslog too.
 * Redirect the output to '/dev/null' not to show messages of the tool running
   in background (for example when executing 'ifup').
 * '&' to send the udhcp client to background.

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

Signed-off-by: Tatiana Leon <tatiana.leon@digi.com>
2017-03-20 14:47:21 +01:00
Alex Gonzalez fd7239da8a meta-digi-dey: Add LDFLAGS to do_compile override
This is to avoid the following QA error:

ERROR: fbtest-1.0-r0 do_package_qa: QA Issue: No GNU_HASH in the elf binary: '/usr/local/ssd/dey-2.2/workspace/ccimx6ulstarter/tmp/work/cortexa7hf-neon-dey-linux-gnueabi/fbtest/1.0-r0/packages-split/fbtest/usr/bin/fbtest' [ldflags]
ERROR: fbtest-1.0-r0 do_package_qa: QA run found fatal errors. Please consider fixing them.
ERROR: fbtest-1.0-r0 do_package_qa: Function failed: do_package_qa
ERROR: Logfile of failure stored in: /usr/local/ssd/dey-2.2/workspace/ccimx6ulstarter/tmp/work/cortexa7hf-neon-dey-linux-gnueabi/fbtest/1.0-r0/temp/log.do_package_qa.6755
ERROR: Task (/usr/local/ssd/dey-2.2/sources/meta-digi/meta-digi-dey/recipes-digi/fbtest/fbtest.bb:do_package_qa) failed with exit code '1'

Signed-off-by: Alex Gonzalez <alex.gonzalez@digi.com>
2017-03-17 19:15:27 +01:00
Alex Gonzalez 7ee00c1ae8 meta-digi-dey: recipes-connectivity: bluez5: Allow to override baudrate
Reviewing the patches while updating the QCA firmware to a new release,
I encountered this patch. On the original PR it says:

"Do not use hcitattach to reconfigure the baudrate but set it directly in the
Bluetooth FW file; this save us from some syncronism problems if we are not
using HW flow control."

Current spins of the module already use hw flow control. Also, not allowing
hciattach to override the baudrate does not seem right to me. It would be
enough with passing a 3M baudrate to hciattach to match the firmware
default.

Signed-off-by: Alex Gonzalez <alex.gonzalez@digi.com>
2017-03-17 19:15:27 +01:00
Mike Engel 3123085e72 meta-digi-dey: Add fix to return correct error code.
This commit fixes an issue with ModemManager to return the correct
error code when an invalid QMI command is send to the modem.

There are two ways to get the UIM/SIM status, one with the "DMS"
service that works on most devices from 2015 and earlier, and a
new way with the "UIM" service that works on many 2015+ devices.
Perhaps the EC21 is new enough that it requires the UIM service,
but ModemManager doesn't recognize the error code that it's returning.
There are two ways to get the UIM/SIM status, one with the "DMS"
service that works on most devices from 2015 and earlier, and a
new way with the "UIM" service that works on many 2015+ devices.
Perhaps the EC21 is new enough that it requires the UIM service,
but ModemManager doesn't recognize the error code that it's returning.

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

https://jira.digi.com/browse/DEL-3748
2017-03-16 12:55:19 +01:00
Mike Engel a48e66c618 meta-digi-dey: Added libqmi patch to DMS version miss match.
This commit fixes an issue with the Quectel EC21/EC25 due to a wrong
reported DMS version which will cause ModemManager not to read the
SIM card.

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

https://jira.digi.com/browse/DEL-3748
2017-03-16 12:55:19 +01:00
Javier Viguera 3877b2a59f suspend: bring bluetooth interface down and up on suspend
https://jira.digi.com/browse/DEL-3858

Signed-off-by: Javier Viguera <javier.viguera@digi.com>
2017-03-15 19:01:06 +01:00
Javier Viguera 33073a1589 meta-digi-dey: enhance BT interface initialization script
Implement:

* support to start, stop and restart interface
* states machine and retries system to recover from command failures
* overall simplification and code clean-up

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

Signed-off-by: Javier Viguera <javier.viguera@digi.com>
2017-03-15 19:01:06 +01:00
Sebastian Pastor 294880ddac dey-examples: adc_sample: add I/O Expander ADCs to the available interfaces.
Signed-off-by: Sebastian Pastor <sebastian.pastor@digi.com>
2017-03-15 17:21:05 +01: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 e3ce215f67 recovery-initramfs: do not generate TrustFence keys in this recipe
- Instead of trying to generate the TrustFence keys in this recipe
  when they are not present, depend on the 'virtual/kernel' to
  ensure they are already generated. This solves a concurrency problem
  when two recipes try to generate TrustFence keys at the same time.

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

Signed-off-by: David Escalona <david.escalona@digi.com>
2017-03-15 12:02:17 +01:00
Tatiana Leon f510a438df trustfence-initramfs: do not boot non-encrypted rootfs if encryption is enabled
Allowing to boot a non-encrypted rootfs when encryption is enable is a security
hole: if an attacker can somehow write (offline) to the media, he could flash a
custom unencrypted rootfs and break into the system.

If the system is configured to use encryption, only encrypted rootfs will boot.
Trying to boot a non-encrypted rootfs will fail and power off the device.

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

Signed-off-by: Tatiana Leon <tatiana.leon@digi.com>
2017-03-14 19:19:33 +01:00
Tatiana Leon d441f8401e trustfence-initramfs: remove support for encrypted rootfs installation
The recovery ramdisk already contains functionality for encrypted rootfs
installation. The goal is to centralize all this functionality in the recovery
ramdisk.

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

Signed-off-by: Tatiana Leon <tatiana.leon@digi.com>
2017-03-14 19:19:33 +01:00
Tatiana Leon c4bd0534e2 recovery-utils: add support to set the rootfs encryption key
Internal recovery-utils.git SHA1: 283f6e0768c0

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

Signed-off-by: Tatiana Leon <tatiana.leon@digi.com>
2017-03-14 18:01:02 +01:00
Tatiana Leon d7da8794f1 recovery init: add rngd to increase the quantity of entropy
Signed-off-by: Tatiana Leon <tatiana.leon@digi.com>
2017-03-14 17:39:09 +01:00