mirror of
https://github.com/trezor/trezor-firmware.git
synced 2024-11-22 07:28:10 +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
|
BOOTLOADER_BUILD_DIR = build/bootloader
|
||||||
FIRMWARE_BUILD_DIR = build/firmware
|
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 commands:
|
||||||
|
|
||||||
help: ## show this help
|
help: ## show this help
|
||||||
@ -57,10 +66,10 @@ build_firmware: res build_cross ## build firmware with frozen modules
|
|||||||
$(SCONS) build/firmware/firmware.bin
|
$(SCONS) build/firmware/firmware.bin
|
||||||
|
|
||||||
build_unix: ## build unix port
|
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
|
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
|
build_cross: ## build mpy-cross port
|
||||||
$(MAKE) -C vendor/micropython/mpy-cross $(CROSS_PORT_OPTS)
|
$(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_TOOL='$PYTHON vendor/micropython/tools/mpy-tool.py',
|
||||||
MPY_CROSS='vendor/micropython/mpy-cross/mpy-cross', )
|
MPY_CROSS='vendor/micropython/mpy-cross/mpy-cross', )
|
||||||
|
|
||||||
|
if ARGUMENTS.get('TREZOR_X86', 0):
|
||||||
|
env.Append(
|
||||||
|
CCFLAGS='-m32',
|
||||||
|
LINKFLAGS='-m32', )
|
||||||
|
|
||||||
#
|
#
|
||||||
# Micropython version
|
# Micropython version
|
||||||
#
|
#
|
||||||
|
Loading…
Reference in New Issue
Block a user