Commit Graph

1705 Commits

Author SHA1 Message Date
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
Hector Palacios f439506eb8 ccimx6ul/ccimx6: synchronize kernel defconfig
Signed-off-by: Hector Palacios <hector.palacios@digi.com>
2017-07-05 13:43:28 +02:00
Alex Gonzalez 14a7d127f0 meta-digi-arm: Remove worldwide board data file.
https://jira.digi.com/browse/DEL-4291

Signed-off-by: Alex Gonzalez <alex.gonzalez@digi.com>
2017-06-21 12:30:08 +02:00
Hector Palacios 4591165832 memwatch: [cosmetic] print new line after printing 16 bytes
The fix in 0ae172613a wrongly printed
a new line after each value, wich resulted in the following output for a
command like this, that reads two 32-bit words:

	root@ccimx6ulsbc:~# memwatch -r -l 8 -w -a 0x2008008
	0x02008008: 0x0070e501
	0x00000100

Instead, it should print a line feed after every 16 bytes.

Signed-off-by: Hector Palacios <hector.palacios@digi.com>
2017-06-19 15:57:58 +02:00
Hector Palacios 5126a6049b u-boot-fw-utils: dynamically create fw_env.config for NAND-based platforms
A mechanism was introduced in U-Boot to dynamically locate the environment
copies within a NAND partition, skipping bad blocks and making full use of
the partition blocks.
To trigger this mechanism in Linux tools (fw_printenv/fw_setenv) the
configuration file /etc/fw_env.config must have both copies entries
pointing to the same offset.

This commit substitutes the hardcoded configuration file for CC6UL with a
stub and generates one on an RPM post-script basing on:

- Supplied DEY variables (with default values per platform):
  - UBOOT_ENV_OFFSET: starting offset of the environment within the
    partition.
  - UBOOT_ENV_SIZE: size of each copy of the environment.
  - UBOOT_ENV_RANGE: size in the partition that the environment copies may
    occupy, starting from UBOOT_ENV_OFFSET. If undefined, the whole
    partition is used.

- Calculated values:
  - NAND Erase block size
  - Number of blocks available for the environment copies

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

https://jira.digi.com/browse/DEL-4256
2017-06-16 11:59:30 +02:00
Hector Palacios 3d4f6dffd0 digi-defaults.inc: add kernel v4.1 for CC6 in comment
Signed-off-by: Hector Palacios <hector.palacios@digi.com>
2017-06-16 11:59:30 +02:00
Arturo Buzarra ce709e3cfc dey-examples: upgrade spidev_test application
This commit updates the spidev_test application from Linux kernel upstream
at /tools/spi/spidev_test.c adding support to new features
commit: 9006a7b3220e7293ef8bc1ac9bba6c54411051c1

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

Signed-off-by: Arturo Buzarra <arturo.buzarra@digi.com>
2017-06-16 11:04:42 +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 84f63905ac aws-iot-sdk: minor fixes
* Create the certificates directory before copying files into it.
* Give the downloaded tarball a meaningful name (otherwise tarballs
  downloaded from GitHub don't have a proper name (only the version) and
  may collide with other packages with the same version.
* Allow to create certs package if certs are available at build time.

Signed-off-by: Javier Viguera <javier.viguera@digi.com>
2017-06-15 18:31:13 +02:00
Sebastian Pastor e6f072384d dey-examples: tamper: check tamper_events before waiting for events
If the event is already signaled, read the timestamp, log and ack the event,
perform actions and exit. If it is already acknowledged, then do nothing.
Signed-off-by: Sebastian Pastor <sebastian.pastor@digi.com>
2017-06-15 16:54:50 +02:00
Tatiana Leon 0e93ab73d5 awsiotsdk-demo: use ISC license for AWS IoT device SDK demo
Signed-off-by: Tatiana Leon <tatiana.leon@digi.com>
2017-06-15 11:09:01 +02:00
Tatiana Leon 78843e5cba aws-iot-sdk: remove certificates dependency
Only copy the certificates to the image if they are provided and exists.

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

Signed-off-by: Tatiana Leon <tatiana.leon@digi.com>
2017-06-15 11:08:36 +02:00
Tatiana Leon ab909175f0 aws-iot-sdk: remove the samples provided by Amazon
We have our own AWS IoT Device SDK demo application.

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

Signed-off-by: Tatiana Leon <tatiana.leon@digi.com>
2017-06-15 11:03:47 +02:00
Tatiana Leon b0b0becc7a aws-iot-sdk: move awsiotsdk-c and awsiotsdk-demo recipes
This commit moves awsiotsdk-c recipe into 'recipes-aws' and awsiotsdk-demo into
'recipes-digi/dey-examples'.

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

Signed-off-by: Tatiana Leon <tatiana.leon@digi.com>
2017-06-15 11:00:11 +02:00
Sebastian Pastor 1872ef5f06 dey-examples: adc_cmp_sample: remove sample_rate argument
This argument now is only valid for the behavior of the comparator in
sleep mode, so it no longer makes sense in this application.

Signed-off-by: Sebastian Pastor <sebastian.pastor@digi.com>
2017-06-08 22:29:02 +02:00
Sebastian Pastor 2653fe0063 dey-examples: adc_cmp_sample: show_usage() to always output the long help
Signed-off-by: Sebastian Pastor <sebastian.pastor@digi.com>
2017-06-08 22:27:33 +02:00
Sebastian Pastor f853e3a3df mca_tool: update checksums for build 1.7
Signed-off-by: Sebastian Pastor <sebastian.pastor@digi.com>
2017-06-08 20:36:03 +02:00
Sebastian Pastor f5cdab182c dey-examples: tamper: use string intead of magic number for acking the event
This will only work if the kernel has the latest driver for MCA tamper.
Signed-off-by: Sebastian Pastor <sebastian.pastor@digi.com>
2017-06-08 20:34:10 +02:00
Javier Viguera a8f0024403 AWS Greengrass: update to version 1.0.0
Signed-off-by: Javier Viguera <javier.viguera@digi.com>
2017-06-07 20:49:58 +02:00
Javier Viguera 8e8e7f8982 AWS Greengrass: add daemon launcher wrapper bootscript
Signed-off-by: Javier Viguera <javier.viguera@digi.com>
2017-06-06 19:35:03 +02:00
Javier Viguera f59d27e5a8 AWS Greengrass: wait some time to check GG daemon status on launch
GG daemon may die due to misconfigurations, but this takes a bit of
time, so wait a bit to check whether the daemon is still alive.

Signed-off-by: Javier Viguera <javier.viguera@digi.com>
2017-06-06 18:39:33 +02:00
Javier Viguera 95c511d100 AWS Greengrass: add python dependences for lambda_runtime.py
Signed-off-by: Javier Viguera <javier.viguera@digi.com>
2017-06-06 17:20:02 +02:00
Javier Viguera c2f71b9646 AWS Greengrass: install the package under '/greengrass' folder
That's the default assumed by the GG daemon:

$ daemon --help

  -gg-home string
    home directory of greengrass (default "/greengrass")

As of this version GG daemon may not work properly otherwise.

Signed-off-by: Javier Viguera <javier.viguera@digi.com>
2017-06-06 17:17:16 +02:00
Diaz de Grenu, Jose ff93cd2b28 recipes-digi: add cryptoauthlib
This library adds support to use the Atmel CryptoAuth device available
in the ConnectCore 6UL.

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

Signed-off-by: Diaz de Grenu, Jose <Jose.DiazdeGrenu@digi.com>
2017-06-05 13:10:02 +02:00
Diaz de Grenu, Jose 3ff2da4096 layer.conf: add custom-licenses folder
Signed-off-by: Diaz de Grenu, Jose <Jose.DiazdeGrenu@digi.com>
2017-06-05 13:10:02 +02:00
Javier Viguera b75959afd9 meta-digi-dey: add new recipe for AWS Greengrass core
https://jira.digi.com/browse/DEL-4302

Signed-off-by: Javier Viguera <javier.viguera@digi.com>
2017-06-02 18:32:36 +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
Hector Palacios 2b5017956b u-boot-fw-utils: added support for dynamic env location
Signed-off-by: Hector Palacios <hector.palacios@digi.com>

https://jira.digi.com/browse/DUB-741
2017-06-02 17:22:56 +02:00
Tatiana Leon 180649013d ccimx6sbc_defconfig: sync defconfig with kernel
This commit adds the required configuration to run Greengrass Core:
  * Overlay filesystem support
  * Cgroups:
      * Freezer cgroup subsystem
      * Device controller for cgroups
      * Cpuset support
      * Simple CPU accounting cgroup subsystem
      * Memory Resource Controller for Control Groups
      * Enable perf_event per-cpu per-container group (cgroup) monitoring
      * CPU scheduler
      * Block IO controller
  * Namespaces support
      * UTS namespace
      * IPC namespace
      * User namespace
      * PID Namespaces
      * Network namespace
  * POSIX Message Queues
  * Support multiple instances of devpts
  * Enable seccomp to safely compute untrusted bytecode

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

Signed-off-by: Tatiana Leon <tatiana.leon@digi.com>
2017-05-31 17:44:29 +02:00
Tatiana Leon eafffc0cce ccimx6ul_defconfig: sync defconfig with kernel
This commit adds the required configuration to run Greengrass Core:
  * Overlay filesystem support
  * Cgroups:
      * Freezer cgroup subsystem
      * Device controller for cgroups
      * Cpuset support
      * Simple CPU accounting cgroup subsystem
      * Memory Resource Controller for Control Groups
      * Enable perf_event per-cpu per-container group (cgroup) monitoring
      * CPU scheduler
      * Block IO controller
  * Namespaces support
      * UTS namespace
      * IPC namespace
      * User namespace
      * PID Namespaces
      * Network namespace
  * POSIX Message Queues
  * Support multiple instances of devpts
  * Enable seccomp to safely compute untrusted bytecode

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

Signed-off-by: Tatiana Leon <tatiana.leon@digi.com>
2017-05-31 17:44:14 +02:00
Diaz de Grenu, Jose c9b11f0ded dey-examples: adc: fix help output
When not enough arguments are given (this includes using only the '-h'
argument for help), show the complete help.

Signed-off-by: Diaz de Grenu, Jose <Jose.DiazdeGrenu@digi.com>
2017-05-31 11:51:08 +02:00
Arturo Buzarra a1e84ca437 meta-digi-arm: add support for CC6 variant 0x14
This is a Consumer dual-core 1GHz, 4GB eMMC, 1GB DDR3, 0/+70C variant
without bluetooth, no wireless, no kinetis.

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

Signed-off-by: Arturo Buzarra <arturo.buzarra@digi.com>
2017-05-30 13:27:24 +02:00
Javier Viguera efba5b5e7c image_types class: fix build error due to missing images dependencies
A couple of commits in poky.git broke the dependence from our boot and
recovery images to the trustfence and recovery initramfs images:

http://git.yoctoproject.org/cgit.cgi/poky/commit/?h=morty&id=6c3d10ea62ad282a764da83aa701f92c6d3db6cb
http://git.yoctoproject.org/cgit.cgi/poky/commit/?h=morty&id=99c6c878ee122a04f23ef49ea653208ca1c7aa77

This commit fixes the dependencies again, so when you build those images,
it builds first the required initramfs images.

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

Signed-off-by: Javier Viguera <javier.viguera@digi.com>
2017-05-26 18:32:34 +02:00
Javier Viguera 57365612da bluetooth-init: cosmetic, boot message in one line
Avoid splitting the boot script message in two different lines:

Starting bluetooth hardware: [OK]
done.

Signed-off-by: Javier Viguera <javier.viguera@digi.com>
2017-05-23 12:06:34 +02:00
Diaz de Grenu, Jose f9acd0af7c kernel-module-qualcomm: remove patches
Since 30c253e108 the module is compiled from a repository which already
includes the patches, so we can remove them from DEY.

Signed-off-by: Diaz de Grenu, Jose <Jose.DiazdeGrenu@digi.com>
2017-05-22 17:47:41 +02:00
Javier Viguera f8c2888529 wpa_supplicant: add missing leading space for 'append' command
Signed-off-by: Javier Viguera <javier.viguera@digi.com>
2017-05-22 09:40:02 +02:00
Diaz de Grenu, Jose 0ae172613a memwatch: [cosmetic] fix output format
The new line should be printed after the result, instead of before.

Example:

root@ccimx6sbc:~# memwatch -r -w -a 0x2190034

0x02190034: 0x00000000 root@ccimx6sbc:~#

After this patch:

root@ccimx6sbc:~# memwatch -r -w -a 0x2190034
0x02190034: 0x00000000

Signed-off-by: Diaz de Grenu, Jose <Jose.DiazdeGrenu@digi.com>
2017-05-19 15:38:11 +02:00
Tatiana Leon a3bced4a17 awsiotsdk-demo: add recipe to compile the AWS IoT device SDK demo application
https://jira.digi.com/browse/DEL-4149

Signed-off-by: Tatiana Leon <tatiana.leon@digi.com>
2017-05-19 12:18:19 +02:00
Sebastian Pastor 7f59bc7eda dey-examples: add cmp_sample application for ccimx6ul
This application tests the MCA comparator feature by configuring
the thresholds, sample rate and other parameters.

Signed-off-by: Sebastian Pastor <sebastian.pastor@digi.com>

https://jira.digi.com/browse/CC6UL-600
2017-05-18 21:55:03 +02:00
Diaz de Grenu, Jose b9d6f4406a modemmanager: rework udev rules for cellular XBee
After 0e7f5d3a47 both platforms probe both ports,
which is problematic (for example, ttymxc4 is the console in the 6UL based
platforms).

Use more concrete rules to avoid that problem.

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

Signed-off-by: Diaz de Grenu, Jose <Jose.DiazdeGrenu@digi.com>off-by: Diaz de Grenu, Jose <Jose.DiazdeGrenu@digi.com>
2017-05-17 13:18:54 +02:00
Diaz de Grenu, Jose 0e7f5d3a47 modemmanager: generalize udev rules for XBee cellular
After the kernel update (v3.14 to v4.1) the sysfs path changed from:

/devices/soc0/soc.0/2100000.aips-bus/21f4000.serial/tty/ttymxc4

to:

/devices/soc0/soc/2100000.aips-bus/21f4000.serial/tty/ttymxc4

which caused the XBee Cellular not to be detected on the new kernel. These more
general rules are compatible with both kernels.

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

Signed-off-by: Diaz de Grenu, Jose <Jose.DiazdeGrenu@digi.com>
2017-05-16 13:26:48 +02:00
Tatiana Leon 0ce722decf README: add support for AWS IoT Device SDK for embedded C
https://jira.digi.com/browse/DEL-4101

Signed-off-by: Tatiana Leon <tatiana.leon@digi.com>
2017-05-11 19:28:07 +02:00
Tatiana Leon c525e2caaf aws-iot-sdk: patch aws iot sdk samples code to properly work on our platforms
This patch modifies the code of some of the provided samples to be able to run
them in our platforms. By default, these applications cannot find the
certificates in the device, and the command line options are not working.

Patched samples:
 * shadow_sample
 * shadow_sample_console_echo
 * subscribe_publish_sample

See https://github.com/aws/aws-iot-device-sdk-embedded-C.

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

Signed-off-by: Tatiana Leon <tatiana.leon@digi.com>
2017-05-11 19:10:10 +02:00
Tatiana Leon 8a1a67f592 aws-iot-sdk: add variable to establish the logging level
Variable 'AWS_IOT_LOGGING_LEVEL' can be used from the project 'local.conf' to
establish the logging level of the AWS IoT Device SDK.

There are 6 incremental levels: none, error, warn, info, debug, and trace.

Default is 'debug'.

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

Signed-off-by: Tatiana Leon <tatiana.leon@digi.com>
2017-05-11 19:10:10 +02:00
Tatiana Leon cd078339f7 meta-digi-dey: add aws iot sdk embedded-c recipe
The AWS IoT device SDK for embedded C is a collection of C source files that
can be used in embedded applications to securely connect to the AWS IoT
platform.

The SDK code is available in GitHub and includes the library code and several
sample applications.

A user must provide from its 'local.conf':
  * AWS_IOT_CERTS_DIR: Absolute path to the directories where the required
    certifies are stored:
      * Root CA.
      * Device signed certificate.
      * Device private key.

And optionally, values for the rest of variables defined in the 'awsiotsdk-c'
bbclass.

This recipe is building the library code and the binaries for the samples:
  * shadow_sample
  * shadow_sample_console_echo
  * subscribe_publish_sample

See https://github.com/aws/aws-iot-device-sdk-embedded-C.

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

Signed-off-by: Tatiana Leon <tatiana.leon@digi.com>
2017-05-11 19:10:10 +02:00
Tatiana Leon 9a296b79a3 meta-digi: add awsiotsdk-c configuration class
This commit adds an awsiotsdk-c class to encapsulate all AWS IoT device SDK
configurations.

In general, the variables are the macros that users can configure in their
'aws_iot_config.h' file.

See for example, the header file for the 'shadow_sample' at GitHub:
https://github.com/aws/aws-iot-device-sdk-embedded-C/blob/master/samples/linux/shadow_sample/aws_iot_config.h

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

Signed-off-by: Tatiana Leon <tatiana.leon@digi.com>
2017-05-11 19:10:10 +02:00
Tatiana Leon b1d3b02cd9 meta-digi-dey: add mbedtls recipe
mbedTLS is an open source, portable, easy to use, readable and flexible SSL
library.

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

Signed-off-by: Tatiana Leon <tatiana.leon@digi.com>
2017-05-11 19:10:10 +02:00
Salvador Penalva 0dbe44072f README: add support for EC-25 and U-Blox L200/L-210
Signed-off-by: Salvador Penalva <salvador.penalva@digi.com>
2017-05-11 12:52:17 +02:00
Salvador Penalva a2063b11a3 modemmanager: update to fix QMI bug and add Ublox patches for XBee
QMI modems didn't work with the version of
modemmanager that the dey-2.2-r1 release was
using.

We were using two patches for uBlox plugin to use XBee Cellular 3G
that are now merged in modemmanager master.

This updates modemmanager to use the commit where QMI
problem was fixed and also include uBlox patches.

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

Signed-off-by: Salvador Penalva <salvador.penalva@digi.com>
2017-05-11 09:55:41 +02:00