Message below is just for history =========================Hi Everyone!

As there was no CHDK Port available for my camera, I've decided to port it on my own. I was able to find a lot of doc on wiki/forum,but unfortunately not all questions have answers.

Currently I have the following done:

0) A1100 was chosen as most appropriate example for porting1) FW dumped. My camera has 1.00A firmware version, which was successfully dumped with a help of dump script. 2) IDA 5.2 Project with parsed dump + chdk.idc and A720 sign applied3) Fixed a lot of addresses at boot.c4) Fixed makefile.inc ( PLATFORMID=12734 and MEMISOSTART=0x12EDB4 )

Everything compiled successfully using CHDK-Shell for windows. There is no errors, but, unfortunately camera doesn't want to boot up It's just staying OFF and ignoring PLAYBACK / PowerON while SD Card is Locked.

So I'm asking for help on this issue.

I found that LED address is 0xC0220000 and tried to insert test in my_restart() and in the beginning of boot.c - but with no luck, seems camera just don't want to recognize new firmware.

First off all, I would not suggest using a1100 as your main reference port. That port had troubled development (stop and start development by multiple people who didn't really know what they were doing) and probably still has a lot of stuff broken. In general, you should refer to several ports of a similar generation to the camera you are trying to port. The dryos revision is a better measure of similarity than the model name. That doesn't mean you need to start over, you have to check/correct every platform file no matter what, but a1100 is probably not a good example of how things should work.

A2100 looks like it will probably be a dryos R31 camera. My D10 port is from this version and reasonably complete and well commented, so it may be helpful. I'd also suggest philmoz ports (G12, SX30, SX40) as ones that were likely to be good examples.

I don't see a firmware dump anywhere for this camera. There was a link for one on the wiki, but it just went to some kind of spammy link farm site. If you can post a dump somewhere, that would be helpful.

0xC0220000 seems unlikely for an LED address. You're sure the code you found was for an LED, not some other MMIO ?

I guess you mean loader/camera/main.c my_restart ? That's the earliest C code where you can blink an LED.

If your NEED_ENCODED_DISKBOOT= number is wrong, the camera won't boot at all. You should use the same number as other cameras with the same dryos rev.

If you want more realtime help, you can sometimes find us in the irc channel #chdk on freenode.

Unfortunately I don't have a rich experience with disassembling and I'm not a guru on ARM, but previously I was working a lot with AVR MCs - So I hope it's possible to improve my asm knowledge to appropriate level

With LED blinking I'm not sure about correct address, but it's the only available from start address that has 0x44 and 0x46 values - it's very similar to camera actions from start - it's blinking 4-5 times. I tried with the following code in loader/main.c without luck:

- Fixed all subroutines at boot.c (90% sure that last one is correct, where FAT table read added);- Fixed platform/sub/lib.c- Added all hints in all requested files from stubs_entry.S (i.e. defines into lib.c/kbd.c/etc. stubs)

Checked with LED blinks that following tasks can be created during boot: CreateTask_spytask(); // + CreateTask_PhySw(); // + CreateTask_Blinker(); // +

When I press powerOn/PlayMode - camera blinks twice with LED_PWR and just do nothing... If I press it again - camera will do the same one more time, but screen always OFF. Please, who is able, give me advice where to check, or at least, exact boot sequence from start. AFAIK, since I get response from functions of boot.c - everything should be OK, but it's not.