Add elf2tab output to reproducible reference, to easily check for binary size regressions.

This commit is contained in:
Guillaume Endignoux
2020-06-09 16:25:22 +02:00
parent 0316d7f7e4
commit 6b2df6f2b5
5 changed files with 98 additions and 2 deletions

View File

@@ -428,7 +428,12 @@ class OpenSKInstaller:
"--stack={}".format(STACK_SIZE), "--app-heap={}".format(APP_HEAP_SIZE),
"--kernel-heap=1024", "--protected-region-size=64"
])
self.checked_command(elf2tab_args)
if self.args.elf2tab_output:
output = self.checked_command_output(elf2tab_args)
with open(self.args.elf2tab_output, 'a') as f:
f.write(output)
else:
self.checked_command(elf2tab_args)
def install_tab_file(self, tab_filename):
assert self.args.application
@@ -861,6 +866,14 @@ if __name__ == "__main__":
"storage (i.e. unplugging the key will reset the key)."),
)
main_parser.add_argument(
"--elf2tab-output",
metavar="FILE",
dest="elf2tab_output",
default=None,
help=("When set, the output of elf2tab is appended to this file."),
)
apps_group = main_parser.add_mutually_exclusive_group(required=True)
apps_group.add_argument(
"--no-app",