Looking back at my last post, I seem to have made a fool of myself on numerous occasions.
I saw those, but I'm unclear on the purpose and not yet convinced of the need. Do these things solve a significant problem, or do they just seem like a good idea in the abstract?
I believe I had misunderstood the question. Let me try again.
Since metadata are currently only generated by CHDK Utility, they are useful in the update scenario. Namely,
1. SOFTWARE.JSN is used to determine the currently installed version and the target platform and revision,
2. CAMERA.JSN is used to present the user with the camera details without having to detect those from EXIF metadata, and
3. MODEL.JSN is used to skip the model selection step (which only applies to the N/N Facebook case).
CHDK is split though: DISKBOOT.BIN must go on the boot partition, and the modules must go on the data partition. Yet the version should apply to both.
You were right, of course. I completely overlooked the case of a card with the partitions switched on pre-Redstone 2 Windows.
The metadata should be present on both partitions, and if we want to validate it, so should DISKBOOT.BIN. Otherwise, the partitions would need to be switched, DISKBOOT.BIN read, and the partitions switched back. That wouldn't be very pretty.
Here's the updated code:
private void CopySecondaryFiles(string srcPath, string destPath)
{
CopyFiles(srcPath, destPath, new[] { "DISKBOOT.BIN" });
CopyAllDirectories(srcPath, destPath);
}
My apologies and thanks for bearing with me.