sorry it seems my site is down for the moment or just being very slow, but hopefully it is back soon.
anyway here's how you make a RAM OS
- grab xipport
- grab a rom image that's ready for xipport
(see romtutorial for what's needed
)
- this rom image should be ce.net for now. hpc2000 nk.exe has to be relocated to run from ram, i can do it but that's not the most trivial without a relocation table so will work on it for a few mins.
- put the kernel image away for now, first to deal with is the OS image
- dump the rom, go to OUT folder, open romhdr.txt and edit it
mine with the OS 2.02 was like this
(i'm copying only the relevant parts
) :
original:
physfirst: P=84080000
physlast: 859C8ED0
ulRAMStart: R=90261000
ulRAMFree: 9029D000
ulRAMEnd: 94000000
and pExtensions: P+0C1832D4
new:
physfirst: P=90300000
physlast: 91C60000
ulRAMStart: R=90261000
ulRAMFree: 91C6D000
ulRAMEnd: 94000000
pExtensions: P+01960000
physfirst is start of the OS xip image
phylast is end of it
within physfirst and physlast nothing else should be present!
ulRAMStart is start of the ram space that the kernel will use. do not change that one unless you relocate kernel data section
ulRAMFree is end of that and it also defines the start of the ram that will be used for the rest of the OS: program ram, storage ram
(object store
)! this is basically the ram start visible to OS
ulRAMEnd is the ram end visible to OS
the pExtensions is just to specify image size for xipport
(due to a bit buggy implementation i'd say
), for a ram os image this is crucial not to let it grow too large ... or if you are unsure how large your image will be after rebuilding then you could just specify 01D80000 there then later cut the xip_out.bin to size
now for the 900c,
usable rom is anything between 0x84080000-0x85E00000
(rest is bootloader etc
)
usable ram is anything between 0x90200000-0x94000000
(rest is bootloader etc
)
use this data to be able to decide how to change the romhdr.txt. my example is quite sane except physlast may be different if your OS image is larger or smaller. you can choose a different physfirst too, such as 902A0000 if you want even more ram free. i was just being lazy.
...after this, hit realloc P then rebuild OS image into xip_out.bin,
now kernel
(in its separate image, not in the OS
), romheader must be changed too, but only this: ulRAMFree: 91C6D000. because this entry in OS image will be ignored by kernel, it reads its own for that. without this my OS didn't boot, so i needed one more try to get it right
and finally, xipchain has to be changed too, at the end of the "kernel binary", where you see the string "XIP2"... just before it, find 00 00 08 84, change it to new physfirst, say, 90300000, so then 00 00 30 90.
that should be it, i also changed 00 00 D8 01 to 00 00 96 01, but that's not really necessary...
finally, to make a XIP.BIN to be flashed, i just enlarged the kernel part so it ended in 0x90300000
(originally 394536 bytes, that became 1,048,576 bytes large
), so then i could just attach it to the OS image start, then made the bin with xipbin.exe and patched last bytes to 00 10 20 90
(details in romtut...
). this isn't needed for images that are to be flashed into rom, but this patch is essential for booting a RAM OS.
p.s.. in the image i uploaded i put my rom v2.0 patched kernel into it because that's what i found first on my hdd, but the OS image is stock.
Edited by cmonex 2008-02-17 10:31 PM