zephyr-kernel: Clone mbedtls
v2 cover 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. 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.5.0.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 v2 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.5.0.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.5.0.inc +1 -0
@@ -6,6 +6,7 @@ SRCREV_stm32 = "cc8731dba4fd9c57d7fe8ea6149828b89c2bd635" SRCREV_open-amp = "de1b85a13032a2de1d8b6695ae5f800b613e739d" SRCREV_libmetal = "9d4ee2c3cfd5f49861939447990f3b7d7bf9bf94" SRCREV_tinycrypt = "3e9a49d2672ec01435ffbf0d788db6d95ef28de0" +SRCREV_mbedtls = "5765cb7f75a9973ae9232d438e361a9d7bbc49e7" PV = "2.5.0+git${SRCPV}"
recipes-kernel/zephyr-kernel/zephyr-kernel-src.inc +1 -0
@@ -13,6 +13,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
PATCH v2 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 v2 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 v2 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 v2 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
Quoted 32 lines
-----Original Message-----
From: [email protected] <[email protected]>
Sent: Monday, June 7, 2021 2:01 PM
To: [email protected]; [email protected]; [email protected]; Saini, Naveen Kumar <[email protected]>
Cc: Amit Kucheria <[email protected]>
Subject: [meta-zephyr][PATCHv2 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.5.0.inc | 1 + recipes-kernel/zephyr-kernel/zephyr-kernel-src.inc | 1 + 3 files changed, 3 insertions(+)recipes-kernel/zephyr-kernel/zephyr-kernel-common.inc +0
-0
recipes-kernel/zephyr-kernel/zephyr-kernel-common.inc ZEPHYR_MODULES = "" · line 31
Quoted 4 lines
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"
Why override used here? I can see all new samples already adding mbedtls to ZEPHYR_MODULES
Quoted 46 lines
recipes-kernel/zephyr-kernel/zephyr-kernel-common.inc +0
-0ZEPHYR_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.5.0.inc +0
-0@@ -6,6 +6,7 @@ SRCREV_stm32 ="
cc8731dba4fd9c57d7fe8ea6149828b89c2bd635"
SRCREV_open-amp = "de1b85a13032a2de1d8b6695ae5f800b613e739d"SRCREV_libmetal= "9d4ee2c3cfd5f49861939447990f3b7d7bf9bf94"SRCREV_tinycrypt= "3e9a49d2672ec01435ffbf0d788db6d95ef28de0"recipes-kernel/zephyr-kernel/zephyr-kernel-src-2.5.0.inc +1
-0+SRCREV_mbedtls = "5765cb7f75a9973ae9232d438e361a9d7bbc49e7" PV = "2.5.0+git${SRCPV}"recipes- renamed from recipes-kernel/zephyr-kernel/zephyr-kernel-src.inc +0
-0
kernel/zephyr-kernel/zephyr-kernel-src.inc
index1d06d916a1e0..069fa561667c100644recipes-kernel/zephyr-kernel/zephyr-kernel-src.inc +0
-0@@ -13,6 +13,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
Build failing:
Could not open 'poky/build-zephyr/tmp-newlib/work/armv7m-yocto-eabi/zephyr-mqtt-publisher/2.5.0+gitAUTOINC+fe7c2efca8_c3bd2094f9-r0/git/' (in 'osource "$(ZEPHYR_MBEDTLS_KCONFIG)"') (EISDIR: Is a directory)
To fix, can you try following revision for mbedtls.
- name: mbedtls
revision: 24d84ecff195fb15c889d9046e44e4804d626c67
https://github.com/zephyrproject-rtos/zephyr/blob/zephyr-v2.5.0/west.yml#L94
Regards,
Naveen
Quoted 80 lines
-----Original Message-----
From: [email protected] <[email protected]>
Sent: Monday, June 7, 2021 2:01 PM
To: [email protected]; [email protected]; [email protected]; Saini, Naveen Kumar <[email protected]>
Cc: Amit Kucheria <[email protected]>
Subject: [meta-zephyr][PATCHv2 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.5.0.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.5.0.inc +0
-0@@ -6,6 +6,7 @@ SRCREV_stm32 ="
cc8731dba4fd9c57d7fe8ea6149828b89c2bd635"
SRCREV_open-amp = "de1b85a13032a2de1d8b6695ae5f800b613e739d"SRCREV_libmetal= "9d4ee2c3cfd5f49861939447990f3b7d7bf9bf94"SRCREV_tinycrypt= "3e9a49d2672ec01435ffbf0d788db6d95ef28de0"recipes-kernel/zephyr-kernel/zephyr-kernel-src-2.5.0.inc +1
-0+SRCREV_mbedtls = "5765cb7f75a9973ae9232d438e361a9d7bbc49e7" PV = "2.5.0+git${SRCPV}"recipes- renamed from recipes-kernel/zephyr-kernel/zephyr-kernel-src.inc +0
-0
kernel/zephyr-kernel/zephyr-kernel-src.inc
index1d06d916a1e0..069fa561667c100644recipes-kernel/zephyr-kernel/zephyr-kernel-src.inc +0
-0@@ -13,6 +13,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
Made few changes in this patch. Re-sent patchset including some additional patches.
Regards,
Naveen
Quoted 143 lines
-----Original Message-----
From: Amit Kucheria <[email protected]>
Sent: Tuesday, June 8, 2021 7:11 PM
To: Saini, Naveen Kumar <[email protected]>; [email protected]; [email protected]; Wojciech Zmuda <[email protected]>; Andrei Gherzan <[email protected]>
Subject: RE: [meta-zephyr][PATCHv2 1/5] zephyr-kernel: Clone mbedtlsHi Naveen,
I'll take a look with the specific revision ID mentioned. I don't see a build failure here locally.
On a related note, since 2.6 is now released, should we just focus on getting all this working on 2.6 (assuming you'll move meta-zephyr to it soon)?
Regards,
AmitQuoted 67 lines
-----Original Message-----
From: Saini, Naveen Kumar [mailto:[email protected]]
Sent: 08 June 2021 16:10
To: [email protected]; [email protected]; Wojciech Zmuda <[email protected]>; Andrei Gherzan <[email protected]>
Cc: Amit Kucheria <[email protected]>
Subject: RE: [meta-zephyr][PATCHv2 1/5] zephyr-kernel: Clone mbedtlsBuild failing:
Could not open 'poky/build-zephyr/tmp-newlib/work/armv7m-yocto- eabi/zephyr-mqtt-publisher/2.5.0+gitAUTOINC+fe7c2efca8_c3bd2094f9- r0/git/' (in 'osource "$(ZEPHYR_MBEDTLS_KCONFIG)"') (EISDIR: Is a directory)
To fix, can you try following revision for mbedtls.
- name: mbedtls
revision:24d84ecff195fb15c889d9046e44e4804d626c67
https://github.com/zephyrproject-rtos/zephyr/blob/zephyr-
v2.5.0/west.yml#L94Regards,
NaveenQuoted 9 lines
-----Original Message-----
From: [email protected] <[email protected]>
Sent: Monday, June 7, 2021 2:01 PM
To: [email protected]; [email protected]; [email protected]; Saini, Naveen Kumar <[email protected]>
Cc: Amit Kucheria <[email protected]>
Subject: [meta-zephyr][PATCHv2 1/5] zephyr-kernel: Clone mbedtlsQuoted 4 lines
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.
Quoted 24 lines
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.5.0.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"
Quoted 1 line
Quoted 1 line
EXTRA_OECMAKE_append= " -DZEPHYR_MODULES=${ZEPHYR_MODULES}"
Quoted 15 lines
Quoted 15 lines
diff --git a/recipes-kernel/zephyr-kernel/zephyr-kernel-src-2.5.0.inc b/recipes-kernel/zephyr-kernel/zephyr-kernel-src-2.5.0.inc index
5d66f0f3cb5b..3aeb3bf6fc3f100644recipes-kernel/zephyr-kernel/zephyr-kernel-src-2.5.0.inc +0
-0@@ -6,6 +6,7 @@ SRCREV_stm32 ="
cc8731dba4fd9c57d7fe8ea6149828b89c2bd635"
SRCREV_open-amp = "de1b85a13032a2de1d8b6695ae5f800b613e739d"SRCREV_libmetal= "9d4ee2c3cfd5f49861939447990f3b7d7bf9bf94"SRCREV_tinycrypt= "3e9a49d2672ec01435ffbf0d788db6d95ef28de0"
+SRCREV_mbedtls = "5765cb7f75a9973ae9232d438e361a9d7bbc49e7"PV = "2.5.0+git${SRCPV}"
Quoted 8 lines
Quoted 8 lines
(quoted diff) +0
-0b/recipes-
kernel/zephyr-kernel/zephyr-kernel-src.incindex1d06d916a1e0..069fa561667c100644recipes-kernel/zephyr-kernel/zephyr-kernel-src.inc +0
-0@@ -13,6 +13,7 @@ SRC_URI = "\ git://github.com/zephyrproject-rtos/cmsis.git;protocol=https;destsuffix=git/modules/cmsis;name=cmsis
\
Quoted 7 lines
Quoted 7 lines
git://github.com/zephyrproject-
rtos/hal_nordic.git;protocol=https;destsuffix=git/modules/hal/nordic ;n
ame=
nordic \
git://github.com/zephyrproject-
rtos/hal_stm32.git;protocol=https;destsuffix=git/modules/hal/stm32;nQuoted 8 lines
Quoted 8 lines
am
e=
stm32 \
+
+git://github.com/zephyrproject-rtos/mbedtls.git;protocol=https;des
+ ts uf 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
Quoted 14 lines
Quoted 14 lines
-
amp \
git://github.com/zephyrproject-
rtos/libmetal.git;protocol=https;destsuffix=git/modules/hal/libmetal ;n
ame=l
ibmetal \
git://github.com/zephyrproject-
rtos/tinycrypt.git;protocol=https;destsuffix=git/modules/crypto/tiny cr
ypt;na
me=tinycrypt \
--
2.25.1