mirror of
https://github.com/Atmosphere-NX/Atmosphere.git
synced 2025-05-13 22:54:24 -04:00
exo/program: release, debug, audit configs
This commit is contained in:
parent
c572024a5e
commit
b4c908ba9f
8 changed files with 104 additions and 59 deletions
|
@ -19,17 +19,17 @@ def split_binary(data):
|
|||
|
||||
boot_code = data[BOOT_CODE_START - START:BOOT_CODE_END - BOOT_CODE_START]
|
||||
program = data[PROGRAM_START - START:]
|
||||
return [('boot_code.lz4', lz4_compress(boot_code)), ('program.lz4', lz4_compress(program))]
|
||||
return [('boot_code%s.lz4', lz4_compress(boot_code)), ('program%s.lz4', lz4_compress(program))]
|
||||
|
||||
def main(argc, argv):
|
||||
if argc != 3:
|
||||
print('Usage: %s in outdir' % argv[0])
|
||||
if argc != 4:
|
||||
print('Usage: %s in suffix outdir' % argv[0])
|
||||
return 1
|
||||
with open(argv[1], 'rb') as f:
|
||||
data = f.read()
|
||||
assert len(data) >= 0x40
|
||||
for (fn, fdata) in split_binary(data):
|
||||
with open('%s/%s' % (argv[2], fn), 'wb') as f:
|
||||
with open('%s/%s' % (argv[3], fn % argv[2]), 'wb') as f:
|
||||
f.write(fdata)
|
||||
return 0
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue