KnightOS icon indicating copy to clipboard operation
KnightOS copied to clipboard

Automatically determine TXU size from ROM

Open pixelherodev opened this issue 5 years ago • 6 comments

This requires a bit of careful thought, as it's not as simple as checking for zeroes.

pixelherodev avatar Feb 17 '20 02:02 pixelherodev

Is the number of pages dependant on the ROM size ?

aviallon avatar Jun 10 '20 20:06 aviallon

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.

pixelherodev avatar Jun 10 '20 20:06 pixelherodev

Oh. So how do I tell to send every page then ? For debugging purposes.

aviallon avatar Jun 10 '20 20:06 aviallon

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)

pixelherodev avatar Sep 10 '20 04:09 pixelherodev

Note: genkfs appears to print out the page list.

pixelherodev avatar Oct 12 '20 16:10 pixelherodev

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.

pixelherodev avatar Oct 14 '20 12:10 pixelherodev