Skip to content

Commit b87ba2f

Browse files
committed
Update onvif_simple_server to the last commit
1 parent a2e90fc commit b87ba2f

File tree

4 files changed

+37
-9
lines changed

4 files changed

+37
-9
lines changed

src/onvif_simple_server/.gitignore

+2
Original file line numberDiff line numberDiff line change
@@ -6,4 +6,6 @@ libtomcrypt
66
libtomcrypt*/
77
mbedtls
88
mbedtls*/
9+
wolfssl
10+
wolfssl*/
911
onvif_simple_server/onvif_simple_server

src/onvif_simple_server/compile.onvif_simple_server

+23-8
Original file line numberDiff line numberDiff line change
@@ -19,18 +19,31 @@ export AR=${CROSSPREFIX}ar
1919
SCRIPT_DIR=$(cd `dirname $0` && pwd)
2020
cd $SCRIPT_DIR
2121

22+
#export HAVE_WOLFSSL=1
2223
#export HAVE_MBEDTLS=1
2324

24-
if [ "$HAVE_MBEDTLS" == "1" ]; then
25-
cd mbedtls
26-
make clean
27-
CFLAGS="-ffunction-sections -fdata-sections" LDFLAGS="-Wl,--gc-sections" make no_test
25+
if [ "$HAVE_WOLFSSL" == "1" ]; then
26+
cd wolfssl
27+
./autogen.sh
28+
./configure --host=arm-openwrt-linux --enable-static --enable-base64encode \
29+
--disable-aescbc --disable-aesgcm --disable-aes --disable-md5 --disable-sha384 \
30+
--disable-sha512 --disable-chacha --disable-pwdbased \
31+
--disable-hkdf --disable-poly1305 --disable-rsa --disable-rsapss --disable-dh \
32+
--disable-tls13 --disable-pkcs8 --disable-crypttests --disable-crypttests-libs
33+
CFLAGS="-ffunction-sections -fdata-sections" LDFLAGS="-Wl,--gc-sections" make
2834
cd ..
2935
else
30-
cd libtomcrypt
31-
make clean
32-
CFLAGS="-DLTC_NOTHING -DLTC_SHA1 -DLTC_BASE64 -ffunction-sections -fdata-sections" LDFLAGS="-Wl,--gc-sections" make
33-
cd ..
36+
if [ "$HAVE_MBEDTLS" == "1" ]; then
37+
cd mbedtls
38+
make clean
39+
CFLAGS="-ffunction-sections -fdata-sections" LDFLAGS="-Wl,--gc-sections" make no_test
40+
cd ..
41+
else
42+
cd libtomcrypt
43+
make clean
44+
CFLAGS="-DLTC_NOTHING -DLTC_SHA1 -DLTC_BASE64 -ffunction-sections -fdata-sections" LDFLAGS="-Wl,--gc-sections" make
45+
cd ..
46+
fi
3447
fi
3548

3649
cd onvif_simple_server || exit 1
@@ -50,6 +63,8 @@ echo "#!/tmp/sd/yi-hack/www/onvif/onvif_simple_server" > ../_install/www/onvif/e
5063
chmod 0755 ../_install/www/onvif/events_service
5164
echo "#!/tmp/sd/yi-hack/www/onvif/onvif_simple_server" > ../_install/www/onvif/media_service || exit 1
5265
chmod 0755 ../_install/www/onvif/media_service
66+
echo "#!/tmp/sd/yi-hack/www/onvif/onvif_simple_server" > ../_install/www/onvif/media2_service || exit 1
67+
chmod 0755 ../_install/www/onvif/media2_service
5368
echo "#!/tmp/sd/yi-hack/www/onvif/onvif_simple_server" > ../_install/www/onvif/ptz_service || exit 1
5469
chmod 0755 ../_install/www/onvif/ptz_service
5570
cp -R ./device_service_files ../_install/www/onvif

src/onvif_simple_server/init.onvif_simple_server

+11
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,17 @@ if [ ! -L mbedtls ]; then
2828
fi
2929
cp -f mbedtls_config.h mbedtls/include/mbedtls/
3030

31+
if [ ! -f v5.7.4-stable.tar.gz ]; then
32+
wget https://github.com/wolfSSL/wolfssl/archive/refs/tags/v5.7.4-stable.tar.gz
33+
fi
34+
tar zxvf ./v5.7.4-stable.tar.gz
35+
if [ ! -L wolfssl ]; then
36+
ln -s wolfssl-5.7.4-stable wolfssl
37+
cd onvif_simple_server/extras
38+
ln -s ../../wolfssl-5.7.4-stable wolfssl
39+
cd ../..
40+
fi
41+
3142
cd onvif_simple_server
3243

3344
git reset --hard
Submodule onvif_simple_server updated 79 files

0 commit comments

Comments
 (0)