I checked this in, trunk 5420 with some modifications. I included the notes.txt with some additional camera-specific information. Autobuild disabled pending one issue and confirmation I didn't break anything else:
in platform_kdb.h:
KEYS_MASKn should be the bitwise OR of the keys in each of the 3 words of physw_status. Assuming kbd.c is correct, KEYS_MASK0 should be 0xc, KEYS_MASK1 is correctly 0, KEYS_MASK2 should be 0xBFF (power shouldn't be masked, so you can power off without leaving alt).
Other comments and changes:
This looks very good for a first port, so please don't take the the comments below as criticism.
100b appears functionally identical to 100a: All the stubs values are the same, meaning the builds should be compatible. I've configured it to be a copy rather than a separate sub. Still disabled pending someone reporting that it works.
In kbd.c, I commented out KEY_POWER. It's identified by the sig finder, but generally not exposed as a key in CHDK.
In stubs_min.S,
* There was recreview_hold with an address from another camera. stubs_min.S / stubs_entry2.S should never be something that is known incorrect. If the correct value is not known, it should be set to something that at least provides predictable, safe value.
I changed this to FAKEDEF, which will always be zero rather than whatever random value exists at the address in this platform. However, the sig finder finds recreview_hold for this platform, so if you can verify that it's OK, we can just remove the stubs_min one completely.
* removed the *_for_dng stuf in stubs_min.S, it's only relevant for older cameras
* commented out rear_dial_position, since it's unused, and different from the jogdial MMIO in kbd.c
* commented out enabled_refresh_physical_screen, since it appears to be unused
platform / lib.c vid_get_bitmap_active_buffer directly referenced firmware address, so I moved it to sub/lib.c. The files in the top level platform directory should only reference addresses that shouldn't change between subs, like MMIOs and framebuffer addresses. Stuff referencing variables or constants in ROM can either use the addresses directly in lib.c, or you can define variables in stubs_min.S and keep the code in the common lib.c
The stuff under #if CAM_CONSOLE_LOG_ENABLED is only applicable to vxworks cameras, so I removed it.
shooting.c referenced MODE_ZOOM_BLUR. I added it to include/modelist.c
makefile.inc:
* FI2 build failed because of space before the comment. In makefiles, spaces are included in value.
* Some values were duplicated between the sub makefile.inc and the top level. I moved most of them to the top level.
The camtest result only shows ~340KB free, which is a bit marginal. It might be worth implementing exmem support.
Other things to test:
define CAM_AF_LED 5 in platform_camera.h, and run MD_Tune.bas to check fast MD is working.
All the CAM_SD_OVER_IN_ are set in platform_camera.h. Did you check that the SD override works in each mode?
What's the issue with edge overlay, can you post a screenshot?
Has multi-partition support been tested?