Skip to content

Commit c00a098

Browse files
committed
Revert "Added mbedTLS as a submodule (#64)"
This reverts commit 2aa0fdd. The difference between upstream mbedtls and AliOS mbedtls is too huge
1 parent 1b006eb commit c00a098

File tree

160 files changed

+82438
-13
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

160 files changed

+82438
-13
lines changed

.gitmodules

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,3 @@
11
[submodule "docs"]
22
path = docs
33
url = https://github.com/pine64/bl602-docs.git
4-
5-
[submodule "components/security/mbedtls"]
6-
path = components/security/mbedtls
7-
url = https://github.com/ARMmbed/mbedtls

README.rst

Lines changed: 1 addition & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -7,8 +7,7 @@ This repository contains the Pine64 fork of Bouffalo Lab's SDK for their BL602
77
Wi-Fi/BLE Combo RISC-V SoC. Documentation, including upstream documentation,
88
translations, mirrored technical documentation, and original reverse engineered
99
documentation is at `bl602-docs <https://github.com/pine64/bl602-docs>`_, which
10-
is cloned as a submodule of this repository at ``docs``. Use
11-
`git submodule update --init` to initialize the submodule.
10+
is cloned as a submodule of this repository at ``docs``. Use `git submodule update --init` to initialize the submodule.
1211

1312
This repository is the central focus of Pine64's
1413
`Nutcracker Challenge <https://www.pine64.org/2020/10/28/nutcracker-challenge-blob-free-wifi-ble/>`_. The main task is to reverse engineer the following files:
@@ -26,12 +25,6 @@ You can find a lot of documentation on `PINE64 Documentation Website <https://pi
2625

2726
Quick Start
2827
-----------
29-
Firstly, you should clone the repository and update the submodules (for
30-
documentation and building)::
31-
32-
git clone https://github.com/pine64/bl_iot_sdk
33-
git submodule update --init --recursive
34-
3528
In order to build sample apps, you need to set a few environment variables::
3629

3730
export BL60X_SDK_PATH=/path/to/this/repo

components/security/mbedtls

Lines changed: 0 additions & 1 deletion
This file was deleted.

components/security/mbedtls/Config.in

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
config AOS_COMP_IMBEDTLS
2+
bool "ARM Mbed TLS Support"
3+
default n
4+
select AOS_COMP_ALICRYPTO
5+
help
6+
7+
if AOS_COMP_IMBEDTLS
8+
# Configurations for comp imbedtls
9+
endif

components/security/mbedtls/aos.mk

Lines changed: 112 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,112 @@
1+
NAME := imbedtls
2+
3+
$(NAME)_MBINS_TYPE := kernel
4+
$(NAME)_VERSION := 2.0.1
5+
$(NAME)_SUMMARY := Mbed Transport Layer Security on Embedded Devices for AliOS Things
6+
#if component's header files under another directory, add RPM_INCLUDE_DIR to indicate where the header file folder is located
7+
RPM_INCLUDE_DIR := ../include/mbedtls
8+
9+
DEBUG := no
10+
11+
ifneq (,$(BINS))
12+
GLOBAL_DEFINES += MBEDTLS_IN_KERNEL
13+
endif
14+
15+
GLOBAL_INCLUDES += ../include
16+
17+
#default gcc
18+
ifeq ($(COMPILER),)
19+
$(NAME)_CFLAGS += -Wall -Werror
20+
else ifeq ($(COMPILER),gcc)
21+
$(NAME)_CFLAGS += -Wall -Werror
22+
endif
23+
$(NAME)_DEFINES += CONFIG_PLAT_AOS
24+
25+
ifeq ($(DEBUG), yes)
26+
$(NAME)_DEFINES += CONFIG_SSL_DEBUG
27+
endif
28+
29+
ifeq ($(HOST_ARCH), linux)
30+
ifeq ($(LWIP), 1)
31+
$(NAME)_DEFINES += LWIP_ENABLED
32+
endif
33+
else
34+
$(NAME)_DEFINES += LWIP_ENABLED
35+
endif
36+
37+
$(NAME)_SOURCES := src/aes.c
38+
$(NAME)_SOURCES += src/aesni.c
39+
$(NAME)_SOURCES += src/arc4.c
40+
$(NAME)_SOURCES += src/asn1write.c
41+
$(NAME)_SOURCES += src/asn1parse.c
42+
$(NAME)_SOURCES += src/base64.c
43+
$(NAME)_SOURCES += src/bignum.c
44+
$(NAME)_SOURCES += src/blowfish.c
45+
$(NAME)_SOURCES += src/camellia.c
46+
$(NAME)_SOURCES += src/ccm.c
47+
$(NAME)_SOURCES += src/cipher.c
48+
$(NAME)_SOURCES += src/cipher_wrap.c
49+
$(NAME)_SOURCES += src/cmac.c
50+
$(NAME)_SOURCES += src/ctr_drbg.c
51+
$(NAME)_SOURCES += src/debug.c
52+
$(NAME)_SOURCES += src/des.c
53+
$(NAME)_SOURCES += src/dhm.c
54+
$(NAME)_SOURCES += src/ecdh.c
55+
$(NAME)_SOURCES += src/ecdsa.c
56+
$(NAME)_SOURCES += src/ecjpake.c
57+
$(NAME)_SOURCES += src/ecp.c
58+
$(NAME)_SOURCES += src/ecp_curves.c
59+
$(NAME)_SOURCES += src/entropy.c
60+
$(NAME)_SOURCES += src/entropy_poll.c
61+
$(NAME)_SOURCES += src/error.c
62+
$(NAME)_SOURCES += src/gcm.c
63+
$(NAME)_SOURCES += src/havege.c
64+
$(NAME)_SOURCES += src/hmac_drbg.c
65+
$(NAME)_SOURCES += src/md2.c
66+
$(NAME)_SOURCES += src/md4.c
67+
$(NAME)_SOURCES += src/md.c
68+
$(NAME)_SOURCES += src/md_wrap.c
69+
$(NAME)_SOURCES += src/memory_buffer_alloc.c
70+
$(NAME)_SOURCES += src/net_sockets.c
71+
$(NAME)_SOURCES += src/oid.c
72+
$(NAME)_SOURCES += src/padlock.c
73+
$(NAME)_SOURCES += src/pem.c
74+
$(NAME)_SOURCES += src/pk.c
75+
$(NAME)_SOURCES += src/pkcs11.c
76+
$(NAME)_SOURCES += src/pkcs12.c
77+
$(NAME)_SOURCES += src/pkcs5.c
78+
$(NAME)_SOURCES += src/pkparse.c
79+
$(NAME)_SOURCES += src/pk_wrap.c
80+
$(NAME)_SOURCES += src/pkwrite.c
81+
$(NAME)_SOURCES += src/platform.c
82+
$(NAME)_SOURCES += src/ripemd160.c
83+
$(NAME)_SOURCES += src/rsa.c
84+
$(NAME)_SOURCES += src/md5.c
85+
$(NAME)_SOURCES += src/sha1.c
86+
$(NAME)_SOURCES += src/sha256.c
87+
$(NAME)_SOURCES += src/sha512.c
88+
$(NAME)_SOURCES += src/ssl_cache.c
89+
$(NAME)_SOURCES += src/ssl_ciphersuites.c
90+
$(NAME)_SOURCES += src/ssl_cli.c
91+
$(NAME)_SOURCES += src/ssl_cookie.c
92+
$(NAME)_SOURCES += src/ssl_srv.c
93+
$(NAME)_SOURCES += src/ssl_ticket.c
94+
$(NAME)_SOURCES += src/ssl_tls.c
95+
$(NAME)_SOURCES += src/timing.c
96+
$(NAME)_SOURCES += src/threading.c
97+
$(NAME)_SOURCES += src/version.c
98+
$(NAME)_SOURCES += src/version_features.c
99+
$(NAME)_SOURCES += src/x509.c
100+
$(NAME)_SOURCES += src/x509_create.c
101+
$(NAME)_SOURCES += src/x509_crl.c
102+
$(NAME)_SOURCES += src/x509_crt.c
103+
$(NAME)_SOURCES += src/x509_csr.c
104+
$(NAME)_SOURCES += src/x509write_crt.c
105+
$(NAME)_SOURCES += src/x509write_csr.c
106+
$(NAME)_SOURCES += src/xtea.c
107+
$(NAME)_SOURCES += src/mbedtls_alt.c
108+
$(NAME)_SOURCES += src/mbedtls_net.c
109+
$(NAME)_SOURCES += src/mbedtls_ssl.c
110+
111+
$(NAME)_COMPONENTS := alicrypto
112+
Lines changed: 98 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,98 @@
1+
# Component Makefile
2+
#
3+
## These include paths would be exported to project level
4+
COMPONENT_ADD_INCLUDEDIRS +=
5+
6+
## not be exported to project level
7+
COMPONENT_PRIV_INCLUDEDIRS := include/mbedtls include/icrypto
8+
9+
NAME := imbedtls
10+
11+
$(NAME)_MBINS_TYPE := kernel
12+
$(NAME)_VERSION := 2.0.1
13+
$(NAME)_SUMMARY := Mbed Transport Layer Security on Embedded Devices for AliOS Things
14+
15+
## This component's src
16+
COMPONENT_SRCS := src/aes.c
17+
COMPONENT_SRCS += src/aesni.c
18+
COMPONENT_SRCS += src/arc4.c
19+
COMPONENT_SRCS += src/asn1write.c
20+
COMPONENT_SRCS += src/asn1parse.c
21+
COMPONENT_SRCS += src/base64.c
22+
COMPONENT_SRCS += src/bignum.c
23+
COMPONENT_SRCS += src/blowfish.c
24+
COMPONENT_SRCS += src/camellia.c
25+
COMPONENT_SRCS += src/ccm.c
26+
COMPONENT_SRCS += src/cipher.c
27+
COMPONENT_SRCS += src/cipher_wrap.c
28+
COMPONENT_SRCS += src/cmac.c
29+
COMPONENT_SRCS += src/ctr_drbg.c
30+
COMPONENT_SRCS += src/debug.c
31+
COMPONENT_SRCS += src/des.c
32+
COMPONENT_SRCS += src/dhm.c
33+
COMPONENT_SRCS += src/ecdh.c
34+
COMPONENT_SRCS += src/ecdsa.c
35+
COMPONENT_SRCS += src/ecjpake.c
36+
COMPONENT_SRCS += src/ecp.c
37+
COMPONENT_SRCS += src/ecp_curves.c
38+
COMPONENT_SRCS += src/entropy.c
39+
COMPONENT_SRCS += src/entropy_poll.c
40+
COMPONENT_SRCS += src/error.c
41+
COMPONENT_SRCS += src/gcm.c
42+
COMPONENT_SRCS += src/havege.c
43+
COMPONENT_SRCS += src/hmac_drbg.c
44+
COMPONENT_SRCS += src/md2.c
45+
COMPONENT_SRCS += src/md4.c
46+
COMPONENT_SRCS += src/md.c
47+
COMPONENT_SRCS += src/md_wrap.c
48+
COMPONENT_SRCS += src/memory_buffer_alloc.c
49+
COMPONENT_SRCS += src/net_sockets.c
50+
COMPONENT_SRCS += src/oid.c
51+
COMPONENT_SRCS += src/padlock.c
52+
COMPONENT_SRCS += src/pem.c
53+
COMPONENT_SRCS += src/pk.c
54+
COMPONENT_SRCS += src/pkcs11.c
55+
COMPONENT_SRCS += src/pkcs12.c
56+
COMPONENT_SRCS += src/pkcs5.c
57+
COMPONENT_SRCS += src/pkparse.c
58+
COMPONENT_SRCS += src/pk_wrap.c
59+
COMPONENT_SRCS += src/pkwrite.c
60+
COMPONENT_SRCS += src/platform.c
61+
COMPONENT_SRCS += src/ripemd160.c
62+
COMPONENT_SRCS += src/rsa.c
63+
COMPONENT_SRCS += src/md5.c
64+
COMPONENT_SRCS += src/sha1.c
65+
COMPONENT_SRCS += src/sha256.c
66+
COMPONENT_SRCS += src/sha512.c
67+
COMPONENT_SRCS += src/ssl_cache.c
68+
COMPONENT_SRCS += src/ssl_ciphersuites.c
69+
COMPONENT_SRCS += src/ssl_cli.c
70+
COMPONENT_SRCS += src/ssl_cookie.c
71+
COMPONENT_SRCS += src/ssl_srv.c
72+
COMPONENT_SRCS += src/ssl_ticket.c
73+
COMPONENT_SRCS += src/ssl_tls.c
74+
COMPONENT_SRCS += src/timing.c
75+
COMPONENT_SRCS += src/threading.c
76+
COMPONENT_SRCS += src/version.c
77+
COMPONENT_SRCS += src/version_features.c
78+
COMPONENT_SRCS += src/x509.c
79+
COMPONENT_SRCS += src/x509_create.c
80+
COMPONENT_SRCS += src/x509_crl.c
81+
COMPONENT_SRCS += src/x509_crt.c
82+
COMPONENT_SRCS += src/x509_csr.c
83+
COMPONENT_SRCS += src/x509write_crt.c
84+
COMPONENT_SRCS += src/x509write_csr.c
85+
COMPONENT_SRCS += src/xtea.c
86+
COMPONENT_SRCS += src/mbedtls_alt.c
87+
COMPONENT_SRCS += src/mbedtls_net.c
88+
COMPONENT_SRCS += src/mbedtls_ssl.c
89+
COMPONENT_SRCS += src/mycalloc.c
90+
91+
92+
COMPONENT_OBJS := $(patsubst %.c,%.o, $(COMPONENT_SRCS))
93+
94+
COMPONENT_SRCDIRS := src
95+
96+
97+
##
98+
CPPFLAGS += -DLWIP_ENABLED -DCONFIG_PLAT_AOS

0 commit comments

Comments
 (0)