Commit Graph

221 Commits

Author SHA1 Message Date
Sebastian Pastor b3ae030fce suspend: set wireless interfaces managed by NM as unmanaged before suspend
With these changes we tell NM to not manage the wireless interfaces before
unloading the wireless module. This was causing some unexpected behavior that
crashed NetworkManager.

Signed-off-by: Sebastian Pastor <sebastian.pastor@digi.com>
https://jira.digi.com/browse/DEL-5351
https://jira.digi.com/browse/DEL-4571
2017-11-29 12:06:02 +01:00
Arturo Buzarra d76db197e1 initramfs: launch rngd depending on kernel version
Use the kernel version to decide to launch the rngd tool
for kernels previous to v3.17

https://jira.digi.com/browse/DEL-5362
https://jira.digi.com/browse/DEL-5363

Signed-off-by: Arturo Buzarra <arturo.buzarra@digi.com>
2017-11-28 09:24:34 +01:00
Isaac Hermida 2d0af46bee init-ifupdown: virtwlans: specify type of wlan1
virtwlans script creates an additional interface on startup for QCA6564 chip.
The created interface purpose is for ap mode, so specify its type on creation.

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

Signed-off-by: Isaac Hermida <isaac.hermida@digi.com>
2017-11-15 08:48:26 +01:00
Mike Engel 74c10edc2b meta-digi: Add Eclipse debug support
Signed-off-by: Mike Engel <Mike.Engel@digi.com>

https://jira.digi.com/browse/DEL-5327
2017-11-13 11:10:03 +01:00
Arturo Buzarra 8c14ae877f meta-digi recipes: adjust machine overrides for new platform
This commit modifies different recipes to support the new platform
ccimx6qpsbc and adapt it to maintain the support to ccimx6sbc.

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

Signed-off-by: Arturo Buzarra <arturo.buzarra@digi.com>
2017-10-18 09:20:11 +02:00
Arturo Buzarra f1b47c1111 busybox: add support for ccimx6qpsbc platform
https://jira.digi.com/browse/DEL-5082

Signed-off-by: Arturo Buzarra <arturo.buzarra@digi.com>
2017-10-18 09:20:11 +02:00
Arturo Buzarra 553337afc3 init-ifupdown: add support for ccimx6qpsbc platform
https://jira.digi.com/browse/DEL-5082

Signed-off-by: Arturo Buzarra <arturo.buzarra@digi.com>
2017-10-18 09:20:11 +02:00
Tatiana Leon 1f7920f7de meta-digi-dey: add libdigiapix package
This is the Digi APIX library.

Signed-off-by: Tatiana Leon <tatiana.leon@digi.com>
2017-09-06 11:01:26 +02:00
Jose Diaz de Grenu 270f890494 recovery-initramfs-init: remove parted dependency
Turns out that the busybox' fdisk applet is also able to parse the GPT
partition tables. This saves around 0.5 MiB of space.

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

Signed-off-by: Jose Diaz de Grenu <Jose.DiazdeGrenu@digi.com>
2017-08-29 18:15:43 +02:00
Jose Diaz de Grenu e6beba4cb0 init-ifupdown: use wlan1 for the bridging example
wlan1 is the interface used for SoftAP, so use that one instead. This also
matches with the 'Network bridging' chapter of the documentation.

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

Signed-off-by: Jose Diaz de Grenu <Jose.DiazdeGrenu@digi.com>
2017-08-29 18:12:33 +02:00
Jose Diaz de Grenu d7c8fa4b9a init-ifupdown: fix interfaces order
The bridge example uses the wireless interface and it assumes that it is
initialized, so it must be placed after it.

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

Signed-off-by: Jose Diaz de Grenu <Jose.DiazdeGrenu@digi.com>
2017-08-29 18:12:33 +02:00
Arturo Buzarra 9c5774ed62 bridgeifupdown: fix script to create a bridge with a wireless interface
The supplicant support for a bridge was not being managed,
then the bridge was failing when the softap was configured
with an encryption. With this change we launch a supplicant
instance with the bridge support after checking that the
/etc/network/interfaces contains the required parameters.

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

Signed-off-by: Arturo Buzarra <arturo.buzarra@digi.com>
2017-08-07 12:13:44 +02:00
Javier Viguera b421fb7995 qualcomm: generalize log function to pass the log level
We need to pass different log levels depending on the message, so they
appear in the console, so generalize the 'log' function.

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

Signed-off-by: Javier Viguera <javier.viguera@digi.com>
2017-07-27 14:05:29 +02:00
Javier Viguera 2a7bc3717e busybox: disable 'init' for IPK package type support
Busybox's init enabled at build time collide with 'sysvinit' package.
This does not seem a problem when using RPM package manager, but using
IPK instead, the build is broken at image creation time:

Collected errors:
 * check_data_file_clashes: Package sysvinit wants to install file <...>/rcS
        But that file is already provided by package  * busybox

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

Signed-off-by: Javier Viguera <javier.viguera@digi.com>
2017-07-27 12:01:42 +02:00
Javier Viguera f83b5fcbe7 busybox: refresh defconfig file for version 1.24
No applet has been enabled or disabled, just the defconfig file has been
refreshed for the current busybox version 1.24.x

Signed-off-by: Javier Viguera <javier.viguera@digi.com>
2017-07-27 12:01:42 +02:00
Javier Viguera ae6aa1ee25 meta-digi-dey: cosmetic, add missing newlines at end of file
Signed-off-by: Javier Viguera <javier.viguera@digi.com>
2017-07-25 18:25:34 +02:00
Javier Viguera 9903deaef8 core-image-base: do not install udev-cache
As we are using kernel's DEVTMPFS, using udev-cache on top of it does
not add much advantage. Disabling it has the extra advantage of avoiding
writing the udev-cache tarball under '/etc' (which probably won't work
on a read-only system).

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

Signed-off-by: Javier Viguera <javier.viguera@digi.com>
2017-07-19 19:20:58 +02:00
Javier Viguera f94e039cc8 suspend: check module variant before bringing down/up BT interface
Signed-off-by: Javier Viguera <javier.viguera@digi.com>
2017-07-07 17:02:45 +02:00
Javier Viguera eb76b2ac68 suspend: adapt script for NetworkManager integration
Now the suspend script brings down all the wireless interfaces that are
managed by ifupdown command (in the '/etc/network/interfaces' file) and
then unloads the wireless driver.

On resume the script triggers an event so udev reloads the wireless
driver and then brings up the interfaces that were brought down on
suspend.

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

Signed-off-by: Javier Viguera <javier.viguera@digi.com>
2017-07-07 17:02:45 +02:00
Mike Engel baddd28fc8 packagegroup-dey-core: add networkmanager package
Signed-off-by: Mike Engel <Mike.Engel@digi.com>
2017-07-07 17:02:45 +02:00
Mike Engel 308d9c02ce init-ifupdown: remove interfaces managed by Networkmanager
This commit removes the interfaces that are managed by Networkmanager
from the /etc/network/interfaces entry.

Signed-off-by: Mike Engel <Mike.Engel@digi.com>
2017-07-07 17:02:45 +02:00
Tatiana Leon f898cc19fb meta-digi-dey: add awsiotsdk-c package
This is the AWS IoT device SDK for embedded C library.

Signed-off-by: Tatiana Leon <tatiana.leon@digi.com>
2017-07-05 13:43:28 +02:00
Sebastian Pastor 56b8cb8dd0 trustfence-tool: update recipe to v2.1
Signed-off-by: Sebastian Pastor <sebastian.pastor@digi.com>
2017-07-05 13:43:28 +02:00
Sebastian Pastor 2a6c4d6e04 trustfence-tool: update recipe to v2.1
Signed-off-by: Sebastian Pastor <sebastian.pastor@digi.com>
2017-07-05 13:43:28 +02:00
Isaac Hermida 4618c76208 recovery-initramfs: execute all post installation scripts
In the recovery images we are using a custom init so we are not executing
any post-installation that is required for a correct rootfs setup, so call
all the post installation scripts from our custom init.
The package installation could be ipk, rpm or deb, so call to the
*postint folder.
Given that the recovery rootfs is a ramdisk, there is no need to remove the
post installation scripts.

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

Signed-off-by: Isaac Hermida <isaac.hermida@digi.com>
2017-07-05 13:43:28 +02:00
Javier Viguera 91698844c0 dey-image-aws: new image including Amazon Web Services
https://jira.digi.com/browse/DEL-4304

Signed-off-by: Javier Viguera <javier.viguera@digi.com>
2017-06-15 18:31:13 +02:00
Javier Viguera 5d955b86af init-ifupdown: fix script when '/etc/resolv.conf' is a file
The readlink command on a real file was expanding to nothing and then
the '/etc/resolv.conf' file was not being updated with the nameservers.
With this change we only run the 'readlink' link command after checking
that the file is actually a symbolic link.

Signed-off-by: Javier Viguera <javier.viguera@digi.com>
2017-06-02 18:32:36 +02:00
Javier Viguera d3baa9b2b1 base-files: add sysctl.conf to the list of config files
So it's not overwritten by package managers by default.

Signed-off-by: Javier Viguera <javier.viguera@digi.com>
2017-06-02 18:32:36 +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
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
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
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
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 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
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
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
Tatiana Leon 00d30ee9a0 recovery init: cc6ul: set rootfs enc flag when setting a new key
For CC6UL, when setting a new key, an "enc" flag must be added to the rootfs in
the "mtdparts" U-Boot variable.

After that a reboot is needed, so the recovery command must be modified to
remove the encryption key and proceed with the rest of commands in the next
boot.

When updating the firmware, a format of the rootfs partition is always
performed, independently if a new encryption key has just been configured.

In case only the encryption key is being configured, we also need to reboot to
format the rootfs properly.

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

Signed-off-by: Tatiana Leon <tatiana.leon@digi.com>
2017-03-14 17:39:09 +01:00
Tatiana Leon 96d7211a71 recovery init: format rootfs partition (block devices) when setting a new key
https://jira.digi.com/browse/DEL-3277

Signed-off-by: Tatiana Leon <tatiana.leon@digi.com>
2017-03-14 17:39:09 +01:00
Tatiana Leon 4085bc8904 recovery init: allow several operations at once (update, key, wipe)
Allow to perform several recovery operations at the same time and set the right
order for them:
 1. New encrypted key
 2. Firmware update
 3. Wipe update partition

https://jira.digi.com/browse/DEL-3277
https://jira.digi.com/browse/DEL-3685

Signed-off-by: Tatiana Leon <tatiana.leon@digi.com>
2017-03-14 17:39:09 +01:00
Mike Engel b180a3e0b1 meta-digi-dey: Added check if wlan1 interface already exist.
This commit verifies that the wlan1 interface is not already created
and will skip creating the virtual interface if it already exist.

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

https://jira.digi.com/browse/DEL-3917
2017-03-14 13:20:10 +01:00
Mike Engel aa0c2fb886 ccimx6ul: Changed concurrent mode setup script.
This commit changes the concurrent mode script to enable always the
AP interface through the wireless device but will warn the use
if the virtual MAC addresses used are the default once.

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

https://jira.digi.com/browse/DEL-3900
2017-03-10 09:44:25 +01:00
Gabriel Valcazar 42ac6ea6c2 busybox: remove libdigi dependency
The flash_eraseall busybox utility is not used in the ccimx6 and ccimx6ul
platforms. Its corresponding patch (and the library it depends on) can be
removed from the busybox recipe.

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

Signed-off-by: Gabriel Valcazar <gabriel.valcazar@digi.com>
2017-03-07 17:32:34 +01:00
Mike Engel 19563821d2 ccim6ul_sbc: Add wireless concurrent as default setup
This commit adds the wireless concurrent mode as a default
configuration to the CC6UL machine.

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

https://jira.digi.com/browse/DEL-3818
2017-03-07 17:20:12 +01:00