Skip to contentSkip to conversation

ti-crypto-examples: Add cryptography example C applications

PATCH New Chase Maupin 1 participant 4 messages Nov 27, 2012

lore
Share & tools
lore
#0 lore raw

PATCH 1/4 ti-crypto-examples: Add cryptography example C applications

* Added recipe to build example C applications that use the openssl libraries for cryptographic operations.

---
 .../ti-crypto-examples/ti-crypto-examples_git.bb   |   23 ++++++++++++++++++++
 1 files changed, 23 insertions(+), 0 deletions(-)
 create mode 100644 meta-arago-extras/recipes-core/ti-crypto-examples/ti-crypto-examples_git.bb
meta-arago-extras/recipes-core/ti-crypto-examples/ti-crypto-examples_git.bb new file +23 -0
new file mode 100644
index 0000000..a35524f
@@ -0,0 +1,23 @@
+DESCRIPTION = "TI Cryptography Example Applications"
+HOMEPAGE = "http://arago-project.org/git/projects/?p=crypto-example-apps.git;a=summary"
+LICENSE = "BSD"
+LIC_FILES_CHKSUM = "file://AES/aes_256.c;beginline=9;endline=35;md5=8edbb4dee965d2f2eb5ca2822addcae5"
+SECTION = "console"
+
+PR = "r0"
+
+BRANCH ?= "master"
+SRCREV = "d3cc223206367a02097c7ad4e997cf2bef975277"
+
+SRC_URI = "git://arago-project.org/git/projects/crypto-example-apps.git;protocol=git;branch=${BRANCH}"
+
+S = "${WORKDIR}/git"
+
+do_compile() {
+    # build the release version
+    oe_runmake release
+}
+
+do_install() {
+    oe_runmake DESTDIR=${D} install
+}
Signature · 1 line
1.7.0.4
#1 lore raw

PATCH 2/4 crypto-tasks: Add ti-crypto-examples

* Add the ti-crypto-examples package to the list of crypto tasks for both the host and target.
* Add the ti-crypto-examples package to the arago-source-ipk conf file to generate the sourceipk.

---
 .../conf/distro/arago-source-ipk.conf              |    3 +++
 .../tasks/task-arago-tisdk-crypto-sdk-host.bb      |   10 ++++++----
 .../recipes-core/tasks/task-arago-tisdk-crypto.bb  |    3 ++-
 3 files changed, 11 insertions(+), 5 deletions(-)
meta-arago-distro/conf/distro/arago-source-ipk.conf +3 -0
index bbc0662..d23e564 100644
@@ -46,6 +46,9 @@ SRCIPK_INSTALL_DIR_pn-ti-tisdk-licenses = "docs/licenses"
 CREATE_SRCIPK_pn-matrix-gui = "1"
 SRCIPK_INSTALL_DIR_pn-matrix-gui = "example-applications/${PN}-${PV}"
 
+CREATE_SRCIPK_pn-ti-crypto-examples = "1"
+SRCIPK_INSTALL_DIR_pn-ti-crypto-examples = "example-applications/${PN}-${PV}"
+
 CREATE_SRCIPK_pn-qml-carinfo = "1"
 SRCIPK_INSTALL_DIR_pn-qml-carinfo = "example-applications/${PN}-${PV}"
 
meta-arago-distro/recipes-core/tasks/task-arago-tisdk-crypto-sdk-host.bb +6 -4
index 12e3362..aca04f9 100644
@@ -2,20 +2,22 @@ DESCRIPTION = "Task to install crypto sources in SDK"
 LICENSE = "MIT"
 LIC_FILES_CHKSUM = "file://${COREBASE}/meta/COPYING.MIT;md5=3da9cfbcb788c80a0384361b4de20420"
 
-PR = "r0"
+PR = "r1"
 
 inherit task
 
 PACKAGE_ARCH = "${MACHINE_ARCH}"
 ALLOW_EMPTY = "1"
 
-CRYPTO_RDEPENDS = ""
+CRYPTO_RDEPENDS = " \
+    ti-crypto-examples-src \
+"
 
-CRYPTO_RDEPENDS_am37x-evm = "\
+CRYPTO_RDEPENDS_append_am37x-evm = "\
     ti-ocf-crypto-module-src \
 "
 
-CRYPTO_RDEPENDS_am3517-evm = "\
+CRYPTO_RDEPENDS_append_am3517-evm = "\
     ti-ocf-crypto-module-src \
 "
 RDEPENDS_${PN} = "\
meta-arago-distro/recipes-core/tasks/task-arago-tisdk-crypto.bb +2 -1
index 0adfc7a..32841d1 100644
@@ -2,7 +2,7 @@ DESCRIPTION = "Task to install crypto packages into target FS"
 LICENSE = "MIT"
 LIC_FILES_CHKSUM = "file://${COREBASE}/meta/COPYING.MIT;md5=3da9cfbcb788c80a0384361b4de20420"
 
-PR = "r0"
+PR = "r1"
 
 inherit task
 
@@ -14,6 +14,7 @@ PACKAGE_ARCH = "${MACHINE_ARCH}"
 CRYPTO_SUPPORT = "\
     openssl \
     openssl-misc \
+    ti-crypto-examples \
     "
 
 # Add crypto hardware support for am37x-evm
Signature · 1 line
1.7.0.4
#2 lore raw

PATCH 3/4 ti-tisdk-makefile: add ti-crypto-examples targets

In reply to Chase Maupin

* Add the ti-crypto-examples targets to the TI SDK Makefile
* Add the CC variable to the list of variables exported by Rules.make to make cross compiling easier.

---
 .../ti-tisdk-makefile/Makefile_ti-crypto-examples  |   24 ++++++++++++++++++++
 .../ti-tisdk-makefile/ti-tisdk-makefile/Rules.make |    4 +++
 .../ti-tisdk-makefile/ti-tisdk-makefile_1.0.bb     |    4 ++-
 3 files changed, 31 insertions(+), 1 deletions(-)
 create mode 100644 meta-arago-distro/recipes-tisdk/ti-tisdk-makefile/ti-tisdk-makefile/Makefile_ti-crypto-examples
meta-arago-distro/recipes-tisdk/ti-tisdk-makefile/ti-tisdk-makefile/Makefile_ti-crypto-examples new file +24 -0
new file mode 100644
index 0000000..3588381
@@ -0,0 +1,24 @@
+# ti-crypto-examples build targets
+ti-crypto-examples:
+	@echo =================================
+	@echo    Building TI Crypto Examples
+	@echo =================================
+	@cd example-applications; cd `find . -name "*ti-crypto-examples*"`; make
+
+ti-crypto-examples_clean:
+	@echo =================================
+	@echo    Cleaning TI Crypto Examples
+	@echo =================================
+	@cd example-applications; cd `find . -name "*ti-crypto-examples*"`; make clean
+
+ti-crypto-examples_install:
+	@echo ===================================================
+	@echo   Installing TI Crypto Examples - Release version
+	@echo ===================================================
+	@cd example-applications; cd `find . -name "*ti-crypto-examples*"`; make install
+
+ti-crypto-examples_install_debug:
+	@echo =================================================
+	@echo   Installing TI Crypto Examples - Debug Version
+	@echo =================================================
+	@cd example-applications; cd `find . -name "*ti-crypto-examples*"`; make install_debug
meta-arago-distro/recipes-tisdk/ti-tisdk-makefile/ti-tisdk-makefile/Rules.make +4 -0
index 1b0a347..296e4b5 100644
@@ -20,6 +20,10 @@ export LINUX_DEVKIT_PATH=$(TI_SDK_PATH)/linux-devkit
 #Cross compiler prefix
 export CROSS_COMPILE=$(LINUX_DEVKIT_PATH)/bin/arm-arago-linux-gnueabi-
 
+#Default CC value to be used when cross compiling.  This is so that the
+#GNU Make default of "cc" is not used to point to the host compiler
+export CC=$(CROSS_COMPILE)gcc
+
 #Location of environment-setup file
 export ENV_SETUP=$(LINUX_DEVKIT_PATH)/environment-setup
 
meta-arago-distro/recipes-tisdk/ti-tisdk-makefile/ti-tisdk-makefile_1.0.bb +3 -1
index 4691df4..c6cea95 100644
@@ -17,6 +17,7 @@ SRC_URI = "\
     file://Makefile_u-boot-legacy \
     file://Makefile_matrix-gui \
     file://Makefile_arm-benchmarks \
+    file://Makefile_ti-crypto-examples \
     file://Makefile_am-sysinfo \
     file://Makefile_av-examples \
     file://Makefile_u-boot-spl \
@@ -29,11 +30,12 @@ SRC_URI = "\
     file://Makefile_wireless \
 "
 
-PR = "r3"
+PR = "r4"
 
 MAKEFILES_COMMON = "linux \
                     matrix-gui \
                     arm-benchmarks \
+                    ti-crypto-examples \
                     am-sysinfo \
                     matrix-gui-browser \
                     refresh-screen \
Signature · 1 line
1.7.0.4
#3 lore raw

PATCH 4/4 matrix-gui-apps-git: update to latest commit

In reply to Chase Maupin

* Update to the latest commit ID which changes the cryptography demos to use the C example programs instead of the openssl scripts.

---
 .../recipes-core/matrix/matrix-gui-apps-git.inc    |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)
meta-arago-extras/recipes-core/matrix/matrix-gui-apps-git.inc +2 -2
index 63e73f2..060abca 100644
@@ -4,9 +4,9 @@ LICENSE_CHECKSUM = "LICENSE;md5=6e0ae7214f6c74c149cb25f373057fa9"
 LIC_FILES_CHKSUM := "file://../${LICENSE_CHECKSUM}"
 
 SRC_URI = "git://gitorious.org/matrix-gui-v2/matrix-gui-v2-apps.git;protocol=git;branch=${BRANCH}"
-SRCREV = "df5b70b2f7cd97148855fe4d0508789c710bcc4e"
+SRCREV = "e739979100810a09a2157682e9000e40e99edbc3"
 BRANCH = "master"
-INC_PR = "r6"
+INC_PR = "r7"
 
 # Pull in the base package for installing matrix applications
 require matrix-gui-apps.inc
Signature · 1 line
1.7.0.4