SD980 port

Ok, I am thinking to start the SD980 port.I won't have a lot of time to work at it, maybe 10 hours a week or so, and will probably need a lot of help and advice, but I hope to get something working this year.Anyway, I was wondering, which camera do you think I should use as a reference model thing?

I have the following values in the makefile.inc:MEMBASEADDR=0x1900RESTARTSTART=0x50000MEMISOSTART=0x153E84ROMBASEADDR=0xFF810000

I am not sure that MEMISOSTART is right, the documentation on how to find this value is very ambiguous, but I looked at the SX10 firmware, found where it is, then looked at my firmware and found a similar code, so I used the value that I found. If someone else can confirm that, it would be nice.

You can try turning on your LED earlier, in entry.S. Most cameras turn of the SD card (using an MMIO address that must be determined from the firmware dump) and a delay loop there.

You've already built a blinker that works, so it might be productive to compare that with the early stages of the loader.

You can look at the disassembly of your CHDK image, which will appear in loader/<camera>/main.dumpYou should be able to clearly see the entry.S code and my_restart. If you have toolchain problems, they may be visible here. You can also look at main.bin, which should be your CHDK image exactly as it will be loaded.

The problem is, the entry.S of CHDK is totally different than the entry.S of the blinker (which is much bigger).I did already look at main.bin and I can clearly see the LED blinking code, which is very near the beginning, and I can't see why the code wouldn't get there if the camera starts to actually execute it. There are no conditional jumps or anything, so the execution SHOULD get there.What exactly is the purpose of turning off the card power? If it's just to support the restart, it shouldn't matter, as my LED blinking code is before the restart thing.

Could it be that for some reason the diskboot.bin and the ps.fi2 are not encoded properly by the toolchain? Would the camera still attempt to run the ps.fi2 if the encoding is not right?

The problem is, the entry.S of CHDK is totally different than the entry.S of the blinker (which is much bigger).

The MMIO address poked in entry.S could be wrong (and almost certainly is, if you haven't corrected it). As I said before, try turning on the LED in entry.S, or try skipping that code. You say the entry.S of the blinker is much bigger... OK, what does it do ?

Quote

Could it be that for some reason the diskboot.bin and the ps.fi2 are not encoded properly by the toolchain? Would the camera still attempt to run the ps.fi2 if the encoding is not right?

I'm fairly sure that the camera won't load an incorrectly encoded FI2, but not 100% certain.

You know how your blinker is encoded right ? Figure out if your CHDK image is encoded in the same way.

For diskboot, setting NEED_ENCODED_DISKBOOT=3 in your makefile.inc should use the right diskboot encoding for your camera (assuming you are working from the latest SVN) but obviously I haven't tested that.

Ok, got the SOB to work So.. NEED_ENCODED_DISKBOOT needs to be removed.The the diskboot.bin needs to be transformed into a ps.fi2 with the fi2encdec tool.Afterwards, I can use the firmware update method and it works (previously it didn't, if I had NEED_ENCODED_DISKBOOT set as 1 or 2). However, the diskboot.bin method does not work, as expected.

I use a 3 weeks old SVN, and the only valid methods for NEED_ENCODED_DISKBOOT are 1 and 2.

Ok, got the SOB to work So.. NEED_ENCODED_DISKBOOT needs to be removed.The the diskboot.bin needs to be transformed into a ps.fi2 with the fi2encdec tool.Afterwards, I can use the firmware update method and it works (previously it didn't, if I had NEED_ENCODED_DISKBOOT set as 1 or 2). However, the diskboot.bin method does not work, as expected.

You've broken something horribly in the makefiles then, since the FI2 is normally made from the unencoded main.bin, not the encoded diskboot.bin.

Quote

I use a 3 weeks old SVN, and the only valid methods for NEED_ENCODED_DISKBOOT are 1 and 2.

From looking at the makefile, you have to explicitly enable the FI2, and you need some keys that I didn't understand how to get (yes, I did read the thread, but maybe I am too tired).And I am not making the FI2 with the makefile, I am making it with a bat that I also used with the blinker. But it is made from the diskboot.bin