mirror of
https://github.com/saymrwulf/xous-core.git
synced 2026-11-20 09:03:28 +00:00
make the partition on dump vs ci analysis cleaner
This commit is contained in:
parent
5f6a21bff1
commit
0cf27be3b0
1 changed files with 21 additions and 12 deletions
|
|
@ -13,6 +13,7 @@ SYSTEM_BASIS = '.System'
|
||||||
PAGE_SIZE = 4096
|
PAGE_SIZE = 4096
|
||||||
VPAGE_SIZE = 4064
|
VPAGE_SIZE = 4064
|
||||||
MBBB_PAGES = 10
|
MBBB_PAGES = 10
|
||||||
|
DO_CI_TESTS = True
|
||||||
|
|
||||||
# build a table mapping all non-printable characters to None
|
# build a table mapping all non-printable characters to None
|
||||||
NOPRINT_TRANS_TABLE = {
|
NOPRINT_TRANS_TABLE = {
|
||||||
|
|
@ -138,6 +139,7 @@ def keycommit_decrypt(key, aad, pp_data):
|
||||||
|
|
||||||
|
|
||||||
def main():
|
def main():
|
||||||
|
global DO_CI_TESTS
|
||||||
parser = argparse.ArgumentParser(description="Debug PDDB Images")
|
parser = argparse.ArgumentParser(description="Debug PDDB Images")
|
||||||
parser.add_argument(
|
parser.add_argument(
|
||||||
"--name", required=False, help="pddb disk image root name", type=str, nargs='?', metavar=('name'), const='./pddb'
|
"--name", required=False, help="pddb disk image root name", type=str, nargs='?', metavar=('name'), const='./pddb'
|
||||||
|
|
@ -157,6 +159,9 @@ def main():
|
||||||
keyfile = './tools/pddb-images/{}.key'.format(args.name)
|
keyfile = './tools/pddb-images/{}.key'.format(args.name)
|
||||||
imagefile = './tools/pddb-images/{}.bin'.format(args.name)
|
imagefile = './tools/pddb-images/{}.bin'.format(args.name)
|
||||||
|
|
||||||
|
if args.dump:
|
||||||
|
DO_CI_TESTS = False
|
||||||
|
|
||||||
numeric_level = getattr(logging, args.loglevel.upper(), None)
|
numeric_level = getattr(logging, args.loglevel.upper(), None)
|
||||||
if not isinstance(numeric_level, int):
|
if not isinstance(numeric_level, int):
|
||||||
raise ValueError('Invalid log level: %s' % args.loglevel)
|
raise ValueError('Invalid log level: %s' % args.loglevel)
|
||||||
|
|
@ -336,6 +341,8 @@ class KeyDescriptor:
|
||||||
except ValueError:
|
except ValueError:
|
||||||
logging.error("key: couldn't decrypt vpage @ {:x} ppage @ {:x}".format(page_addr), pp_start)
|
logging.error("key: couldn't decrypt vpage @ {:x} ppage @ {:x}".format(page_addr), pp_start)
|
||||||
page_addr += VPAGE_SIZE
|
page_addr += VPAGE_SIZE
|
||||||
|
global DO_CI_TESTS
|
||||||
|
if DO_CI_TESTS:
|
||||||
# CI check -- if it doesn't pass, it doesn't mean we've failed -- could also just be a "normal" record that doesn't have the checksum appended
|
# CI check -- if it doesn't pass, it doesn't mean we've failed -- could also just be a "normal" record that doesn't have the checksum appended
|
||||||
check_data = self.data[:-4]
|
check_data = self.data[:-4]
|
||||||
while len(check_data) % 4 != 0:
|
while len(check_data) % 4 != 0:
|
||||||
|
|
@ -355,6 +362,7 @@ class KeyDescriptor:
|
||||||
def as_str(self, indent=''):
|
def as_str(self, indent=''):
|
||||||
PRINT_LEN = 64
|
PRINT_LEN = 64
|
||||||
global PRINTED_FULL
|
global PRINTED_FULL
|
||||||
|
global DO_CI_TESTS
|
||||||
desc = ''
|
desc = ''
|
||||||
if self.start > 0x7e_fff02_0000:
|
if self.start > 0x7e_fff02_0000:
|
||||||
desc += indent + 'Start: 0x{:x} (lg)\n'.format(self.start)
|
desc += indent + 'Start: 0x{:x} (lg)\n'.format(self.start)
|
||||||
|
|
@ -370,6 +378,7 @@ class KeyDescriptor:
|
||||||
desc += indent + 'UNRESOLVED'
|
desc += indent + 'UNRESOLVED'
|
||||||
|
|
||||||
desc += ' | Age: {}'.format(self.age)
|
desc += ' | Age: {}'.format(self.age)
|
||||||
|
if DO_CI_TESTS:
|
||||||
desc += ' | CI OK: {}'.format(self.ci_ok)
|
desc += ' | CI OK: {}'.format(self.ci_ok)
|
||||||
desc += '\n'
|
desc += '\n'
|
||||||
if len(self.data) < PRINT_LEN:
|
if len(self.data) < PRINT_LEN:
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue