From ff93cd2b28dde5b87f1126a811d3de25af2afa18 Mon Sep 17 00:00:00 2001 From: "Diaz de Grenu, Jose" Date: Fri, 26 May 2017 12:55:16 +0200 Subject: [PATCH] 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 --- .../conf/machine/include/ccimx6ul.inc | 2 +- .../ATMEL_CRYPTOAUTHLIB_LICENSE | 27 +++++++++++++++++ .../cryptoauthlib/cryptoauthlib_git.bb | 30 +++++++++++++++++++ 3 files changed, 58 insertions(+), 1 deletion(-) create mode 100644 meta-digi-dey/custom-licenses/ATMEL_CRYPTOAUTHLIB_LICENSE create mode 100644 meta-digi-dey/recipes-digi/cryptoauthlib/cryptoauthlib_git.bb diff --git a/meta-digi-arm/conf/machine/include/ccimx6ul.inc b/meta-digi-arm/conf/machine/include/ccimx6ul.inc index a75fcb089..de42135e9 100644 --- a/meta-digi-arm/conf/machine/include/ccimx6ul.inc +++ b/meta-digi-arm/conf/machine/include/ccimx6ul.inc @@ -29,7 +29,7 @@ MACHINE_EXTRA_RDEPENDS += " \ u-boot-fw-utils \ " MACHINE_EXTRA_RRECOMMENDS += "${MACHINE_FIRMWARE} ${WIRELESS_MODULE}" -MACHINE_EXTRA_RRECOMMENDS += "imx-alsa-plugins cryptodev-module" +MACHINE_EXTRA_RRECOMMENDS += "imx-alsa-plugins cryptodev-module cryptoauthlib" MACHINE_FEATURES += "wifi bluetooth" diff --git a/meta-digi-dey/custom-licenses/ATMEL_CRYPTOAUTHLIB_LICENSE b/meta-digi-dey/custom-licenses/ATMEL_CRYPTOAUTHLIB_LICENSE new file mode 100644 index 000000000..cc9ab017b --- /dev/null +++ b/meta-digi-dey/custom-licenses/ATMEL_CRYPTOAUTHLIB_LICENSE @@ -0,0 +1,27 @@ +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions are met: + +1. Redistributions of source code must retain the above copyright notice, + this list of conditions and the following disclaimer. + +2. Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + +3. The name of Atmel may not be used to endorse or promote products derived + from this software without specific prior written permission. + +4. This software may only be redistributed and used in connection with an + Atmel integrated circuit. + +THIS SOFTWARE IS PROVIDED BY ATMEL "AS IS" AND ANY EXPRESS OR IMPLIED +WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF +MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT ARE +EXPRESSLY AND SPECIFICALLY DISCLAIMED. IN NO EVENT SHALL ATMEL BE LIABLE FOR +ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS +OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) +HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, +STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN +ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE +POSSIBILITY OF SUCH DAMAGE. diff --git a/meta-digi-dey/recipes-digi/cryptoauthlib/cryptoauthlib_git.bb b/meta-digi-dey/recipes-digi/cryptoauthlib/cryptoauthlib_git.bb new file mode 100644 index 000000000..9e2e7c12c --- /dev/null +++ b/meta-digi-dey/recipes-digi/cryptoauthlib/cryptoauthlib_git.bb @@ -0,0 +1,30 @@ +# Copyright (C) 2017, Digi International Inc. + +SUMMARY = "Atmel CryptoAuthentication Library" +SECTION = "libs" +LICENSE = "ATMEL_CRYPTOAUTHLIB_LICENSE" +LIC_FILES_CHKSUM = "file://lib/atca_cfgs.h;beginline=8;endline=40;md5=073d05cb7a4312aaff0af9186e4fa93e" + +SRCBRANCH = "master" +SRCREV = "${AUTOREV}" + +GIT_URI ?= "${@base_conditional('DIGI_INTERNAL_GIT', '1' , '${DIGI_MTK_GIT}linux/atmel-cryptoauth-openssl-engine.git;protocol=ssh', '${DIGI_GITHUB_GIT}/atmel-cryptoauth-openssl-engine.git', d)}" + +SRC_URI = "${GIT_URI};branch=${SRCBRANCH}" + +S = "${WORKDIR}/git/engine_atecc/cryptoauthlib" + +I2C_BUS = "" +I2C_BUS_ccimx6ul = "0" + +I2C_SPEED = "" +I2C_SPEED_ccimx6ul = "100000" + +CFLAGS += "-DATCA_HAL_I2C_BUS=${I2C_BUS} -DATCA_HAL_I2C_SPEED=${I2C_SPEED}" + +do_install() { + oe_runmake DESTDIR=${D} install +} + +PACKAGE_ARCH = "${MACHINE_ARCH}" +COMPATIBLE_MACHINE = "(ccimx6ul)" \ No newline at end of file