Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 9 additions & 0 deletions .gitmodules
Original file line number Diff line number Diff line change
Expand Up @@ -25,3 +25,12 @@
[submodule "src/mqtt/mqttv4"]
path = src/mqtt/mqttv4
url = https://github.com/TheCrypt0/mqttv4.git
[submodule "src/curl/curl"]
path = src/curl/curl
url = https://github.com/curl/curl.git
[submodule "src/cmbedtls/mbedtls"]
path = src/cmbedtls/mbedtls
url = https://github.com/ARMmbed/mbedtls.git
[submodule "src/clibz/zlib"]
path = src/clibz/zlib
url = https://github.com/madler/zlib.git
24 changes: 12 additions & 12 deletions src/busybox/.config
Original file line number Diff line number Diff line change
Expand Up @@ -192,7 +192,7 @@ CONFIG_FEATURE_TAR_NOPRESERVE_TIME=y
#
# Coreutils
#
# CONFIG_BASENAME is not set
CONFIG_BASENAME=y
CONFIG_CAT=y
CONFIG_FEATURE_CATN=y
CONFIG_FEATURE_CATV=y
Expand Down Expand Up @@ -227,8 +227,8 @@ CONFIG_FEATURE_FANCY_ECHO=y
CONFIG_ENV=y
# CONFIG_EXPAND is not set
# CONFIG_UNEXPAND is not set
# CONFIG_EXPR is not set
# CONFIG_EXPR_MATH_SUPPORT_64 is not set
CONFIG_EXPR=y
CONFIG_EXPR_MATH_SUPPORT_64=y
# CONFIG_FACTOR is not set
# CONFIG_FALSE is not set
# CONFIG_FOLD is not set
Expand Down Expand Up @@ -288,14 +288,14 @@ CONFIG_RMDIR=y
CONFIG_SLEEP=y
CONFIG_FEATURE_FANCY_SLEEP=y
CONFIG_FEATURE_FLOAT_SLEEP=y
# CONFIG_SORT is not set
# CONFIG_FEATURE_SORT_BIG is not set
# CONFIG_FEATURE_SORT_OPTIMIZE_MEMORY is not set
CONFIG_SORT=y
CONFIG_FEATURE_SORT_BIG=y
CONFIG_FEATURE_SORT_OPTIMIZE_MEMORY=y
# CONFIG_SPLIT is not set
# CONFIG_FEATURE_SPLIT_FANCY is not set
# CONFIG_STAT is not set
# CONFIG_FEATURE_STAT_FORMAT is not set
# CONFIG_FEATURE_STAT_FILESYSTEM is not set
CONFIG_STAT=y
CONFIG_FEATURE_STAT_FORMAT=y
CONFIG_FEATURE_STAT_FILESYSTEM=y
# CONFIG_STTY is not set
# CONFIG_SUM is not set
CONFIG_SYNC=y
Expand Down Expand Up @@ -328,8 +328,8 @@ CONFIG_USLEEP=y
# CONFIG_UUDECODE is not set
CONFIG_BASE64=y
# CONFIG_UUENCODE is not set
# CONFIG_WC is not set
# CONFIG_FEATURE_WC_LARGE is not set
CONFIG_WC=y
CONFIG_FEATURE_WC_LARGE=y
# CONFIG_WHO is not set
# CONFIG_W is not set
# CONFIG_USERS is not set
Expand Down Expand Up @@ -457,7 +457,7 @@ CONFIG_FEATURE_FIND_REGEX=y
# CONFIG_FEATURE_FIND_CONTEXT is not set
CONFIG_FEATURE_FIND_LINKS=y
CONFIG_GREP=y
# CONFIG_EGREP is not set
CONFIG_EGREP=y
# CONFIG_FGREP is not set
CONFIG_FEATURE_GREP_CONTEXT=y
CONFIG_XARGS=y
Expand Down
13 changes: 13 additions & 0 deletions src/clibz/compile.clibz
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
#!/bin/bash

SCRIPT_DIR=$(cd `dirname $0` && pwd)
cd $SCRIPT_DIR

cd zlib || exit 1
make clean
make -j$(nproc) \
CC=arm-hisiv300-linux-gcc \
AR=arm-hisiv300-linux-ar \
RANLIB=arm-hisiv300-linux-ranlib \
LDSHARED="arm-hisiv300-linux-gcc -shared -Wl,-soname,libz.so.1,--version-script,zlib.map" || exit 1
make install
15 changes: 15 additions & 0 deletions src/clibz/init.clibz
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
#!/bin/bash

SCRIPT_DIR=$(cd `dirname $0` && pwd)
cd $SCRIPT_DIR

rm -rf ./_install

cd zlib || exit 1
git reset --hard || exit 1

./configure \
--prefix=$SCRIPT_DIR/_install \
--libdir=$SCRIPT_DIR/_install/lib \
--static \
|| exit 1
4 changes: 4 additions & 0 deletions src/clibz/install.clibz
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
#!/bin/bash

SCRIPT_DIR=$(cd `dirname $0` && pwd)
cd $SCRIPT_DIR
1 change: 1 addition & 0 deletions src/clibz/zlib
Submodule zlib added at cacf7f
8 changes: 8 additions & 0 deletions src/cmbedtls/compile.cmbedtls
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
#!/bin/bash

SCRIPT_DIR=$(cd `dirname $0` && pwd)
cd $SCRIPT_DIR

cd mbedtls || exit 1
make clean
CFLAGS="-I$SCRIPT_DIR -DMBEDTLS_CONFIG_FILE='<mbedtls-config.h>'" make -j$(nproc) CC=arm-hisiv300-linux-gcc SHARE=1 || exit 1
13 changes: 13 additions & 0 deletions src/cmbedtls/init.cmbedtls
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
#!/bin/bash

SCRIPT_DIR=$(cd `dirname $0` && pwd)
cd $SCRIPT_DIR

rm -rf ./_install

cd mbedtls || exit 1
git reset --hard || exit 1
git submodule init
git submodule update

cp ../mbedtls-config.h ./include/mbedtls/config.h || exit 1
17 changes: 17 additions & 0 deletions src/cmbedtls/install.cmbedtls
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
#!/bin/bash

SCRIPT_DIR=$(cd `dirname $0` && pwd)
cd $SCRIPT_DIR

mkdir -p ./_install/lib || exit 1
mkdir -p ./_install/include/mbedtls || exit 1
mkdir -p ./_install/include/mbedtls/mbedtls || exit 1
mkdir -p ./_install/include/psa || exit 1

cp -rp ./mbedtls/crypto/include/mbedtls ./_install/include || exit 1
cp -rp ./mbedtls/crypto/include/psa ./_install/include || exit 1
cp -rp ./mbedtls/include/mbedtls ./_install/include || exit 1
cp ./mbedtls/include/mbedtls/config.h ./_install/include/mbedtls/mbedtls || exit 1
cp ./mbedtls/library/libmbedtls.* ./_install/lib || exit 1
cp ./mbedtls/library/libmbedx509.* ./_install/lib || exit 1
cp ./mbedtls/crypto/library/libmbedcrypto.* ./_install/lib || exit 1
1 change: 1 addition & 0 deletions src/cmbedtls/mbedtls
Submodule mbedtls added at 0d50d4
56 changes: 56 additions & 0 deletions src/cmbedtls/mbedtls-config.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,56 @@
#ifndef MBEDTLS_CONFIG_H
#define MBEDTLS_CONFIG_H

/* System support */
#define MBEDTLS_HAVE_ASM
#define MBEDTLS_HAVE_TIME

/* mbed TLS feature support */
#define MBEDTLS_CIPHER_MODE_CBC
#define MBEDTLS_PKCS1_V15
#define MBEDTLS_KEY_EXCHANGE_RSA_ENABLED
#define MBEDTLS_SSL_PROTO_TLS1_1

/* mbed TLS modules */
#define MBEDTLS_AES_C
#define MBEDTLS_ASN1_PARSE_C
#define MBEDTLS_ASN1_WRITE_C
#define MBEDTLS_BIGNUM_C
#define MBEDTLS_CIPHER_C
#define MBEDTLS_CTR_DRBG_C
#define MBEDTLS_DES_C
#define MBEDTLS_ENTROPY_C
#define MBEDTLS_ERROR_C
#define MBEDTLS_MD_C
#define MBEDTLS_MD5_C
#define MBEDTLS_NET_C
#define MBEDTLS_OID_C
#define MBEDTLS_PK_C
#define MBEDTLS_PK_PARSE_C
#define MBEDTLS_PK_WRITE_C
#define MBEDTLS_RSA_C
#define MBEDTLS_SHA1_C
#define MBEDTLS_SHA256_C
#define MBEDTLS_SSL_CLI_C
#define MBEDTLS_SSL_SRV_C
#define MBEDTLS_SSL_TLS_C
#define MBEDTLS_VERSION_C
#define MBEDTLS_X509_CRT_PARSE_C
#define MBEDTLS_X509_USE_C
#define MBEDTLS_X509_CRL_PARSE_C
#define MBEDTLS_SSL_RENEGOTIATION
#define MBEDTLS_SSL_TICKET_C
#define MBEDTLS_CIPHER_MODE_AEAD
#define MBEDTLS_SSL_SESSION_TICKETS

/* For test certificates */
#define MBEDTLS_BASE64_C
#define MBEDTLS_CERTS_C
#define MBEDTLS_PEM_PARSE_C

/* For testing with compat.sh */
#define MBEDTLS_FS_IO

#include "mbedtls/check_config.h"

#endif /* MBEDTLS_CONFIG_H */
9 changes: 9 additions & 0 deletions src/curl/compile.curl
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
#!/bin/bash

SCRIPT_DIR=$(cd `dirname $0` && pwd)
cd $SCRIPT_DIR

cd curl || exit 1
make clean
make -j$(nproc) || exit 1
make install
1 change: 1 addition & 0 deletions src/curl/curl
Submodule curl added at e80b5c
56 changes: 56 additions & 0 deletions src/curl/init.curl
Original file line number Diff line number Diff line change
@@ -0,0 +1,56 @@
#!/bin/bash

SCRIPT_DIR=$(cd `dirname $0` && pwd)
cd $SCRIPT_DIR

rm -rf ./_install

cd curl || exit 1
git reset --hard || exit 1

if [ ! -f $SCRIPT_DIR/../clibz/_install/lib/libz.a ] ; then
echo "ERROR: curl requires zlib to be compiled first."
exit 1
fi

if [ ! -f $SCRIPT_DIR/../cmbedtls/_install/lib/libmbedcrypto.a ] ; then
echo "ERROR: curl requires mbedtls to be compiled first."
exit 1
fi

./buildconf || exit 1
./configure CC=arm-hisiv300-linux-gcc \
--prefix=$SCRIPT_DIR/_install \
USER_CFLAGS="-march=armv5te -mcpu=arm926ej-s -I/opt/hisi-linux/x86-arm/arm-hisiv300-linux/target/usr/include -L/opt/hisi-linux/x86-arm/arm-hisiv300-linux/target/usr/lib" \
AR=arm-hisiv300-linux-ar \
RANLIB=arm-hisiv300-linux-ranlib \
--host=arm \
--disable-curldebug \
--disable-debug \
--disable-dict \
--disable-file \
--disable-ssl \
--disable-gopher \
--disable-imap \
--disable-ipv6 \
--disable-ldap \
--disable-libcurl-option \
--disable-manual \
--disable-ntlm \
--disable-ntlm-wb \
--disable-pop3 \
--disable-rtsp \
--disable-shared \
--disable-smb \
--disable-smtp \
--disable-soname-bump \
--disable-sspi \
--disable-symbol-hiding \
--disable-telnet \
--disable-tftp \
--disable-tls-srp \
--enable-http \
--enable-optimize \
--with-mbedtls=$SCRIPT_DIR/../cmbedtls/_install \
--with-zlib=$SCRIPT_DIR/../clibz/_install \
|| exit 1
9 changes: 9 additions & 0 deletions src/curl/install.curl
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
#!/bin/bash

SCRIPT_DIR=$(cd `dirname $0` && pwd)
cd $SCRIPT_DIR

mkdir -p ../../build/home/yi-hack-v4/bin/

rsync -a ./_install/bin/curl ../../build/home/yi-hack-v4/bin/
arm-hisiv300-linux-strip ../../build/home/yi-hack-v4/bin/curl