From: PALFFY D. <dpa...@ra...> - 2003-11-10 15:30:44
|
Hi! > Thats pretty much right. I don't know of any other sequences though. > The fixed entry points into the flash are more likely. My original > thought was to just take the existing bootloader and mod it to add in > the new key sequence and then just use two boot loaders (or try and > flash it in!). Ok, the quick hack i've written about to you in private worked. I'm pleased to announce this loader. Now I can boot either the original firmware or linux. You may want to put it on sourceforge. In short the linux image is appended as a third image to the firmware, after this, a short bootloader is appended. After this the original boot table is moved to 0x3e00, and a third boot record is patched to this boot table. After this, the original first boot entry is modified to load the entire image, and the entry point of this image is set to the loader. It's nice that Apple uses such a simple checksum algorithm, otherwise this would be much harder. This part is done with a heavily modified patch_fw (in fact it's nearly entirely rewritten from scratch). The bootloader simply checks for the ffwd key, and if it's hold, it loads the third image (linux), otherwise the first (Apple image). Some parts of the code are really ugly, there are many assumptions about compiler internals, firmware internals, etc, but works with firmware 2.1. For the adventurous: please try it with other firmware and hardware revisions. But I take no responsibility at all... -- Dani ...and Linux for all. |