sbl: b12 chain, slots, maze, stubs, docs current
This commit is contained in:
@@ -108,6 +108,31 @@ def main():
|
||||
assert d[o:o + 4].hex() == 'e9f700fa', hx(d, 0x802F678)
|
||||
d[o:o + 4] = bytes.fromhex('c046c046')
|
||||
save(d, 'img0_b10.elf')
|
||||
# b11 = b10 with installer-bl restored (redirect, installer runs again)
|
||||
o = off(0x802F678)
|
||||
assert d[o:o + 4].hex() == 'c046c046'
|
||||
d[o:o + 4] = bytes.fromhex('e9f700fa')
|
||||
save(d, 'img0_b11.elf')
|
||||
# b12: b10-variant with jump-table entry0 NOP (fall into entry1/case-1);
|
||||
# rebuilt from b10 base (installer stays skipped)
|
||||
d = bytearray(base)
|
||||
for va, (a, b) in BLX2BL.items():
|
||||
set4(d, va, b)
|
||||
for va, exp, new in [
|
||||
(0x802F664, 'e4f77efc', 'c046c046'),
|
||||
(0x802F672, 'e6f7bbfa', 'c046c046'),
|
||||
(0x802F678, 'e9f7fef9', 'c046c046'),
|
||||
(0x801B71E, '9847fee7', 'c046c046'),
|
||||
(0x8008396, 'fef780f9', 'c046c046'),
|
||||
(0x8016184, 'fdf790fc', 'c046c046'),
|
||||
(0x801B76C, '280b0508', '00000708'),
|
||||
]:
|
||||
assert hx(d, va) == exp, (hex(va), hx(d, va))
|
||||
set4(d, va, new)
|
||||
o = off(0x8013AA8)
|
||||
assert d[o:o + 4].hex() == '07f026be', hx(d, 0x8013AA8)
|
||||
d[o:o + 4] = bytes.fromhex('c046c046')
|
||||
save(d, 'img0_b12.elf')
|
||||
|
||||
|
||||
if __name__ == '__main__':
|
||||
|
||||
Reference in New Issue
Block a user