Add mbedtls support and sample applications
cover Add mbedtls support and sample applications
From: Amit Kucheria <[email protected]>
MBed TLS is a library that implements cryptographic primitives and SSL/TLS and DTLS protocols that are needed in secure network communications.
Add it to the kernel include files to build and link against applications that need mbedtls. Add a few sample applications that utilize mbedtls library too.
Amit Kucheria (5):
zephyr-kernel: Clone mbedtls
zephyr-echo-client: Add recipe for echo client
zephyr-http-client: Add recipe for http client
zephyr-websocket-client: Add recipe for websocket client
zephyr-mqtt-publisher: Add recipe for mqtt publisher
recipes-kernel/zephyr-kernel/zephyr-echo-client.bb | 5 +++++ recipes-kernel/zephyr-kernel/zephyr-http-client.bb | 5 +++++ recipes-kernel/zephyr-kernel/zephyr-kernel-common.inc | 1 + recipes-kernel/zephyr-kernel/zephyr-kernel-src-2.6.0-rc1.inc | 1 + recipes-kernel/zephyr-kernel/zephyr-kernel-src.inc | 1 + recipes-kernel/zephyr-kernel/zephyr-mqtt-publisher.bb | 5 +++++ recipes-kernel/zephyr-kernel/zephyr-websocket-client.bb | 5 +++++ 7 files changed, 23 insertions(+) create mode 100644 recipes-kernel/zephyr-kernel/zephyr-echo-client.bb create mode 100644 recipes-kernel/zephyr-kernel/zephyr-http-client.bb create mode 100644 recipes-kernel/zephyr-kernel/zephyr-mqtt-publisher.bb create mode 100644 recipes-kernel/zephyr-kernel/zephyr-websocket-client.bb
Signature · 1 line
2.25.1
PATCH 1/5 zephyr-kernel: Clone mbedtls
From: Amit Kucheria <[email protected]>
MBed TLS is a library that implements cryptographic primitives and SSL/TLS and DTLS protocols that are needed in secure network communications.
Add it to the kernel include files to build and link against applications that need mbedtls.
--- recipes-kernel/zephyr-kernel/zephyr-kernel-common.inc | 1 + recipes-kernel/zephyr-kernel/zephyr-kernel-src-2.6.0-rc1.inc | 1 + recipes-kernel/zephyr-kernel/zephyr-kernel-src.inc | 1 + 3 files changed, 3 insertions(+)
recipes-kernel/zephyr-kernel/zephyr-kernel-common.inc +1 -0
@@ -28,6 +28,7 @@ ZEPHYR_MODULES = "" ZEPHYR_MODULES_append_arm = "\;${S}/modules/cmsis" ZEPHYR_MODULES_append_nordic = "\;${S}/modules/hal/nordic" ZEPHYR_MODULES_append_stm32 = "\;${S}/modules/hal/stm32" +ZEPHYR_MODULES_append_mbedtls = "\;${S}/modules/lib/mbedtls" ZEPHYR_MODULES_append_openamp = "\;${S}/modules/lib/open-amp\;${S}/modules/hal/libmetal" EXTRA_OECMAKE_append = " -DZEPHYR_MODULES=${ZEPHYR_MODULES}"
recipes-kernel/zephyr-kernel/zephyr-kernel-src-2.6.0-rc1.inc +1 -0
@@ -6,5 +6,6 @@ SRCREV_stm32 = "f8ff8d25aa0a9e65948040c7b47ec67f3fa300df" SRCREV_open-amp = "6010f0523cbc75f551d9256cf782f173177acdef" SRCREV_libmetal = "39d049d4ae68e6f6d595fce7de1dcfc1024fb4eb" SRCREV_tinycrypt = "3e9a49d2672ec01435ffbf0d788db6d95ef28de0" +SRCREV_mbedtls = "5765cb7f75a9973ae9232d438e361a9d7bbc49e7" PV = "2.6.0-rc1+git${SRCPV}"
recipes-kernel/zephyr-kernel/zephyr-kernel-src.inc +1 -0
@@ -17,6 +17,7 @@ SRC_URI = "\ git://github.com/zephyrproject-rtos/cmsis.git;protocol=https;destsuffix=git/modules/cmsis;name=cmsis \ git://github.com/zephyrproject-rtos/hal_nordic.git;protocol=https;destsuffix=git/modules/hal/nordic;name=nordic \ git://github.com/zephyrproject-rtos/hal_stm32.git;protocol=https;destsuffix=git/modules/hal/stm32;name=stm32 \ + git://github.com/zephyrproject-rtos/mbedtls.git;protocol=https;destsuffix=git/modules/lib/mbedtls;name=mbedtls \ git://github.com/zephyrproject-rtos/open-amp.git;protocol=https;destsuffix=git/modules/lib/open-amp;name=open-amp \ git://github.com/zephyrproject-rtos/libmetal.git;protocol=https;destsuffix=git/modules/hal/libmetal;name=libmetal \ git://github.com/zephyrproject-rtos/tinycrypt.git;protocol=https;destsuffix=git/modules/crypto/tinycrypt;name=tinycrypt \
Signature · 1 line
2.25.1
Re: [meta-zephyr][PATCH 1/5] zephyr-kernel: Clone mbedtls
V2.6.0-rc1 patch is not merged as it is pre-release. Lets wait for stable release. Could you please rebase these patches for v2.5.0 latest master ?
Regards,
Naveen
Quoted 79 lines
-----Original Message-----
From: [email protected] <[email protected]>
Sent: Wednesday, May 26, 2021 11:36 PM
To: [email protected]; [email protected]; [email protected]; Saini, Naveen Kumar <[email protected]>; [email protected]
Cc: Amit Kucheria <[email protected]>
Subject: [meta-zephyr][PATCH 1/5] zephyr-kernel: Clone mbedtlsFrom: Amit Kucheria <[email protected]>
MBed TLS is a library that implements cryptographic primitives and SSL/TLS and DTLS protocols that are needed in secure network communications.
Add it to the kernel include files to build and link against applications that need mbedtls.
Signed-off-by Amit Kucheria <[email protected]>--- recipes-kernel/zephyr-kernel/zephyr-kernel-common.inc | 1 + recipes-kernel/zephyr-kernel/zephyr-kernel-src-2.6.0-rc1.inc | 1 + recipes-kernel/zephyr-kernel/zephyr-kernel-src.inc | 1 + 3 files changed, 3 insertions(+)recipes-kernel/zephyr-kernel/zephyr-kernel-common.inc +1
-0@@ -28,6 +28,7 @@ ZEPHYR_MODULES = "" ZEPHYR_MODULES_append_arm = "\;${S}/modules/cmsis" ZEPHYR_MODULES_append_nordic = "\;${S}/modules/hal/nordic" ZEPHYR_MODULES_append_stm32 = "\;${S}/modules/hal/stm32" +ZEPHYR_MODULES_append_mbedtls = "\;${S}/modules/lib/mbedtls" ZEPHYR_MODULES_append_openamp = "\;${S}/modules/lib/open-amp\;${S}/modules/hal/libmetal"
EXTRA_OECMAKE_append= " -DZEPHYR_MODULES=${ZEPHYR_MODULES}"recipes-kernel/zephyr-kernel/zephyr-kernel-src-2.6.0-rc1.inc +0
-0@@ -6,5 +6,6 @@ SRCREV_stm32 ="
f8ff8d25aa0a9e65948040c7b47ec67f3fa300df"
SRCREV_open-amp = "6010f0523cbc75f551d9256cf782f173177acdef"SRCREV_libmetal= "39d049d4ae68e6f6d595fce7de1dcfc1024fb4eb"SRCREV_tinycrypt= "3e9a49d2672ec01435ffbf0d788db6d95ef28de0"recipes-kernel/zephyr-kernel/zephyr-kernel-src-2.6.0-rc1.inc +1
-0+SRCREV_mbedtls = "5765cb7f75a9973ae9232d438e361a9d7bbc49e7" PV = "2.6.0-rc1+git${SRCPV}"recipes- renamed from recipes-kernel/zephyr-kernel/zephyr-kernel-src.inc +0
-0
kernel/zephyr-kernel/zephyr-kernel-src.inc
index9fc08baaf210..8dcfec6f1f88100644recipes-kernel/zephyr-kernel/zephyr-kernel-src.inc +0
-0@@ -17,6 +17,7 @@ SRC_URI = "\ git://github.com/zephyrproject- rtos/cmsis.git;protocol=https;destsuffix=git/modules/cmsis;name=cmsis \ git://github.com/zephyrproject-rtos/hal_nordic.git;protocol=https;destsuffix=git/modules/hal/nordic;name= nordic \
git://github.com/zephyrproject-
rtos/hal_stm32.git;protocol=https;destsuffix=git/modules/hal/stm32;name= stm32 \
+
+git://github.com/zephyrproject-rtos/mbedtls.git;protocol=https;destsuf
+ fix=git/modules/lib/mbedtls;name=mbedtls \
git://github.com/zephyrproject-rtos/open-
amp.git;protocol=https;destsuffix=git/modules/lib/open-amp;name=open- amp \
git://github.com/zephyrproject-
rtos/libmetal.git;protocol=https;destsuffix=git/modules/hal/libmetal;name=l ibmetal \
git://github.com/zephyrproject-
rtos/tinycrypt.git;protocol=https;destsuffix=git/modules/crypto/tinycrypt;na me=tinycrypt \
--
2.25.1
PATCH 2/5 zephyr-echo-client: Add recipe for echo client
In reply to [email protected]From: Amit Kucheria <[email protected]>
This sample application provides an example of using the the MBEDTLS library.
--- recipes-kernel/zephyr-kernel/zephyr-echo-client.bb | 5 +++++ 1 file changed, 5 insertions(+) create mode 100644 recipes-kernel/zephyr-kernel/zephyr-echo-client.bb
recipes-kernel/zephyr-kernel/zephyr-echo-client.bb new file +5 -0
@@ -0,0 +1,5 @@ +include zephyr-sample.inc + +ZEPHYR_SRC_DIR = "${S}/samples/net/sockets/echo_client" + +ZEPHYR_MODULES_append = "\;${S}/modules/lib/mbedtls"
Signature · 1 line
2.25.1
PATCH 3/5 zephyr-http-client: Add recipe for http client
In reply to [email protected]From: Amit Kucheria <[email protected]>
This sample application provides an example of using the the MBEDTLS library.
--- recipes-kernel/zephyr-kernel/zephyr-http-client.bb | 5 +++++ 1 file changed, 5 insertions(+) create mode 100644 recipes-kernel/zephyr-kernel/zephyr-http-client.bb
recipes-kernel/zephyr-kernel/zephyr-http-client.bb new file +5 -0
@@ -0,0 +1,5 @@ +include zephyr-sample.inc + +ZEPHYR_SRC_DIR = "${S}/samples/net/sockets/http_client" + +ZEPHYR_MODULES_append = "\;${S}/modules/lib/mbedtls"
Signature · 1 line
2.25.1
PATCH 4/5 zephyr-websocket-client: Add recipe for websocket client
In reply to [email protected]From: Amit Kucheria <[email protected]>
This sample application provides an example of using the the MBEDTLS library.
--- recipes-kernel/zephyr-kernel/zephyr-websocket-client.bb | 5 +++++ 1 file changed, 5 insertions(+) create mode 100644 recipes-kernel/zephyr-kernel/zephyr-websocket-client.bb
recipes-kernel/zephyr-kernel/zephyr-websocket-client.bb new file +5 -0
@@ -0,0 +1,5 @@ +include zephyr-sample.inc + +ZEPHYR_SRC_DIR = "${S}/samples/net/sockets/websocket_client" + +ZEPHYR_MODULES_append = "\;${S}/modules/lib/mbedtls"
Signature · 1 line
2.25.1
PATCH 5/5 zephyr-mqtt-publisher: Add recipe for mqtt publisher
In reply to [email protected]From: Amit Kucheria <[email protected]>
This sample application provides an example of using the the MBEDTLS library.
--- recipes-kernel/zephyr-kernel/zephyr-mqtt-publisher.bb | 5 +++++ 1 file changed, 5 insertions(+) create mode 100644 recipes-kernel/zephyr-kernel/zephyr-mqtt-publisher.bb
recipes-kernel/zephyr-kernel/zephyr-mqtt-publisher.bb new file +5 -0
@@ -0,0 +1,5 @@ +include zephyr-sample.inc + +ZEPHYR_SRC_DIR = "${S}/samples/net/mqtt_publisher" + +ZEPHYR_MODULES_append = "\;${S}/modules/lib/mbedtls"
Signature · 1 line
2.25.1