Skip to content

Commit c8f7e10

Browse files
committed
Print Qoob installer space usage
1 parent dbf12ff commit c8f7e10

File tree

1 file changed

+8
-4
lines changed

1 file changed

+8
-4
lines changed

buildtools/qoob_injector.py

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -15,21 +15,25 @@
1515
out = bytearray(f.read())
1616

1717
if bios.endswith(".gcb"):
18-
if len(img) > 128 * 1024:
19-
raise "Qoob Pro BIOS image too big to fit in flasher"
18+
typename = "Pro"
19+
max_size = 128 * 1024
2020

2121
msg = b"gekkoboot for QOOB Pro\0"
2222
msg_offset = 0x1A68
2323
img_offset = 0x1AE0
2424

2525
if bios.endswith(".qbsx"):
26-
if len(img) > 62800:
27-
raise "Qoob SX BIOS image too big to fit in flasher"
26+
typename = "SX"
27+
max_size = 62800
2828

2929
msg = b"gekkoboot for QOOB SX\0"
3030
msg_offset = 7240
3131
img_offset = 7404
3232

33+
print(f"Qoob {typename} image size: {len(img)}/{max_size}")
34+
if len(img) > max_size:
35+
raise f"Qoob {typename} BIOS image too big to fit in flasher"
36+
3337
out[msg_offset:msg_offset + len(msg)] = msg
3438
out[img_offset:img_offset + len(img)] = img
3539

0 commit comments

Comments
 (0)