mirror of
https://github.com/trezor/trezor-firmware.git
synced 2024-11-14 03:30:02 +00:00
scons: add 32bit unix build
This commit is contained in:
parent
1fc920d94c
commit
647e39de79
13
Makefile
13
Makefile
@ -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)
|
||||
|
@ -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
|
||||
#
|
||||
|
Loading…
Reference in New Issue
Block a user