Skip to content

Commit bf8d821

Browse files
author
Seppo Takalo
committed
Update Nanostack binaries to 5.0.6
1 parent cbce88d commit bf8d821

File tree

96 files changed

+520
-186
lines changed

Some content is hidden

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

96 files changed

+520
-186
lines changed
Lines changed: 107 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,107 @@
1+
#!/bin/bash
2+
3+
#
4+
# Export FEATURE_NANOSTACK libraries into mbed OS
5+
#
6+
# Usage:
7+
#
8+
# To remove all repositories call: ./clone_client.sh clean
9+
# To replace all with clone repositores: ./clone_client.sh clone
10+
# To export from cloned repositories: ./clone_client.sh export
11+
#
12+
# For developers:
13+
# Use "clone" functionality to get master repositories to work with.
14+
#
15+
# For maintainers: Creating a release
16+
# Use "clone" to get master repositories.
17+
# For every directory checkout the release branch.
18+
# Now use "export" function to flatten the git repositories into bare directories
19+
# Now you can "git add" each directory and do "git commit"
20+
#
21+
# Note "clone" does implicit "clean" so you lose all changes done into directories.
22+
23+
24+
# REPOSITORIES and DIRECTORIES are array of repositories where to clone
25+
# and directories where to clone
26+
# these arrays MUST be in sync
27+
# * Same number of elements
28+
# * Same order. Each line should have maching pair in same index at other array
29+
REPOSITORIES=(
30+
[email protected]:ARMmbed/sal-stack-nanostack.git
31+
[email protected]:ARMmbed/coap-service.git
32+
)
33+
34+
DIRECTORIES=(
35+
sal-stack-nanostack
36+
coap-service
37+
)
38+
39+
# Exit immediately on fail, thread unset variables as error
40+
set -eu
41+
42+
# Count number of repositories
43+
N=0
44+
for repo in ${REPOSITORIES[*]}; do
45+
let N=N+1
46+
done
47+
let N=N-1 # Substract one, because indexes start from 0
48+
49+
print_usage() {
50+
echo -e "Usage: $0 [clean | clone | export ]"
51+
echo -e "\tclean : Remove all repositories"
52+
echo -e "\tclone : Replace repositories with Git cone"
53+
echo -e "\texport : Export cloned Git repositories"
54+
}
55+
56+
clean() {
57+
for dir in ${DIRECTORIES[*]}; do
58+
rm -rf $dir
59+
done
60+
clean_nanostack_binaries
61+
}
62+
63+
clone() {
64+
for i in $(seq 0 $N); do
65+
git clone ${REPOSITORIES[$i]} ${DIRECTORIES[$i]}
66+
done
67+
}
68+
69+
export_repos() {
70+
for i in $(seq 0 $N); do
71+
echo "Exporting ${DIRECTORIES[$i]}"
72+
cd ${DIRECTORIES[$i]}
73+
git archive HEAD -o ../${DIRECTORIES[$i]}.tar.gz
74+
cd ..
75+
rm -rf ${DIRECTORIES[$i]}
76+
mkdir ${DIRECTORIES[$i]}
77+
tar xzf ${DIRECTORIES[$i]}.tar.gz -C ${DIRECTORIES[$i]}
78+
rm ${DIRECTORIES[$i]}.tar.gz
79+
done
80+
}
81+
82+
copy_nanostack_binaries() {
83+
mkdir -p ../nanostack-binaries
84+
mv sal-stack-nanostack/FEATURE_* ../nanostack-binaries/
85+
}
86+
87+
clean_nanostack_binaries() {
88+
rm -rf ../nanostack-binaries
89+
}
90+
91+
case "${1-}" in
92+
clean)
93+
clean
94+
;;
95+
clone)
96+
clean
97+
clone
98+
;;
99+
export)
100+
export_repos
101+
copy_nanostack_binaries
102+
;;
103+
*)
104+
print_usage
105+
exit 1
106+
;;
107+
esac

features/net/FEATURE_NANOSTACK/coap-service/CHANGELOG.md

Lines changed: 0 additions & 53 deletions
This file was deleted.

features/net/FEATURE_NANOSTACK/coap-service/source/coap_security_handler.c

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -321,10 +321,11 @@ int coap_security_handler_connect(coap_security_t *sec, bool is_server, SecureSo
321321
return -1;
322322
}
323323

324-
//TODO: Only needed for server type?
324+
#ifdef MBEDTLS_SSL_SRV_C
325325
mbedtls_ssl_conf_dtls_cookies(&sec->_conf, simple_cookie_write,
326326
simple_cookie_check,
327327
&sec->_cookie);
328+
#endif
328329

329330
sec->_is_started = true;
330331

@@ -416,10 +417,11 @@ int coap_security_handler_connect_non_blocking(coap_security_t *sec, bool is_ser
416417
return -1;
417418
}
418419

419-
//Only needed for server type?
420+
#ifdef MBEDTLS_SSL_SRV_C
420421
mbedtls_ssl_conf_dtls_cookies(&sec->_conf, simple_cookie_write,
421422
simple_cookie_check,
422423
&sec->_cookie);
424+
#endif
423425

424426
mbedtls_ssl_conf_min_version(&sec->_conf, MBEDTLS_SSL_MAJOR_VERSION_3, MBEDTLS_SSL_MAJOR_VERSION_3);
425427
mbedtls_ssl_conf_max_version(&sec->_conf, MBEDTLS_SSL_MAJOR_VERSION_3, MBEDTLS_SSL_MAJOR_VERSION_3);

features/net/FEATURE_NANOSTACK/coap-service/test/coap-service/unittest/run_tests

100644100755
File mode changed.

features/net/FEATURE_NANOSTACK/coap-service/xsl_script.sh

100644100755
File mode changed.

features/net/FEATURE_NANOSTACK/sal-stack-nanostack/DEPENDENCIES

Lines changed: 0 additions & 6 deletions
This file was deleted.

features/net/FEATURE_NANOSTACK/sal-stack-nanostack/TOOLCHAIN_ARM/TARGET_CORTEX_A/TARGET_A9/error_nanostack.c

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

features/net/FEATURE_NANOSTACK/sal-stack-nanostack/TOOLCHAIN_ARM/TARGET_CORTEX_M/TARGET_M0/error_nanostack.c

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

features/net/FEATURE_NANOSTACK/sal-stack-nanostack/TOOLCHAIN_ARM/TARGET_CORTEX_M/TARGET_M0P/error_nanostack.c

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

0 commit comments

Comments
 (0)