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

Commit ff6ded1

Browse files
authored
Merge pull request #22 from Zondax/dev
upgrade sdk2.0
2 parents 7082084 + 029d017 commit ff6ded1

120 files changed

Lines changed: 15524 additions & 14982 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.circleci/config.yml

Lines changed: 16 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -55,17 +55,17 @@ jobs:
5555
name: Build Standard light parser app
5656
command: |
5757
source /home/zondax/.cargo/env
58-
make
58+
make SUBSTRATE_PARSER_FULL=0
5959
- run:
6060
name: Build Standard full parser app
6161
command: |
6262
source /home/zondax/.cargo/env
63-
SUPPORT_SR25519=1 SUBSTRATE_PARSER_FULL=1 make
63+
make SUBSTRATE_PARSER_FULL=1
6464
- run:
6565
name: Build SR25519 app
6666
command: |
6767
source /home/zondax/.cargo/env
68-
SUPPORT_SR25519=1 make
68+
make SUPPORT_SR25519=1
6969
7070
test_zemu:
7171
machine:
@@ -94,9 +94,8 @@ jobs:
9494
- run:
9595
name: Build Ledger app
9696
command: |
97-
SUBSTRATE_PARSER_FULL=1 make buildS
98-
make clean
99-
SUBSTRATE_PARSER_FULL=1 make buildX
97+
make clean_build && SUBSTRATE_PARSER_FULL=1 make buildS
98+
make clean_build && SUBSTRATE_PARSER_FULL=1 make buildX
10099
- run:
101100
name: Build/Install build js deps
102101
command: |
@@ -137,7 +136,7 @@ jobs:
137136
- run:
138137
name: Build Ledger app
139138
command: |
140-
make SUBSTRATE_PARSER_FULL=1 build_sr25519
139+
make clean_build && SUBSTRATE_PARSER_FULL=1 SUPPORT_SR25519=1 make buildS
141140
- run:
142141
name: Build/Install build js deps
143142
command: |
@@ -153,7 +152,7 @@ jobs:
153152
154153
build_package:
155154
docker:
156-
- image: zondax/builder-bolos@sha256:0e0097c01ef3c6c964fea8d8b6e3a584f4ff209a04ec68b6b2b4aeab64379c23
155+
- image: zondax/builder-bolos:latest
157156
environment:
158157
BOLOS_SDK: /home/zondax/project/deps/nanos-secure-sdk
159158
BOLOS_ENV: /opt/bolos
@@ -165,8 +164,16 @@ jobs:
165164
command: |
166165
source /home/zondax/.cargo/env
167166
cd /home/zondax/project
168-
make
167+
make SUBSTRATE_PARSER_FULL=0
169168
- 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
169+
- run:
170+
name: Clear and rebuild XL version
171+
command: |
172+
source /home/zondax/.cargo/env
173+
cd /home/zondax/project
174+
make SUBSTRATE_PARSER_FULL=1
175+
cp /home/zondax/project/app/pkg/installer_s.sh /home/zondax/project/app/pkg/installer_XL_s.sh
176+
- 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
170177

171178
workflows:
172179
version: 2

.gdbinit

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,8 @@
44
# set auto-load local-gdbinit on
55
# add-auto-load-safe-path /
66

7-
set architecture arm
8-
handle SIGILL nostop pass noprint
9-
add-symbol-file app/bin/app.elf 0x40000000
10-
set backtrace limit 20
11-
b *0x40000000
7+
# set architecture arm
8+
# handle SIGILL nostop pass noprint
9+
# add-symbol-file app/bin/app.elf 0x40000000
10+
# set backtrace limit 20
11+
# b *0x40000000

.github/workflows/main.yml

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,7 @@ jobs:
6262
image: zondax/builder-bolos:latest
6363
options: --user ${{ needs.configure.outputs.uid_gid }}
6464
env:
65-
BOLOS_SDK: /__w/ledger-edgeware/ledger-edgeware/deps/nanos-secure-sdk
65+
BOLOS_SDK: ${{ github.workspace }}/deps/nanos-secure-sdk
6666
BOLOS_ENV: /opt/bolos
6767
HOME: /home/zondax_circle
6868
steps:
@@ -108,9 +108,7 @@ jobs:
108108
npm install -g yarn
109109
- name: Build Ledger app
110110
run: |
111-
make build_full_parser_s
112-
make clean
113-
make build_full_parser_x
111+
make SUBSTRATE_PARSER_FULL=1
114112
- name: Build/Install build js deps
115113
run: |
116114
export PATH=~/.cargo/bin:$PATH
@@ -142,7 +140,7 @@ jobs:
142140
npm install -g yarn
143141
- name: Build Ledger app
144142
run: |
145-
make build_sr25519
143+
make clean_build && SUBSTRATE_PARSER_FULL=1 SUPPORT_SR25519=1 make buildS
146144
- name: Build/Install build js deps
147145
run: |
148146
export PATH=~/.cargo/bin:$PATH

.gitignore

Lines changed: 25 additions & 35 deletions
Original file line numberDiff line numberDiff line change
@@ -47,40 +47,30 @@
4747
# Kernel Module Compile Results
4848
*.mod*
4949
*.cmd
50-
.tmp_versions/
51-
modules.order
52-
Module.symvers
53-
Mkfile.old
54-
dkms.conf
55-
56-
\cmake-build-debug
57-
\.idea/
58-
/tmp/
59-
/deps/nano2-sdk/
60-
61-
# Created by cmake
62-
googletest-download/
63-
googletest-src/
64-
googletest-build/
65-
CMakeFiles/
66-
CMakeCache.txt
67-
unittests
68-
*.cmake
69-
Testing/
70-
cmake-build-fuzz/
71-
72-
# Others
73-
/cmake-build-debug/
74-
/cmake-build-fuzz/
75-
\.idea
76-
/app/bin/
77-
/app/debug/
78-
/app/obj/
7950

51+
##########################
52+
53+
tests_zemu/.yarn/*
54+
tests_zemu/!.yarn/patches
55+
tests_zemu/!.yarn/releases
56+
tests_zemu/!.yarn/plugins
57+
tests_zemu/!.yarn/sdks
58+
tests_zemu/!.yarn/versions
59+
tests_zemu/.pnp.*
60+
61+
#########################
62+
63+
.vscode
64+
.idea
65+
66+
node_modules
67+
fuzz/corpora
68+
69+
!build/.gitkeep
70+
build/*
71+
cmake-build-debug
72+
73+
tests_zemu/snapshots-tmp
8074
tests_zemu/yarn.lock
81-
/tests_zemu/snapshots-tmp/
82-
/build
83-
/fuzz-*.log
84-
/fuzz/corpora
85-
/tests_tools/target/
86-
!/tests_tools/neon/yarn.lock
75+
tests_tools/target
76+

CMakeLists.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ if(ENABLE_FUZZING)
4141
message(FATAL_ERROR "Fuzz logging enabled")
4242
endif()
4343

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

4646
if ("${CMAKE_CXX_COMPILER_ID}" STREQUAL "Clang")
4747
# require at least clang 3.2

Makefile

Lines changed: 3 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,9 @@
2323

2424
ifeq ($(BOLOS_SDK),)
2525
# In this case, there is not predefined SDK and we run dockerized
26+
# When not using the SDK, we override and build the XL complete app
27+
28+
SUBSTRATE_PARSER_FULL ?= 1
2629
include $(CURDIR)/deps/ledger-zxlib/dockerized_build.mk
2730

2831
else
@@ -33,18 +36,6 @@ default:
3336
COIN=$(COIN) $(MAKE) -C app $@
3437
endif
3538

36-
build_sr25519: SUPPORT_SR25519=1 # Alternative app purpose
37-
build_sr25519: SUBSTRATE_PARSER_FULL=1 # Use full parser
38-
build_sr25519: buildS
39-
cp $(CURDIR)/app/bin/app.elf $(CURDIR)/app/output/app_sr25519.elf
40-
cp $(CURDIR)/app/bin/app.elf $(CURDIR)/app/bin/app_sr25519.elf
41-
42-
build_full_parser_s: SUBSTRATE_PARSER_FULL=1
43-
build_full_parser_s: buildS
44-
45-
build_full_parser_x: SUBSTRATE_PARSER_FULL=1
46-
build_full_parser_x: buildX
47-
4839
tests_tools_build:
4940
cd tests_tools/neon && yarn install
5041

0 commit comments

Comments
 (0)