fusee_cpp: add logic for loading mtc overlays

This commit is contained in:
Michael Scire 2021-08-23 21:15:51 -07:00 committed by SciresM
parent 4480e7a8a5
commit 3bcdd0c3c8
157 changed files with 2222 additions and 47 deletions

View file

@ -66,6 +66,7 @@ ATMOSPHERE_BUILD_CONFIGS += $(strip $1)
$(strip $1): check_libexo_$(strip $1) $$(ATMOSPHERE_BUILD_DIR)/$(strip $1)
@$$(MAKE) __RECURSIVE__=1 OUTPUT=$$(OUTPUT_BASE)$(strip $2) $(3) \
ATMOSPHERE_BUILD_TARGET=$(strip $2) \
DEPSDIR=$$(CURDIR)/$$(ATMOSPHERE_BUILD_DIR)/$(strip $1) \
LIBEXOSPHERE_NAME=exosphere$(strip $2) \
--no-print-directory -C $$(ATMOSPHERE_BUILD_DIR)/$(strip $1) \
@ -110,7 +111,7 @@ DEPENDS := $(OFILES:.o=.d)
#---------------------------------------------------------------------------------
$(OUTPUT).lz4 : $(OUTPUT).bin
@python $(TOPDIR)/lz4_compress.py $(OUTPUT).bin $(OUTPUT).lz4
@python $(TOPDIR)/split_bin.py "$(ATMOSPHERE_BUILD_TARGET)"
@echo built ... $(notdir $@)
$(OUTPUT).bin : $(OUTPUT).elf

View file

@ -1,23 +0,0 @@
#!/usr/bin/env python
import sys, lz4
from struct import unpack as up
def lz4_compress(data):
try:
import lz4.block as block
except ImportError:
block = lz4.LZ4_compress
return block.compress(data, 'high_compression', store_size=False)
def main(argc, argv):
if argc != 3:
print('Usage: %s in out' % argv[0])
return 1
with open(argv[1], 'rb') as f:
data = f.read()
with open(argv[2], 'wb') as f:
f.write(lz4_compress(data[:0x2B000 + 0x11000]))
return 0
if __name__ == '__main__':
sys.exit(main(len(sys.argv), sys.argv))

Some files were not shown because too many files have changed in this diff Show more