Commit Graph

687 Commits

Author SHA1 Message Date
Diaz de Grenu, Jose 36d7311459 meta-digi-arm: trustfence-cst: fix native recipe and Makefile
This package is native only, this patch ensures it can only be built
natively and fix the following problems:
* Add openssl-native rather than openssl to the dependencies.
* Use the $(CC) $(LDFLAGS) and $(CFLAGS) that Yocto provides to avoid a
  compilation error.

Signed-off-by: Diaz de Grenu, Jose <Jose.DiazdeGrenu@digi.com>
2016-07-29 17:08:25 +02:00
Isaac Hermida 1e843089fe ccimx6ul: defconfig: update config file for ccimx6ul
Add support for ADC using the MCA driver.

Signed-off-by: Isaac Hermida <isaac.hermida@digi.com>
2016-07-22 08:52:25 +02:00
Isaac Hermida 46c7508ee3 kernel-module-qualcomm: add support to override the region code
The region code is programmed in the OTP bits. We want to allow to be able to
override this behavior by setting the new value as a property in the device
tree called "regulatory-domain".
This can be done by setting the variable "regdomain=<code>" in uboot or well
by defining that entry in the device tree.

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

Signed-off-by: Isaac Hermida <isaac.hermida@digi.com>
2016-07-21 18:32:07 +02:00
Isaac Hermida cd253b370b kernel-module-qualcomm: load specific firmware file per region
The country region is programmed in the OTP bits. Based on that value we need
to load the firmware file for the specific country region.

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

Signed-off-by: Isaac Hermida <isaac.hermida@digi.com>
2016-07-21 18:29:34 +02:00
Isaac Hermida 0b5c74e836 recipes-bsp: firmware-qualcomm: add different firmware files for country regions
We are including two firmware files: one for setting the country to US and the
other one to set it to the World Wide Roaming region (SKU 0060).

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

Signed-off-by: Isaac Hermida <isaac.hermida@digi.com>
2016-07-21 18:29:34 +02:00
Diaz de Grenu, Jose 84cad4e4ad meta-digi-arm: linux-dey: fix check for uImage signing
TRUSTFENCE_SIGN can be defined to "0" to explicitly disable uImage sign and
encryption.

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

Signed-off-by: Diaz de Grenu, Jose <Jose.DiazdeGrenu@digi.com>
2016-07-21 11:38:01 +02:00
Diaz de Grenu, Jose 5ee4340942 meta-digi-arm: u-boot: [cosmetic] correct DEY macro name
https://jira.digi.com/browse/DEL-2804

Signed-off-by: Diaz de Grenu, Jose <Jose.DiazdeGrenu@digi.com>
2016-07-21 11:20:03 +02:00
Hector Palacios d9c4a586f2 ccimx6ulstarter: add device tree file for -id129 board
This device tree file corresponds to StarterBoard with ID=129
which corresponds to smart part number CC-WMX6UL-START.

Signed-off-by: Hector Palacios <hector.palacios@digi.com>
2016-07-20 16:33:04 +02:00
Diaz de Grenu, Jose ebbe0e6d3e Revert "meta-digi-arm: u-boot: use v2015.04 maintenance branch"
The correct U-Boot branch to be used with dey-2.0/master is v2015.04/master, as
it contains the latest development changes (just like dey-2.0/master).

This reverts commit 728619a5bc.
2016-07-19 18:38:12 +02:00
Diaz de Grenu, Jose 3f25006148 meta-digi-arm: u-boot: copy signed and encrypted artifacts
After commit b0a766eafc8 in the U-Boot repository, both signed and
encrypted images will be generated. Copy both of them to the deploy folder

https://jira.digi.com/browse/DUB-642

Signed-off-by: Diaz de Grenu, Jose <Jose.DiazdeGrenu@digi.com>
2016-07-19 18:38:05 +02:00
Diaz de Grenu, Jose d91661d7de meta-digi-arm: add support for signed and encrypted uImages
https://jira.digi.com/browse/DUB-534
https://jira.digi.com/browse/DUB-602

Signed-off-by: Diaz de Grenu, Jose <Jose.DiazdeGrenu@digi.com>
2016-07-19 15:48:12 +02:00
Diaz de Grenu, Jose f23d8c6abb trustfence: simplify TRUSTFENCE_ configuration macros
Adapt the U-Boot recipe to the last U-Boot Kconfig entries changes.

Simplify the name of some TRUSTFENCE_ configuration macros. These were
used to configure U-Boot, but they will also configure the uImage signature
and encryption processes.

https://jira.digi.com/browse/DUB-602
https://jira.digi.com/browse/DUB-618
https://jira.digi.com/browse/DUB-534

Signed-off-by: Diaz de Grenu, Jose <Jose.DiazdeGrenu@digi.com>
2016-07-19 15:48:12 +02:00
Diaz de Grenu, Jose 37eb7db2dc meta-digi-arm: trustfence-cst: use /dev/urandom
This is needed in order to avoid indefinitely blocking.

Signed-off-by: Diaz de Grenu, Jose <Jose.DiazdeGrenu@digi.com>
2016-07-19 15:48:12 +02:00
Diaz de Grenu, Jose ceb9ca1537 trustfence-cst: hab4_pki_tree-sh: automate script
This allows to automatically create a secure PKI tree without user
interaction.

https://jira.digi.com/browse/DUB-618

Signed-off-by: Diaz de Grenu, Jose <Jose.DiazdeGrenu@digi.com>
2016-07-19 15:48:12 +02:00
Diaz de Grenu, Jose 8ac7da51ef meta-digi-arm: add recipe for the Code Signing Tools
NXP Code signing Tool for the High Assurance Boot library is needed for
signing and encrypting different artifacts (U-Boot image, uImage, ...).

As the CST cannot be included in DEY, the user needs to download the
tarball and add it to the recipe folder.

https://jira.digi.com/browse/DUB-618

Signed-off-by: Diaz de Grenu, Jose <Jose.DiazdeGrenu@digi.com>
2016-07-19 15:48:12 +02:00
Javier Viguera d80aa91c28 meta-digi-arm: set 'boot.ubifs' image depends explictly
To build the CC6UL boot image, the u-boot and linux images need to be
already deployed. Also the native mtd-utils package needs to be
available in the sysroot.

Make all this dependences explicit for deterministic reproducibility.

Signed-off-by: Javier Viguera <javier.viguera@digi.com>
2016-07-19 12:35:51 +02:00
Hector Palacios b71f2dacb5 u-boot-fw-utils: add support and config file for CC6UL platform
U-Boot environment on the CC6UL NAND is located at partition /dev/mtd1:
 - original copy is located at offset 0 in the partition
 - redundant copy is located 1 erase block (128K) after the original copy

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

https://jira.digi.com/browse/DEL-2552
2016-07-19 11:47:42 +02:00
Javier Viguera 8ccafb9492 u-boot: disable TF initramfs for CC6UL
At the moment there is no support for rootfs encryption for the CC6UL,
so there is not a ramdisk in the boot image. But with the initial
addition of TF support, the u-boot boot script was being on-the-fly
updated for TF regardless of the platform, making the CC6UL unable to
boot when TF was enabled.

This commit fixes the problem, by just changing the u-boot boot script
when TF is enabled only for the CC6.

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

Signed-off-by: Javier Viguera <javier.viguera@digi.com>
2016-07-18 11:35:09 +02:00
Alex Gonzalez 213577a930 meta-digi-dey: linux-dey-3.14: Sync ccimx6sbc defconfig with kernel's
defconfig

Signed-off-by: Alex Gonzalez <alex.gonzalez@digi.com>
2016-07-18 10:08:08 +02:00
Isaac Hermida 728619a5bc meta-digi-arm: u-boot: use v2015.04 maintenance branch
Use the maintenance branch for the compatible platforms (ccimx6 and ccimx6ul)

Signed-off-by: Isaac Hermida <isaac.hermida@digi.com>
2016-07-15 16:16:32 +02:00
Isaac Hermida 948149208e recipes-kernel: Update config file for ccimx6ul
Update config file to include power management MCA support.

Signed-off-by: Isaac Hermida <isaac.hermida@digi.com>
2016-07-15 16:16:32 +02:00
Alex Gonzalez 9585e313af meta-digi-arm: u-boot-dey: Do not use external compilation unless multiple
u-boots are being build.

Signed-off-by: Alex Gonzalez <alex.gonzalez@digi.com>
2016-07-13 14:14:45 +02:00
Alex Gonzalez da92e2f07d meta-digi-arm: u-boot: Do not override defconfig targets on multiple u-boot
builds.

When building multiple u-boots they get compiled externally into a
directory named after machine defconfigs.

Once there is a directory with the same name as a defconfig it is not
possible to run the defconfig make target.

Fixes https://jira.digi.com/browse/DEL-2644

Signed-off-by: Alex Gonzalez <alex.gonzalez@digi.com>
2016-07-13 14:14:45 +02:00
Alex Gonzalez c43c9897ad meta-digi-arm: u-boot.inc: Do not override defconfig targets on multiple u-boot
builds.

When building multiple u-boots they get compiled externally into a
directory named after machine defconfigs.

Once there is a directory with the same name as a defconfig it is not
possible to run the defconfig make target.

This change should be only temporary until it gets upstream.

Fixes https://jira.digi.com/browse/DEL-2644

Signed-off-by: Alex Gonzalez <alex.gonzalez@digi.com>
2016-07-13 14:14:45 +02:00
Alex Gonzalez e22244edde meta-digi-arm: Add u-boot.inc from poky's meta layer.
Moving this file into meta-digi should be temporary until a patch is
upstreamed.

Signed-off-by: Alex Gonzalez <alex.gonzalez@digi.com>
2016-07-13 14:14:45 +02:00
Javier Viguera 6f8c58291e meta-digi: add support for Trustfence secure rootfs
When Trustfence is enabled, this adds a dependence on the TF initramfs,
so it's built and added to the boot image.

It also modifies the u-boot boot script on the fly, to boot correctly
using the Trustfence initramfs.

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

Signed-off-by: Javier Viguera <javier.viguera@digi.com>
2016-07-07 18:04:08 +02:00
Javier Viguera 6ec562b601 linux: enable rootfs encryption options in kernel config
https://jira.digi.com/browse/DEL-2278

Signed-off-by: Javier Viguera <javier.viguera@digi.com>
2016-07-07 17:57:55 +02:00
Javier Viguera 0f09bbad7a kernel-module-imx-gpu-viv: refresh patches after module upgrade
The external module revision has been upgraded in meta-fsl-arm, thus
refresh the patches so they apply cleanly.

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

Signed-off-by: Javier Viguera <javier.viguera@digi.com>
2016-07-07 11:03:32 +02:00
Hector Palacios a2554a08cc ccimx6ul: add support to build boot.ubifs image
The size of the destination partition (linux) is around 14MiB so the
max-leb-cnt must be reduced compared to the one used for the rootfs
partition.

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

https://jira.digi.com/browse/DEL-2697
2016-07-06 18:05:30 +02:00
Hector Palacios 846e1cd07f image-types_digi.bbclass: implement boot.ubifs image type
This creates a UBIFS file with the kernel, device tree files, and U-Boot
bootscripts generated by Digi Embedded Yocto.
The resulting image can be then programmed into the boot (linux) partition.

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

https://jira.digi.com/browse/DEL-2697
2016-07-06 18:05:30 +02:00
Hector Palacios ff59bf653d ccimx6ulstarter: add U-Boot scripts for deploying and booting the system
- boot.txt
	Sets the device tree filename basing on the SOM variant read from
	the HWID and boots from NAND.
- install_linux_fw_sd
	Deploys a full system (as generated by Digi Embedded Yocto) from
	a FAT formatted micro SD card into the NAND flash.

The u-boot-dey recipe is now fully shared by ccimx6 and ccimx6ul platforms
so we can remove the platform-specific appends.

Signed-off-by: Hector Palacios <hector.palacios@digi.com>
2016-07-06 16:26:49 +02:00
Hector Palacios 6f2acb17c6 install_linux_fw_sd: parametrize the mmc device index containing the firmware
Signed-off-by: Hector Palacios <hector.palacios@digi.com>
2016-07-06 16:26:49 +02:00
Hector Palacios a32cea139b install_linux_fw_sd: expand variables when setting bootcmd to avoid redefining them
The setting of 'bootcmd' in the script was done using single quotes, which
doesn't expand variables. As a consequence the following variables must
be defined again (during the execution of the second part of the script):
 - mmcdev
 - INSTALL_LINUX_FILENAME
 - INSTALL_ROOTFS_FILENAME

This patch changes the single quotes with double quotes, so that these
variables are expanded during the setting of 'bootcmd' with the values
assigned at the begining of the installation script (notice these are
not dynamically generated so there is no risk to expand them).

At the same time we need to escape with a backslash:
 - double quotes containing strings
 - variables that we don't want to expand (like the return value $?)

Signed-off-by: Hector Palacios <hector.palacios@digi.com>
2016-07-06 16:26:49 +02:00
Hector Palacios 052775a34c install_linux_fw_sd: fix semi-colons in script
- Add semi-colons to instructions inside 'setenv' commands
- Remove semi-colons in instructions where they are not needed (for
  consistency with the rest of instructions)

Signed-off-by: Hector Palacios <hector.palacios@digi.com>
2016-07-06 16:26:49 +02:00
Isaac Hermida cf7c6b0af8 kernel-module-qualcomm: compile the driver without debug messages
By default the driver was being compiled with debug messages. Disabled it
but leave the option there so it can be enabled by user.

Signed-off-by: Isaac Hermida <isaac.hermida@digi.com>
2016-07-06 08:43:13 +02:00
Diaz de Grenu, Jose d7a26cc3e6 meta-digi-arm: u-boot: change name of encrypted artifacts for clarity
https://jira.digi.com/browse/DEL-2663

Signed-off-by: Diaz de Grenu, Jose <Jose.DiazdeGrenu@digi.com>
2016-07-01 16:26:53 +02:00
Mike Engel e5dca69e96 ccimx6ul: Add cryptodev module to kernel configuration.
This commit will add the cryptodev module to the CC6UL kernel to use
the CAAM from user space through this device.

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

https://jira.digi.com/browse/DEL-2719
2016-07-01 09:08:40 +02:00
Isaac Hermida bc98b6f362 ccimx6ul: defconfig: do not use static DDBB for regulatory domain
Do not compile the kernel for supporting the static regulatory domain
but force the system to do that by using crda.

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

Signed-off-by: Isaac Hermida <isaac.hermida@digi.com>
2016-06-29 08:43:17 +02:00
Isaac Hermida 7a95663c5e kernel-module-qualcomm: do not create an auxiliar p2p interface on init
https://jira.digi.com/browse/DEL-2656

Signed-off-by: Isaac Hermida <isaac.hermida@digi.com>
2016-06-28 11:06:18 +02:00
Isaac Hermida 7ecd73da73 kernel-module-qualcomm: [cosmetic] rework patches to do not include numbering
Signed-off-by: Isaac Hermida <isaac.hermida@digi.com>
2016-06-27 13:21:52 +02:00
Isaac Hermida 9db7e6eb33 ccimx6ulstarter.conf: update U-Boot defconfig file
Signed-off-by: Isaac Hermida <isaac.hermida@digi.com>
2016-06-27 11:06:31 +02:00
Isaac Hermida 021bc9d29d kernel-module-qualcomm: qualcomm-pre-up: compatibility improvement for modprobe
The root filesystem can have installed the busybox modprobe implementation or
the kmod modprobe implementation.
Check the version installed and compound the modprobe arguments.

Signed-off-by: Isaac Hermida <isaac.hermida@digi.com>
2016-06-27 11:06:31 +02:00
Isaac Hermida 9cd2009300 ccimx6ul.inc: add imx-kobs as a required package
This tool is required to update the U-Boot NAND in linux.

Signed-off-by: Isaac Hermida <isaac.hermida@digi.com>
2016-06-27 11:06:30 +02:00
Isaac Hermida 0793dbf75b ccimx6ul.inc: add kernel-module-qualcomm as machine feature if wifi is set
https://jira.digi.com/browse/DEL-2653

Signed-off-by: Isaac Hermida <isaac.hermida@digi.com>
2016-06-22 14:49:17 +02:00
Isaac Hermida bf32fec01e kernel-module-qualcomm: initial support to compile qca6564 module externally
Add recipe kernel-module-qualcomm to compile kernel module externally with all
the patches for kernel 4.1.15.

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

Signed-off-by: Isaac Hermida <isaac.hermida@digi.com>
2016-06-22 14:49:17 +02:00
Isaac Hermida 6809d1f568 ccimx6ul: defconfig: compile 80211 modules as built in
We compile those modules as built in to avoid a mismatch
between the current kernel version and the wlan.ko module.

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

Signed-off-by: Isaac Hermida <isaac.hermida@digi.com>
2016-06-21 18:36:17 +02:00
Javier Viguera a2aaa26e50 meta-digi-arm: use linux branch 'v3.14/master'
Signed-off-by: Javier Viguera <javier.viguera@digi.com>
2016-06-21 11:50:27 +02:00
Javier Viguera 1e16f6af66 meta-digi: global replace base_contains function
This function is deprecated in favor of bb.utils.contains. The same
change has been done in other layers.

Signed-off-by: Javier Viguera <javier.viguera@digi.com>
2016-06-21 11:15:28 +02:00
Javier Viguera e2fb845970 ccimx6ulstarter: remove sdcard image creation
The CC6UL does not support booting from SD card, so it does not make
sense to create a SDCARD image by default.

Signed-off-by: Javier Viguera <javier.viguera@digi.com>
2016-06-20 19:18:49 +02:00
Jose Diaz de Grenu de Pedro 62e0e1c6c6 meta-digi-arm: u-boot: fix trustfence checks logic
There are several possible values for TRUSTFENCE_UBOOT_ENV_DEK:
 * Not defined: if the trustfence support is not included.
                Should not include the feature.
 * 32 characters: when defining a valid key.
                Should include the feature.
 * "0": when explicetily disabling the feature.
                Should not include the feature
 * <other>: Invalid value, should trigger the error.

This commits fixes the logic so that 'None' (no defined) is taken as a valid
value.

Signed-off-by: Jose Diaz de Grenu de Pedro <Jose.DiazdeGrenudePedro@digi.com>
2016-06-20 15:04:47 +02:00