dmitrys
I guess that would work, but I'm hoping for a (supposedly) more reliable method of deducing it from the CHDK repo.
There is not, I would say using the PID as zeno describes would be the best option. The ability to boot from FAT32 is purely a product of the Canon firmware, so isn't explicitly defined in the CHDK source. CHDK usually supports multi-partition on cameras that don't support FAT32 booting, but there could be exceptions in either direction.
I'm hoping checking drive sizes could be avoided. I believe that if someone really wants to format or corrupt their hard drive, they will find a way.
You can't make it totally foolproof, but IIRC there have been cases of this involving CHDK tools in the past, so I would suggest a cautious approach.
2. the ALT button. I found CAM_ALT_BUTTON_NAMES and CAM_ALT_BUTTON_OPTIONS in platform_camera.h, but what if CAM_ADJUSTABLE_ALT_BUTTON is undefined (as in ixus870_sd880)?
Then it's KEY_PRINT, but this may or may not be an actual "print" button. For example, on cameras without a print button, the play button might defined as print for CHDK purposes. In some cases there might be another key defined with the same bits (e.g. KEY_PRINT and KEY_PLAYBACK defined with the same bit values kbd.c) and others might not. Unfortunately this isn't defined in any coherent way, and is very hard to fix without having all the cameras.
Is the SD Card tool a module? I'm hoping to remove it whenever possible (i.e., for a bootable single partition).
Are you asking about the "SD Card" section of the CHDK menu? It's not, but in any case I would strongly urge you to install the full, unmodified CHDK package no matter what.
3. the autoboot flag. N and N Facebook use the microSD door, which is indicated by KBD_SKIP_READONLY_BIT and SD_DOOR_OVERRIDE in platform_kbd.h. Any other models/flags?
I'm not aware of any. Canon made a few other microSD cameras, but I remember any being ported.