mailarchive of the ptxdist mailing list
 help / color / mirror / Atom feed
From: "Ulrich Ölmann" <u.oelmann@pengutronix.de>
To: PTXdist Development Mailing List <ptxdist@pengutronix.de>
Subject: [ptxdist] [PATCH v5 1/3] mbedtls: new package
Date: Wed,  5 Feb 2020 11:42:39 +0100	[thread overview]
Message-ID: <20200205104241.19603-1-u.oelmann@pengutronix.de> (raw)

From: Björn Esser <b.esser@pengutronix.de>

mbed TLS (formerly known as PolarSSL) makes it trivially easy
for developers to include cryptographic and SSL/TLS capabilities
in their (embedded) products, facilitating this functionality
with a minimal coding footprint.

Unfortunately the upcoming open62541 package cannot be built
against OpenSSL. To enable its SSL functionality mbed TLS is
needed.

Signed-off-by: Björn Esser <b.esser@pengutronix.de>
[uol: adjusted commit message]
Signed-off-by: Ulrich Ölmann <u.oelmann@pengutronix.de>
---
v2 --> v3: adjusted commit message

 rules/mbedtls.in   | 13 +++++++++
 rules/mbedtls.make | 66 ++++++++++++++++++++++++++++++++++++++++++++++
 2 files changed, 79 insertions(+)
 create mode 100644 rules/mbedtls.in
 create mode 100644 rules/mbedtls.make

diff --git a/rules/mbedtls.in b/rules/mbedtls.in
new file mode 100644
index 000000000000..a0d58dbd5468
--- /dev/null
+++ b/rules/mbedtls.in
@@ -0,0 +1,13 @@
+## SECTION=system_libraries
+
+config MBEDTLS
+	tristate
+	prompt "mbedtls"
+	select HOST_CMAKE
+	select LIBC_PTHREAD
+	select ZLIB
+	help
+	  mbed TLS (formerly known as PolarSSL) makes it trivially easy
+	  for developers to include cryptographic and SSL/TLS capabilities
+	  in their (embedded) products, facilitating this functionality
+	  with a minimal coding footprint.
diff --git a/rules/mbedtls.make b/rules/mbedtls.make
new file mode 100644
index 000000000000..0086492fc029
--- /dev/null
+++ b/rules/mbedtls.make
@@ -0,0 +1,66 @@
+# -*-makefile-*-
+#
+# Copyright (C) 2019 by Bjoern Esser <bes@pengutronix.de>
+#
+# For further information about the PTXdist project and license conditions
+# see the README file.
+#
+
+#
+# We provide this package
+#
+PACKAGES-$(PTXCONF_MBEDTLS) += mbedtls
+
+#
+# Paths and names
+#
+MBEDTLS_VERSION		:= 2.16.3
+MBEDTLS_MD5		:= 90ce7c7a001d2514410280706b3ab1a7
+MBEDTLS			:= mbedtls-$(MBEDTLS_VERSION)
+MBEDTLS_SUFFIX		:= tgz
+MBEDTLS_URL		:= https://tls.mbed.org/download/$(MBEDTLS)-apache.$(MBEDTLS_SUFFIX)
+MBEDTLS_SOURCE		:= $(SRCDIR)/$(MBEDTLS).$(MBEDTLS_SUFFIX)
+MBEDTLS_DIR		:= $(BUILDDIR)/$(MBEDTLS)
+MBEDTLS_LICENSE		:= Apache-2.0
+MBEDTLS_LICENSE_FILES	:= file://apache-2.0.txt;md5=3b83ef96387f14655fc854ddc3c6bd57
+
+# ----------------------------------------------------------------------------
+# Prepare
+# ----------------------------------------------------------------------------
+
+#
+# cmake
+#
+MBEDTLS_CONF_TOOL	:= cmake
+MBEDTLS_CONF_OPT	:= \
+	$(CROSS_CMAKE_USR) \
+	-DENABLE_PROGRAMS=OFF \
+	-DENABLE_TESTING=OFF \
+	-DENABLE_ZLIB_SUPPORT=ON \
+	-DINSTALL_MBEDTLS_HEADERS=ON \
+	-DLINK_WITH_PTHREAD=ON \
+	-DUNSAFE_BUILD=OFF \
+	-DUSE_PKCS11_HELPER_LIBRARY=OFF \
+	-DUSE_SHARED_MBEDTLS_LIBRARY=ON \
+	-DUSE_STATIC_MBEDTLS_LIBRARY=OFF
+
+# ----------------------------------------------------------------------------
+# Target-Install
+# ----------------------------------------------------------------------------
+
+$(STATEDIR)/mbedtls.targetinstall:
+	@$(call targetinfo)
+
+	@$(call install_init, mbedtls)
+	@$(call install_fixup, mbedtls,PRIORITY,optional)
+	@$(call install_fixup, mbedtls,SECTION,base)
+	@$(call install_fixup, mbedtls,AUTHOR,"Bjoern Esser <bes@pengutronix.de>")
+	@$(call install_fixup, mbedtls,DESCRIPTION,missing)
+
+	@$(call install_lib, mbedtls, 0, 0, 0644, libmbedcrypto)
+	@$(call install_lib, mbedtls, 0, 0, 0644, libmbedtls)
+	@$(call install_lib, mbedtls, 0, 0, 0644, libmbedx509)
+
+	@$(call install_finish, mbedtls)
+
+	@$(call touch)
-- 
2.25.0


_______________________________________________
ptxdist mailing list
ptxdist@pengutronix.de

             reply	other threads:[~2020-02-05 10:42 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-02-05 10:42 Ulrich Ölmann [this message]
2020-02-05 10:42 ` [ptxdist] [PATCH v5 2/3] host-ua-nodeset: " Ulrich Ölmann
2020-02-05 10:42 ` [ptxdist] [PATCH v5 3/3] open62541: " Ulrich Ölmann
2020-02-14 12:50   ` Michael Olbrich
2020-02-17  9:50     ` Roland Hieber
2020-02-17 10:32       ` Michael Olbrich
2020-03-11 15:42         ` Ulrich Ölmann
2020-03-11 15:40     ` Ulrich Ölmann
2020-02-15  9:58   ` Michael Olbrich
2020-03-11 15:38     ` Ulrich Ölmann
2020-02-17  9:39 ` [ptxdist] [PATCH v5 1/3] mbedtls: " Michael Olbrich
2020-03-11 15:36   ` Ulrich Ölmann

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20200205104241.19603-1-u.oelmann@pengutronix.de \
    --to=u.oelmann@pengutronix.de \
    --cc=ptxdist@pengutronix.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox