Skip to content

Commit

Permalink
In the master branch the remote submodules are already fetched and pa…
Browse files Browse the repository at this point in the history
…tched for easy

use from all users.
  • Loading branch information
slav-at-attachix committed Jan 9, 2017
1 parent e8a068e commit 6f638af
Show file tree
Hide file tree
Showing 135 changed files with 35,557 additions and 6 deletions.
1 change: 0 additions & 1 deletion Sming/third-party/axtls-8266
Submodule axtls-8266 deleted from d76856
5 changes: 5 additions & 0 deletions Sming/third-party/axtls-8266/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
*.o
bin/
Makefile.local
.DS_Store

3 changes: 3 additions & 0 deletions Sming/third-party/axtls-8266/.gitmodules
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
[submodule "compat"]
path = compat
url = https://github.com/attachix/lwirax.git
43 changes: 43 additions & 0 deletions Sming/third-party/axtls-8266/.travis.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
sudo: false
language: bash
os:
- linux

script:
# Download Arduino IDE
- wget -O arduino.tar.xz https://www.arduino.cc/download.php?f=/arduino-nightly-linux64.tar.xz
- tar xf arduino.tar.xz
- mv arduino-nightly $HOME/arduino_ide
# Download ESP8266 Arduino core
- cd $HOME/arduino_ide/hardware
- mkdir esp8266com
- cd esp8266com
- git clone https://github.com/esp8266/Arduino.git esp8266
- cd esp8266
- export ESP8266_ARDUINO_DIR="$PWD"
# Download toolchain and esptool
- cd tools
- python get.py
- export PATH="$PATH:$PWD/xtensa-lx106-elf/bin"
# Build axTLS
- cd $TRAVIS_BUILD_DIR
- make
# Copy the library into Arduino core
- cp bin/libaxtls.a $ESP8266_ARDUINO_DIR/tools/sdk/lib/libaxtls.a
# Try building examples in ESP8266WiFi library from the ESP8266 Arduino core
- /sbin/start-stop-daemon --start --quiet --pidfile /tmp/custom_xvfb_1.pid --make-pidfile --background --exec /usr/bin/Xvfb -- :1 -ac -screen 0 1280x1024x16
- sleep 3
- export DISPLAY=:1.0
- export PATH="$HOME/arduino_ide:$PATH"
- which arduino
- cd $ESP8266_ARDUINO_DIR
- source tests/common.sh
- arduino --board esp8266com:esp8266:generic --save-prefs
- arduino --get-pref sketchbook.path
- build_sketches $HOME/arduino_ide $ESP8266_ARDUINO_DIR/libraries/ESP8266WiFi/examples/HTTPSRequest
# Feel free to add more test cases (for other environments) here

notifications:
email:
on_success: change
on_failure: change
24 changes: 24 additions & 0 deletions Sming/third-party/axtls-8266/LICENSE
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
Copyright (c) 2008, Cameron Rich All rights reserved.

Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions are met:

Redistributions of source code must retain the above copyright notice, this
list of conditions and the following disclaimer. Redistributions in binary
form must reproduce the above copyright notice, this list of conditions and
the following disclaimer in the documentation and/or other materials
provided with the distribution. Neither the name of the axTLS Project nor
the names of its contributors may be used to endorse or promote products
derived from this software without specific prior written permission.

THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE FOR
ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH
DAMAGE.
80 changes: 80 additions & 0 deletions Sming/third-party/axtls-8266/Makefile
Original file line number Diff line number Diff line change
@@ -0,0 +1,80 @@
TOOLCHAIN_PREFIX := xtensa-lx106-elf-
CC := $(TOOLCHAIN_PREFIX)gcc
AR := $(TOOLCHAIN_PREFIX)ar
LD := $(TOOLCHAIN_PREFIX)gcc
OBJCOPY := $(TOOLCHAIN_PREFIX)objcopy

MFORCE32 := $(shell $(CC) --help=target | grep mforce-l32)

XTENSA_LIBS ?= $(shell $(CC) -print-sysroot)
ifeq ($(XTENSA_LIBS),)
XTENSA_LIBS = $(ESP_HOME)/xtensa-lx106-elf/
endif

OBJ_FILES := \
crypto/aes.o \
crypto/bigint.o \
crypto/hmac.o \
crypto/md5.o \
crypto/rc4.o \
crypto/rsa.o \
crypto/sha1.o \
crypto/sha256.o \
crypto/sha384.o \
crypto/sha512.o \
ssl/asn1.o \
ssl/gen_cert.o \
ssl/loader.o \
ssl/os_port.o \
ssl/p12.o \
ssl/tls1.o \
ssl/tls1_clnt.o \
ssl/tls1_svr.o \
ssl/x509.o \
crypto/crypto_misc.o \


CPPFLAGS += -I$(XTENSA_LIBS)/include \
-Icrypto \
-Issl \
-I.

LDFLAGS += -L$(XTENSA_LIBS)/lib \
-L$(XTENSA_LIBS)/arch/lib \


CFLAGS+=-std=c99 -DESP8266

CFLAGS += -Wall -Os -g -O2 -Wpointer-arith -Wno-implicit-function-declaration -Wl,-EL -fno-inline-functions -nostdlib -mlongcalls -mno-text-section-literals -D__ets__ -DICACHE_FLASH

ifneq ($(MFORCE32),)
# Your compiler supports the -mforce-l32 flag which means that
# constants can be stored in flash (program) memory instead of SRAM.
# See: https://www.arduino.cc/en/Reference/PROGMEM
CFLAGS += -DPROGMEM="__attribute__((aligned(4))) __attribute__((section(\".irom.text\")))" -mforce-l32
endif

BIN_DIR := bin
AXTLS_AR := $(BIN_DIR)/libaxtls.a

all: $(AXTLS_AR)

$(AXTLS_AR): | $(BIN_DIR)

$(AXTLS_AR): $(OBJ_FILES)
for file in $(OBJ_FILES); do \
$(OBJCOPY) \
--rename-section .text=.irom0.text \
--rename-section .literal=.irom0.literal \
$$file; \
done
$(AR) cru $@ $^

$(BIN_DIR):
mkdir -p $(BIN_DIR)

clean:
rm -rf $(OBJ_FILES) $(AXTLS_AR)


.PHONY: all clean
29 changes: 29 additions & 0 deletions Sming/third-party/axtls-8266/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
Replacement for Espressif's libssl, kept as close as possible to [axTLS](http://axtls.sourceforge.net/) source.
Currently based on axTLS 1.5.3+.

[![Build status](https://travis-ci.org/igrr/axtls-8266.svg)](https://travis-ci.org/igrr/axtls-8266)

This is not a self-sufficient library. Application has to provide the following symbols (list not complete yet):
```
ax_port_malloc
ax_port_calloc
ax_port_realloc
ax_port_free
ax_port_read
ax_port_write
ax_port_open
ax_port_close
ax_get_file
phy_get_rand (provided by the IoT SDK)
ets_printf (in ESP8266 ROM)
ets_putc (in ESP8266 ROM)
gettimeofday
time
ctime
```

For use with LwIP raw TCP API, see [compat/README.md](https://github.com/attachix/lwirax/blob/master/README.md)

To build, add xtensa toolchain to your path, and run `make`.

See [LICENSE](LICENSE) file for axTLS license.
1 change: 1 addition & 0 deletions Sming/third-party/axtls-8266/VERSION
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
1.4.9
3 changes: 3 additions & 0 deletions Sming/third-party/axtls-8266/compat/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
.cproject
.project
.settings
21 changes: 21 additions & 0 deletions Sming/third-party/axtls-8266/compat/LICENSE
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
The MIT License

Copyright (c) 2016 Attachix.com. http://attachix.com

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in
all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
THE SOFTWARE.
Loading

0 comments on commit 6f638af

Please sign in to comment.