Ah, I see - thanks, I managed to get it all working. The only thing I'm not clear on is the role that the write protection switch on the SD card plays. Why is it necessary to leave the flipped?
We use (or better abuse) the Canon firmware update mechanism to load the CHDK code:
When the camera is powered on, the original Canon firmware checks whether the card
1) is locked,
2) has a special bootable flag at offset 40h on the first sector and
3) has special files stored in the root directory
With an unlocked card the camera do not load the needed files (diskboot.bin), it just starts "as normal"...
This mechanism is designed by Canon, it's not a CHDK thing...
Edit: typos...