I don't understand (yet) how the card lock is fixed in VxWorks cameras. The CHDK sources weren't verbose on that.
The only thing I noticed was the hook for "task_InitFileModules" which does nothing more than remounting the filesystem (according to the function names) and it uses original firmware functions to do that.
How does remounting the card solve the lock-problem?
Is there any particular location in the boot process that reads the lock state and remounting overwrites that flag?
Since I can't hook tasks in dryos I can't try the remount-approach easily (I would also need to locate the mount/umount-fs functions). Details about what's going on are greatly appreciated.
Edit:I just found out how it works.
For the record: In the keyboard-handler the SD-protect-Flag is cleared.
The responsible line of code is in platform/generic/kbd.c:my_kbd_read_keys()
physw_status[2] = physw_status[2] & ~SD_READONLY_FLAG;
Who would expect that the SD write protect is hidden in the keyboard-handler
Cheers.