From 83686bc0c6f09728ce4f3cc7471eca0986759dce Mon Sep 17 00:00:00 2001 From: Jan Pochyla Date: Mon, 7 Aug 2017 12:31:42 +0200 Subject: [PATCH] scons: add TREZOR_NOUI support --- .travis.yml | 2 +- Makefile | 3 +++ SConscript.unix | 4 ++++ 3 files changed, 8 insertions(+), 1 deletion(-) diff --git a/.travis.yml b/.travis.yml index 5d4497b4e..6ae1b864c 100644 --- a/.travis.yml +++ b/.travis.yml @@ -43,7 +43,7 @@ script: - test "$GOAL" != "stm32" || make build_firmware - test "$GOAL" != "stm32" || make sizecheck - - test "$GOAL" != "unix" || make build_unix TREZOR_NOUI=1 + - test "$GOAL" != "unix" || make build_unix_noui - test "$GOAL" != "unix" || make test - test "$GOAL" != "unix" || make testpy diff --git a/Makefile b/Makefile index aacd58e31..b0cd9a9ee 100644 --- a/Makefile +++ b/Makefile @@ -59,6 +59,9 @@ build_firmware: res build_cross ## build firmware with frozen modules build_unix: ## build unix port $(SCONS) build/unix/micropython +build_unix_noui: ## build unix port without UI support + $(SCONS) build/unix/micropython TREZOR_NOUI=1 + build_cross: ## build mpy-cross port $(MAKE) -C vendor/micropython/mpy-cross $(CROSS_PORT_OPTS) diff --git a/SConscript.unix b/SConscript.unix index a015792f0..dbd129ae2 100644 --- a/SConscript.unix +++ b/SConscript.unix @@ -258,6 +258,10 @@ env.Replace( ] + CPPDEFINES_MOD, ASPPFLAGS='$CFLAGS $CCFLAGS', ) +if ARGUMENTS.get('TREZOR_NOUI', 0): + env.Append( + CPPDEFINES='TREZOR_NOUI', ) + env.Replace( PYTHON='python', MAKEQSTRDATA='$PYTHON vendor/micropython/py/makeqstrdata.py',