[Feature][MD310EU][task-view-1009] Create MD310EU project code directory

Change-Id: I57cd3c474efe4493ae8a242d7e2fa643ad8ecbde
diff --git a/lynq/MD310EU/ap/lib/libcurl/makefile b/lynq/MD310EU/ap/lib/libcurl/makefile
new file mode 100755
index 0000000..f683860
--- /dev/null
+++ b/lynq/MD310EU/ap/lib/libcurl/makefile
@@ -0,0 +1,44 @@
+
+include $(COMMON_BASE_MK)
+
+NAME=libcurl
+SRC_DIR=curl-7.54.1
+INSTALL_DIR=$(LIB_DIR)/$(NAME)/install
+BUILD_DIR=build
+GEN_MAKEFILE=$(BUILD_DIR)/Makefile
+
+CONFIG_OPTS = --target=arm-linux --host=arm-linux
+CONFIG_OPTS += --enable-static
+ifeq ($(CONFIG_LIBCURL_SHARE_LIB), y)
+CONFIG_OPTS += --enable-shared
+else
+CONFIG_OPTS += --disable-shared
+endif
+CONFIG_OPTS += --enable-threaded-resolver
+CONFIG_OPTS += --without-libidn --without-ssl --without-librtmp --without-gnutls --without-nss --without-libssh2 \
+               --without-zlib --without-winidn --disable-telnet --disable-tftp --disable-smtp \
+               --disable-imap --disable-pop3 --disable-rtsp --disable-ldap --disable-ldaps --disable-ipv6
+
+all: $(GEN_MAKEFILE)
+	make -C build all
+	make -C build install
+	cp -v $(SRC_DIR)/lib/curl_md5.h  $(INSTALL_DIR)/include/curl/
+	cp -v $(SRC_DIR)/lib/curl_hmac.h $(INSTALL_DIR)/include/curl/
+
+$(GEN_MAKEFILE):
+	mkdir -p $(BUILD_DIR)
+	cd $(BUILD_DIR); ../$(SRC_DIR)/configure --prefix=$(INSTALL_DIR) $(CONFIG_OPTS)
+
+clean:
+	-rm -fr $(BUILD_DIR) $(INSTALL_DIR)
+
+romfs:
+	cd $(INSTALL_DIR)/lib; \
+	for i in *.so*; do \
+		if [ -L $$i ]; then \
+			$(ROMFSINST) -s `find $$i -printf %l` /lib/$$i; \
+		elif [ -f $$i ]; then \
+			$(ROMFSINST) /lib/$$i; \
+		fi; \
+	done
+
diff --git a/lynq/MD310EU/ap/lib/libssl/makefile b/lynq/MD310EU/ap/lib/libssl/makefile
new file mode 100755
index 0000000..76cde27
--- /dev/null
+++ b/lynq/MD310EU/ap/lib/libssl/makefile
@@ -0,0 +1,114 @@
+
+#
+# this makefile gets recursed through by various bits of the build
+# so we need to only setup some things when invoked from outside
+# this directory.
+#
+# davidm@snapgear.com
+#
+include $(COMMON_BASE_MK)
+
+NAME := libssl
+SRC_DIR := openssl-1.1.1o
+INSTALL_DIR := $(LIB_DIR)/$(NAME)/install
+
+export ac_cv_lbl_unaligned_fail=yes
+export ac_cv_func_mmap_fixed_mapped=yes
+export ac_cv_func_memcmp_working=yes
+export ac_cv_have_decl_malloc=yes
+export gl_cv_func_malloc_0_nonnull=yes
+export ac_cv_func_malloc_0_nonnull=yes
+export ac_cv_func_calloc_0_nonnull=yes
+export ac_cv_func_realloc_0_nonnull=yes
+export lt_cv_sys_lib_search_path_spec=""
+export ac_cv_c_bigendian=no
+export CROSS_COMPILE=$(CROSS_ROOT)/usr/bin/arm-buildroot-linux-uclibcgnueabi-
+export CC=gcc
+export GCC=gcc
+export CPP=cpp
+export AS=as
+export LD=ld
+export NM=nm
+export CXX=g++
+export AR=ar
+export RANLIB=ranlib
+export READELF=readelf
+export STRIP=strip
+export OBJCOPY=objcopy
+export OBJDUMP=objdump
+
+export CPPFLAGS=-D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64
+export CFLAGS=-D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 -Os -g0
+export CXXFLAGS=-D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 -Os -g0
+
+CONFIG_OPTS := linux-armv4
+CONFIG_OPTS += --prefix=$(INSTALL_DIR)
+CONFIG_OPTS += --openssldir=$(INSTALL_DIR)/etc/ssl
+
+CONFIG_OPTS += no-shared
+ifeq ($(CONFIG_LIBSSL_SHARE_LIB), y)
+CONFIG_OPTS += shared
+endif
+#CONFIG_OPTS += -latomic
+CONFIG_OPTS += threads
+CONFIG_OPTS += no-rc5
+CONFIG_OPTS += enable-camellia
+CONFIG_OPTS += enable-mdc2
+CONFIG_OPTS += no-tests
+CONFIG_OPTS += no-fuzz-libfuzzer
+CONFIG_OPTS += no-fuzz-afl
+CONFIG_OPTS += no-rc5
+CONFIG_OPTS += no-rc2
+CONFIG_OPTS += no-rc4
+CONFIG_OPTS += no-md2
+ifneq ($(CONFIG_WIFI_MODULE), aic8800)
+CONFIG_OPTS += no-md4
+CONFIG_OPTS += no-des
+endif
+CONFIG_OPTS += no-mdc2
+CONFIG_OPTS += no-blake2
+CONFIG_OPTS += no-idea
+CONFIG_OPTS += no-seed
+
+CONFIG_OPTS += no-rmd160
+CONFIG_OPTS += no-whirlpool
+CONFIG_OPTS += no-ssl
+CONFIG_OPTS += no-ssl2
+CONFIG_OPTS += no-weak-ssl-ciphers
+CONFIG_OPTS += no-psk
+CONFIG_OPTS += no-cast
+CONFIG_OPTS += no-unit-test
+CONFIG_OPTS += no-crypto-mdebug-backtrace
+CONFIG_OPTS += no-crypto-mdebug
+CONFIG_OPTS += no-autoerrinit
+CONFIG_OPTS += no-dynamic-engine
+CONFIG_OPTS += no-comp
+CONFIG_OPTS += zlib-dynamic
+CONFIG_OPTS += no-async
+CONFIG_OPTS += no-dso
+CONFIG_OPTS += --with-rand-seed=devrandom
+
+all: $(SRC_DIR)/Makefile
+	make -C $(SRC_DIR)
+	make -C $(SRC_DIR) install
+
+$(SRC_DIR)/Makefile:
+	cd $(SRC_DIR) && ./Configure $(CONFIG_OPTS)
+
+clean:
+	-make -C $(SRC_DIR) distclean
+	-rm -rf $(INSTALL_DIR)
+
+romfs:
+ifeq ($(CONFIG_USE_WEBUI_SECURITY),yes)
+	$(ROMFSINST) $(INSTALL_DIR)/bin/openssl /bin/openssl
+endif
+	cd $(INSTALL_DIR)/lib; \
+	for i in *.so*; do \
+		if [ -L $$i ]; then \
+			$(ROMFSINST) -s `find $$i -printf %l` /lib/$$i; \
+		elif [ -f $$i ]; then \
+			$(ROMFSINST) /lib/$$i; \
+		fi; \
+	done
+