1
0
mirror of https://github.com/trezor/trezor-firmware.git synced 2024-11-12 18:49:07 +00:00

scons: add 32bit unix build

This commit is contained in:
Jan Pochyla 2017-08-08 14:23:34 +02:00
parent 1fc920d94c
commit 647e39de79
2 changed files with 16 additions and 2 deletions

View File

@ -8,6 +8,15 @@ BOARDLOADER_BUILD_DIR = build/boardloader
BOOTLOADER_BUILD_DIR = build/bootloader
FIRMWARE_BUILD_DIR = build/firmware
UNAME_S := $(shell uname -s)
ifeq ($(UNAME_S),Darwin)
UNIX_PORT_OPTS ?= TREZOR_X86=0
else
UNIX_PORT_OPTS ?= TREZOR_X86=1
endif
CROSS_PORT_OPTS ?= MICROPY_FORCE_32BIT=1
## help commands:
help: ## show this help
@ -57,10 +66,10 @@ build_firmware: res build_cross ## build firmware with frozen modules
$(SCONS) build/firmware/firmware.bin
build_unix: ## build unix port
$(SCONS) build/unix/micropython
$(SCONS) build/unix/micropython $(UNIX_PORT_OPTS)
build_unix_noui: ## build unix port without UI support
$(SCONS) build/unix/micropython TREZOR_NOUI=1
$(SCONS) build/unix/micropython $(UNIX_PORT_OPTS) TREZOR_NOUI=1
build_cross: ## build mpy-cross port
$(MAKE) -C vendor/micropython/mpy-cross $(CROSS_PORT_OPTS)

View File

@ -270,6 +270,11 @@ env.Replace(
MPY_TOOL='$PYTHON vendor/micropython/tools/mpy-tool.py',
MPY_CROSS='vendor/micropython/mpy-cross/mpy-cross', )
if ARGUMENTS.get('TREZOR_X86', 0):
env.Append(
CCFLAGS='-m32',
LINKFLAGS='-m32', )
#
# Micropython version
#