rys,
Excellent, thanks for reporting back!
reyalp, would you feel like committing another patch?
Both 101b and 102c has been verified working now.
http://nostalgia.suroot.com/chdk-a470-unofficial/patch-a470-774-mpart.txt---
I have done a lot of testing now on the a470 102c. There is one major problem, as I see it, but I think this is in the CHDK core (someone correct me if I'm wrong though).
When you create a dual partition card, there is no way to make it bootable from within CHDK (card tricks works fine though, if you have made the boot partition the "current" one). This is because CHDK calls the camera's function to modify the MBR (this not the very first sector on the card (that would be the VBR)). The problem is, when you create a dual partition card from within CHDK, the camera is still working from the partition table as it was then you loaded CHDK (with a FAT32 partition as partition 0 in the case of a SDHC card) so you can't make it bootable right away.
You take the card out, format the 2 MB partition in PC and put PS.FI2 and DISKBOOT.BIN on the card, load CHDK back up in camera. What happens now is that CHDK reboots the cam while loading, and make the camera think it started on the second partition (that is the whole point). Even if this second partition is formatted as FAT16 (I have verified this with a smaller card), you can't make the CARD bootable with "Make card bootable..." since that would make the
currently active partition bootable (from the cameras point of view). Since I can't access partition 0 if having 2 partitions ever from within CHDK, "Make bootable" will always fail in these cases. Works fine though of course when there is only 1 (FAT16) partition.
I have double and triple checked this behaviour and verified with cardtricks (the second partition is indeed marked as bootable by "Make card bootable..." (CHDK) if it's a FAT16 one, but that won't help us since the camera never sees this).
(I'm sorry if this is old news and common knowledge, I'm still getting to know CHDK, but it was news to me)
I'm working on a solution for this however. The most logical one, at least as a start, would be to to change "Create card with 2 partitions" to "Create boot partition" since that is what we are after anyway, right? This shouldn't be too difficult to implement and I have a fairly good idea how to do it.
Also "Make card bootable..." could be changed to account for these cases (or remove the item from the menu when CHDK detects a dual partition card)
Any comments? Have I got it all wrong?