I suppose it would be simpler (and probably faster) to just upload each file separately. If there were a way of creating a "universal executable" and having the camera reboot into it, that would be great (not only for CHIMP), but I guess that's not really feasible.
I not sure what you mean here.
Currently, CHDK Lua does not support loading flt modules like standard Lua supports dll/so modules. This is something I'd like to add some day.
Is that because there can be at most one library loaded and Lua occupies that spot?
No, flt modules are relocated, it's just a matter of the relevant code not being implemented. The problem is that Lua C module code is designed around windows and *nix shared library APIs, and CHDK flt modules don't behave the same way. For example, any useful Lua C module needs to be able to call the Lua API, which resides in lua.flt, but the flt system doesn't provide a generic mechanism for module to module exports.
How about adding a "load module" command directly to PTP?
I don't understand what the purpose would be. In general, I'd like to keep the PTP API as simple as possible.
That's what CHDKPTPRemote uses for the Name property. It's always set to "Canon Digital Camera".
The name in chdkptp comes from PTP_OC_GetDeviceInfo and contains the actual name from the camera.
Regardless of the active partition, the partition type remains 1. Is that a bug or does "type" stand for something other than the MBR partition type?
When I want to know something like this, I find the call luascript.c, grep the source of the underlying function, and google/debug as needed. Not trying to be snarky, CHDK is big enough that I don't know everything off the top of my head, so this is what I end up doing when someone asks a question like this.
In this case, this leads to
platform/generic/wrappers.c get_part_type
partType=mbr_buf[0x1C2+(get_active_partition()-1)*16];
https://en.wikipedia.org/wiki/Master_boot_record#Sector_layoutsays the partition table is at 0x1be and the above code looks at 0x1c2 = 0x1be+4 (+ the offset for the partition number. Per
https://en.wikipedia.org/wiki/Master_boot_record#PTE this is the offset of the partition type
https://en.wikipedia.org/wiki/Partition_typeYou mean in the client/server protocol? That would be nice (and I just implemented a JSON writer), but what about backward compatibility?
No, like chdkptp does. It overrides usb_msg_table_to_string on every call.