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

Commit

Permalink
Merge pull request #60 from obsidiansystems/develop
Browse files Browse the repository at this point in the history
2.0.0
  • Loading branch information
3noch authored Mar 4, 2019
2 parents ff1de11 + 7d57ca6 commit 73a22a2
Show file tree
Hide file tree
Showing 54 changed files with 1,805 additions and 995 deletions.
2 changes: 1 addition & 1 deletion .gitignore
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
bin
debug
dep
/dep
obj
src/u2f_crypto_data.h
src/glyphs.h
Expand Down
21 changes: 21 additions & 0 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
# Contributing

## Hacking with [Nix](https://nixos.org/nix/)

The `nix/` folder contains helper scripts for working with the ledger via Nix.

### Developing
Use `nix/env.sh` to enter a shell where you can run `make` and it will just work. You can also pass a command instead, e.g. `nix/env.sh make clean`.

For development, use `nix/watch.sh make APP=<tezos_baking|tezos_wallet>` to incrementally build on every change. Be sure to `nix/env.sh make clean` if you start watching a different `APP`.

### Building
To do a full Nix build run `nix/build.sh`. You can pass `nix-build` arguments to this to build specific attributes, e.g. `nix/build.sh -A wallet`.

### Installing
`nix/install.sh` will install both the wallet and baking apps. Use `nix/install.sh baking` to install just the baking app or `nix/install.sh wallet` to install just the wallet.


### Releasing

`nix/build -A release.all`
52 changes: 40 additions & 12 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -20,29 +20,48 @@ $(error Environment variable BOLOS_SDK is not set)
endif
include $(BOLOS_SDK)/Makefile.defines

ifeq ($(BAKING_APP),Y)
ifeq ($(APP),)
APP=tezos_wallet
endif

ifeq ($(APP),tezos_baking)
APPNAME = "Tezos Baking"
else
else ifeq ($(APP),tezos_wallet)
APPNAME = "Tezos Wallet"
endif
APP_LOAD_PARAMS=--appFlags 0 --curve ed25519 --curve secp256k1 --curve prime256r1 --path "44'/1729'" $(COMMON_LOAD_PARAMS)
VERSION_TAG=$(shell git describe --tags | cut -f1 -d-)
APPVERSION_M=1
APPVERSION_N=5
VERSION_TAG ?= $(shell git describe --tags 2>/dev/null | cut -f1 -d-)
APPVERSION_M=2
APPVERSION_N=0
APPVERSION_P=0
APPVERSION=$(APPVERSION_M).$(APPVERSION_N).$(APPVERSION_P)

ifneq (v$(APPVERSION), $(VERSION_TAG))
# Only warn about version tags if specified/inferred
ifeq ($(VERSION_TAG),)
$(warning VERSION_TAG not checked)
else
ifneq (v$(APPVERSION), $(VERSION_TAG))
$(warning "Version-Tag Mismatch: v$(APPVERSION) version and $(VERSION_TAG) tag")
endif
endif

COMMIT := $(shell git describe --abbrev=8 --always)
COMMIT ?= $(shell git describe --tags --abbrev=8 --always --long --dirty 2>/dev/null)
ifeq ($(COMMIT),)
$(error COMMIT not specified and could not be determined with git)
endif

ICONNAME=icon.gif

################
# Default rule #
################
all: default
all: show-app default


.PHONY: show-app
show-app:
@echo ">>>>> Building $(APP) at commit $(COMMIT)"


############
# Platform #
Expand All @@ -59,15 +78,21 @@ DEFINES += COMMIT=\"$(COMMIT)\" APPVERSION_N=$(APPVERSION_N) APPVERSION_P=$(AP
##############
# Compiler #
##############
ifneq ($(BOLOS_ENV),)
GCCPATH := $(BOLOS_ENV)/gcc-arm-none-eabi-5_3-2016q1/bin/
CLANGPATH := $(BOLOS_ENV)/clang-arm-fropi/bin/
endif

CC := $(CLANGPATH)clang

ifeq ($(BAKING_APP),)
ifeq ($(APP),tezos_wallet)
CFLAGS += -O3 -Os -Wall -Wextra
endif
ifeq ($(BAKING_APP),Y)
else ifeq ($(APP),tezos_baking)
CFLAGS += -DBAKING_APP -O3 -Os -Wall -Wextra
else
ifeq ($(filter clean,$(MAKECMDGOALS)),)
$(error Unsupported APP - use tezos_wallet, tezos_baking)
endif
endif

AS := $(GCCPATH)arm-none-eabi-gcc
Expand All @@ -84,7 +109,7 @@ APP_SOURCE_PATH += src
SDK_SOURCE_PATH += lib_stusb lib_stusb_impl

### U2F support (wallet app only)
ifeq ($(BAKING_APP),)
ifeq ($(APP), tezos_wallet)
SDK_SOURCE_PATH += lib_u2f lib_stusb_impl

DEFINES += USB_SEGMENT_SIZE=64
Expand All @@ -107,3 +132,6 @@ include $(BOLOS_SDK)/Makefile.rules

#add dependency on custom makefile filename
dep/%.d: %.c Makefile

listvariants:
@echo VARIANTS APP tezos_wallet tezos_baking
Loading

0 comments on commit 73a22a2

Please sign in to comment.