Quote
kingarthur - 2007-12-04 5:47 PM
Quote
cmonex - 2007-11-30 11:22 PM
if you have problems with determining the rom layout... i can describe the header in that image for you. that'll determine it nicely.
Cmonex, can you describe the rom layout for the S1?
Thanks
yes, but in future please don't PM, this stuff is better suited for this thread. thanks.
1
) layout:
your rom is nand so all the XIP addresses refer to ram.
RAM starts at 0x8C000000
(virtual
) for your device.
rom has three parts, xipkernel, xipchain data and OS.
xipkernel starts at 0x8C000000, size may vary up to 0x200000
(original size is 0x142B00
).
(stored at 0x20000 in flash, i.e. in a dumped image
)
xipchain starts at 0x8C200000 and is 0x528 bytes
(0x220000 in flash
)
OS starts at 0x8C201000
(0x221000 in flash
) and max size, well, 0x15e1000 bytes according to MBR in your device's rom. according to dump there is 0x159F000 bytes space for it though. and the rom dumper is supposed to read partition sizes to make the image size correct.
another size info... xipchain entry for it says the max size would be 0x1400000 bytes. so if you want to make it bigger you might edit that in _XIPCHAIN_ENTRY, the one named "NK". but i never tried this modification, so you should be careful. example, for the 900c, i can see the max size info is ignored as i made it bigger while never editing the max size info in there!
anyway, right now your OS is quite a lot smaller so you can fit in some extra stuff
but note here. the rom dump that was made
(on two avic s1's
) was not fully clean
(no idea why
), so there is some data here and there, where it would actually be empty space. some more data is directly following the OS
(and then lots of empty space for your rom
), i assume that is junk too, but if not then be careful - i'll give 99% chance it is junk from the look of it.
ah also your OS type is BINFS not XIP RAMIMAGE
(according to MBR info
), so if you make a bigger OS it should still be fine i.e. not consuming more RAM. like it would if it were real XIP - i've never had a chance to play with BINFS devices so this is just a guess, if your RAM decreases let me know.
2
) then, you asked in PM:
Quote
As well, which of the tools should I use to convert the .bin file to the XIP format?
i'm not sure i understand your question, there is no converting to XIP format, rom image contents are either XIP structure or not. if you meant the MS BIN stuff, forget it, your device doesn't use it.
for that the flashable image format is:
first 0x210 bytes are fixed, just copy them from the flashable image i made for you
then, uh, i'll just quote from my post on gpspassion
(http://www.gpspassion.com/forumsen/topic.asp?TOPIC_ID=97599&whichpage=2
):
at 0x210, for some reason we get the start of XIPkernel (on the airis it is 0x8c000000, in little endian. happens to be RAM start for the airis), and the length (i won't tell you now, so you can practice )
after that for some reason it gives kernel entrypoint(?), 0x8c001000.
after that 00 00 until 0x22C, which i assume gives the number of images in the whole image. it is 3 for us.
then, finally, at 0x230 we get all the info on these three images.
first one is xipkernel so again 0x8c000000 and its size in the next four bytes, second one is xipchain data start, and its size, finally OS image start and its size.
these are all RAM locations. that is because the airis has NAND which cant do XIP but the OS is still in XIP format so it is loaded into RAM as a compromise.
i was talking about an airis PNA but same header structure for avic really.
so you edit the sizes when you make a new flashable image, the start addresses are static, do not ever change them. also xipchain size 0x528 should not be changed.
finally there is a checksum txt. just use some tool
(hex workshop for example
) to calculate a simple 32 bit checksum for the image and enter that in the winceimg.cks file, and also the size of the image in bytes.
Edited by cmonex 2007-12-05 1:53 AM