Skip to content
This repository has been archived by the owner on Jun 19, 2024. It is now read-only.

Commit

Permalink
Merge pull request #22 from Zondax/dev
Browse files Browse the repository at this point in the history
upgrade sdk2.0
  • Loading branch information
jleni authored May 26, 2021
2 parents 7082084 + 029d017 commit ff6ded1
Show file tree
Hide file tree
Showing 120 changed files with 15,524 additions and 14,982 deletions.
25 changes: 16 additions & 9 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -55,17 +55,17 @@ jobs:
name: Build Standard light parser app
command: |
source /home/zondax/.cargo/env
make
make SUBSTRATE_PARSER_FULL=0
- run:
name: Build Standard full parser app
command: |
source /home/zondax/.cargo/env
SUPPORT_SR25519=1 SUBSTRATE_PARSER_FULL=1 make
make SUBSTRATE_PARSER_FULL=1
- run:
name: Build SR25519 app
command: |
source /home/zondax/.cargo/env
SUPPORT_SR25519=1 make
make SUPPORT_SR25519=1
test_zemu:
machine:
Expand Down Expand Up @@ -94,9 +94,8 @@ jobs:
- run:
name: Build Ledger app
command: |
SUBSTRATE_PARSER_FULL=1 make buildS
make clean
SUBSTRATE_PARSER_FULL=1 make buildX
make clean_build && SUBSTRATE_PARSER_FULL=1 make buildS
make clean_build && SUBSTRATE_PARSER_FULL=1 make buildX
- run:
name: Build/Install build js deps
command: |
Expand Down Expand Up @@ -137,7 +136,7 @@ jobs:
- run:
name: Build Ledger app
command: |
make SUBSTRATE_PARSER_FULL=1 build_sr25519
make clean_build && SUBSTRATE_PARSER_FULL=1 SUPPORT_SR25519=1 make buildS
- run:
name: Build/Install build js deps
command: |
Expand All @@ -153,7 +152,7 @@ jobs:
build_package:
docker:
- image: zondax/builder-bolos@sha256:0e0097c01ef3c6c964fea8d8b6e3a584f4ff209a04ec68b6b2b4aeab64379c23
- image: zondax/builder-bolos:latest
environment:
BOLOS_SDK: /home/zondax/project/deps/nanos-secure-sdk
BOLOS_ENV: /opt/bolos
Expand All @@ -165,8 +164,16 @@ jobs:
command: |
source /home/zondax/.cargo/env
cd /home/zondax/project
make
make SUBSTRATE_PARSER_FULL=0
- run: /home/zondax/go/bin/ghr -t ${GITHUB_TOKEN} -u ${CIRCLE_PROJECT_USERNAME} -r ${CIRCLE_PROJECT_REPONAME} -c ${CIRCLE_SHA1} -delete $(/home/zondax/project/app/pkg/installer_s.sh version) /home/zondax/project/app/pkg/installer_s.sh
- run:
name: Clear and rebuild XL version
command: |
source /home/zondax/.cargo/env
cd /home/zondax/project
make SUBSTRATE_PARSER_FULL=1
cp /home/zondax/project/app/pkg/installer_s.sh /home/zondax/project/app/pkg/installer_XL_s.sh
- run: /home/zondax/go/bin/ghr -t ${GITHUB_TOKEN} -u ${CIRCLE_PROJECT_USERNAME} -r ${CIRCLE_PROJECT_REPONAME} -c ${CIRCLE_SHA1} -delete $(/home/zondax/project/app/pkg/installer_XL_s.sh version) /home/zondax/project/app/pkg/installer_XL_s.sh

workflows:
version: 2
Expand Down
10 changes: 5 additions & 5 deletions .gdbinit
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@
# set auto-load local-gdbinit on
# add-auto-load-safe-path /

set architecture arm
handle SIGILL nostop pass noprint
add-symbol-file app/bin/app.elf 0x40000000
set backtrace limit 20
b *0x40000000
# set architecture arm
# handle SIGILL nostop pass noprint
# add-symbol-file app/bin/app.elf 0x40000000
# set backtrace limit 20
# b *0x40000000
8 changes: 3 additions & 5 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ jobs:
image: zondax/builder-bolos:latest
options: --user ${{ needs.configure.outputs.uid_gid }}
env:
BOLOS_SDK: /__w/ledger-edgeware/ledger-edgeware/deps/nanos-secure-sdk
BOLOS_SDK: ${{ github.workspace }}/deps/nanos-secure-sdk
BOLOS_ENV: /opt/bolos
HOME: /home/zondax_circle
steps:
Expand Down Expand Up @@ -108,9 +108,7 @@ jobs:
npm install -g yarn
- name: Build Ledger app
run: |
make build_full_parser_s
make clean
make build_full_parser_x
make SUBSTRATE_PARSER_FULL=1
- name: Build/Install build js deps
run: |
export PATH=~/.cargo/bin:$PATH
Expand Down Expand Up @@ -142,7 +140,7 @@ jobs:
npm install -g yarn
- name: Build Ledger app
run: |
make build_sr25519
make clean_build && SUBSTRATE_PARSER_FULL=1 SUPPORT_SR25519=1 make buildS
- name: Build/Install build js deps
run: |
export PATH=~/.cargo/bin:$PATH
Expand Down
60 changes: 25 additions & 35 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -47,40 +47,30 @@
# Kernel Module Compile Results
*.mod*
*.cmd
.tmp_versions/
modules.order
Module.symvers
Mkfile.old
dkms.conf

\cmake-build-debug
\.idea/
/tmp/
/deps/nano2-sdk/

# Created by cmake
googletest-download/
googletest-src/
googletest-build/
CMakeFiles/
CMakeCache.txt
unittests
*.cmake
Testing/
cmake-build-fuzz/

# Others
/cmake-build-debug/
/cmake-build-fuzz/
\.idea
/app/bin/
/app/debug/
/app/obj/

##########################

tests_zemu/.yarn/*
tests_zemu/!.yarn/patches
tests_zemu/!.yarn/releases
tests_zemu/!.yarn/plugins
tests_zemu/!.yarn/sdks
tests_zemu/!.yarn/versions
tests_zemu/.pnp.*

#########################

.vscode
.idea

node_modules
fuzz/corpora

!build/.gitkeep
build/*
cmake-build-debug

tests_zemu/snapshots-tmp
tests_zemu/yarn.lock
/tests_zemu/snapshots-tmp/
/build
/fuzz-*.log
/fuzz/corpora
/tests_tools/target/
!/tests_tools/neon/yarn.lock
tests_tools/target

2 changes: 1 addition & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ if(ENABLE_FUZZING)
message(FATAL_ERROR "Fuzz logging enabled")
endif()

set(CMAKE_CXX_CLANG_TIDY clang-tidy -checks=-*,bugprone-*,cert-*,clang-analyzer-*,-cert-err58-cpp,misc-*,-bugprone-suspicious-include)
set(CMAKE_CXX_CLANG_TIDY clang-tidy -checks=-*,bugprone-*,cert-*,clang-analyzer-*,-cert-err58-cpp,misc-*)

if ("${CMAKE_CXX_COMPILER_ID}" STREQUAL "Clang")
# require at least clang 3.2
Expand Down
15 changes: 3 additions & 12 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,9 @@

ifeq ($(BOLOS_SDK),)
# In this case, there is not predefined SDK and we run dockerized
# When not using the SDK, we override and build the XL complete app

SUBSTRATE_PARSER_FULL ?= 1
include $(CURDIR)/deps/ledger-zxlib/dockerized_build.mk

else
Expand All @@ -33,18 +36,6 @@ default:
COIN=$(COIN) $(MAKE) -C app $@
endif

build_sr25519: SUPPORT_SR25519=1 # Alternative app purpose
build_sr25519: SUBSTRATE_PARSER_FULL=1 # Use full parser
build_sr25519: buildS
cp $(CURDIR)/app/bin/app.elf $(CURDIR)/app/output/app_sr25519.elf
cp $(CURDIR)/app/bin/app.elf $(CURDIR)/app/bin/app_sr25519.elf

build_full_parser_s: SUBSTRATE_PARSER_FULL=1
build_full_parser_s: buildS

build_full_parser_x: SUBSTRATE_PARSER_FULL=1
build_full_parser_x: buildX

tests_tools_build:
cd tests_tools/neon && yarn install

Expand Down
Loading

0 comments on commit ff6ded1

Please sign in to comment.