Automatically determine TXU size from ROM
pixelherodev opened this issue · 6 comments
This requires a bit of careful thought, as it's not as simple as checking for zeroes.
Is the number of pages dependant on the ROM size ?
Sorta.
ROMs include every single page, but TI upgrade files only include the ones you explicitly specify. If we specify every page, then uploads will take an enormous amount of time literally just writing zeroes. If we miss a page (as is sometimes the case now), then it results in missing data and bugs.
Oh. So how do I tell to send every page then ? For debugging purposes.
KnightOS/KnightOS's makefile has this:
mktiupgrade -p -s exploit/signature.bin -d $(PLATFORM) -n $(KEY) $(OUT)KnightOS-$(PLATFORM).rom \
$(OUT)KnightOS-$(PLATFORM).$(UPGRADEEXT) 00 01 02 03 04 05 06 07 08 $(PRIVILEGED) $(EXPLOIT_PAGES);\
Basically, just add 09 0A 0B 0C... etc after 08.
(sorry for the delay, I somehow missed this)
Note: genkfs appears to print out the page list.
Current planned path: add a flag to genkfs that causes it to print the full list of needed pages to a file in .knightos, and read that in the Makefile to generate the mktiupgrade command line.