Lines Matching +full:bad +full:- +full:key +full:- +full:2
3 # SPDX-License-Identifier: Apache-2.0
31 cmd.inf('Skipping block at ' + ptr + '; bad magic')
33 if hd[2] & 1:
34 # NO-flash flag set; skip block
42 padding = newaddr - curraddr
48 cmd.die(f'Non-word padding size at {ptr}')
50 padding -= 4
64 TYPE_BYTES = 2
106 Work with Binary Descriptors - constant data objects
115 subparsers = parser.add_subparsers(help='sub-command to run', required=True)
119 dump_parser.add_argument('--file-type', type=str, choices=self.EXTENSIONS, help='File type')
120 dump_parser.add_argument('-b', '--big-endian', action='store_true',
127 … search_parser.add_argument('--file-type', type=str, choices=self.EXTENSIONS, help='File type')
128 search_parser.add_argument('-b', '--big-endian', action='store_true',
138 custom_search_parser.add_argument('--file-type', type=str, choices=self.EXTENSIONS,
140 custom_search_parser.add_argument('-b', '--big-endian', action='store_true',
149 get_offset_parser.add_argument('--file-type', type=str, choices=self.EXTENSIONS,
151 get_offset_parser.add_argument('-b', '--big-endian', action='store_true',
202 if index == -1:
247 if index == -1:
253 current_tag = self.bytes_to_short(image[index:index+2])
255 index += 2 # index points to length
256 length = self.bytes_to_short(image[index:index+2])
257 index += 2 # index points to data
262 decoded_data = data[:-1].decode('ascii')
270 key = f'0x{current_tag:04x}'
271 descriptors[key] = decoded_data
274 current_tag = self.bytes_to_short(image[index:index+2])
326 return (x + alignment - 1) & (~(alignment - 1))