CHDK Wiki
Register
(Added info box at top of page to refer people to STICK)
GAMEFKRZ (talk | contribs)
No edit summary
Tag: Visual edit
 
(98 intermediate revisions by 23 users not shown)
Line 1: Line 1:
  +
{{notice |'''PLEASE READ THIS FIRST''' : A CHDK installation utility for Windows, Linux or Apple computers is available here : [http://zenoshrdlu.com/stick/stick.html STICK]. For Windows users, there is also this utility : [https://github.com/CHDKUtil/CHIMP/releases/ CHIMP]. This wiki page documents other ways to install CHDK on your camera's SD card.}}
{{notice |
 
This wiki page describes many of the ways to install CHDK on your camera's SD memory card. However a simple java based program for Windows, Linux or Apple computers that does all that for you is available at this web site :
 
[http://zenoshrdlu.com/stick/stick.html Simple Tool for Installing CHDK]}}
 
   
 
{|align="right"
 
{|align="right"
 
|__TOC__
 
|__TOC__
 
|}
 
|}
==Overview==
+
==Overview ==
 
CHDK loads from a camera's <span style="font-style: normal; ">SD card</span> into the camera's RAM memory. It extends the functionality of the camera without changing (flashing) the camera's firmware. Two methods are available to load CHDK into camera memory: the [[Prepare_your_SD_card#Firmware_Update_Method.2A|Firmware Update Method]] and the [[Prepare_your_SD_card#Bootable_SD_Card_Method|Bootable SD Card Method]]. Read the descriptions below to understand the strengths and weaknesses of each method and the step required to configure your SD card for each method.
 
CHDK loads from a camera's <span style="font-style: normal; ">SD card</span> into the camera's RAM memory. It extends the functionality of the camera without changing (flashing) the camera's firmware. Two methods are available to load CHDK into camera memory: the [[Prepare_your_SD_card#Firmware_Update_Method.2A|Firmware Update Method]] and the [[Prepare_your_SD_card#Bootable_SD_Card_Method|Bootable SD Card Method]]. Read the descriptions below to understand the strengths and weaknesses of each method and the step required to configure your SD card for each method.
   
[[File:SD_card.jpg|thumb]]
+
[[File:SDcardunlocked.png|right|200px]]
   
 
Prior to starting to use CHDK, you will need to:
 
Prior to starting to use CHDK, you will need to:
 
*Determine what year your camera was released using the [http://chdk.wikia.com/wiki/P-ID_%28Table%29 Camera Platform ID Table] wiki page;
 
*Determine what year your camera was released using the [http://chdk.wikia.com/wiki/P-ID_%28Table%29 Camera Platform ID Table] wiki page;
 
*Determine the firmware version of your camera using [[FAQ#Q._How_can_I_get_the_original_firmware_version_number_of_my_camera.3F|firmware version information]] from the CHDK FAQ;
 
*Determine the firmware version of your camera using [[FAQ#Q._How_can_I_get_the_original_firmware_version_number_of_my_camera.3F|firmware version information]] from the CHDK FAQ;
*Download the ''complete'' release of the correct version of CHDK for your camera's firmware from [[Downloads|Firmware Download Page]];
+
*Download the ''complete'' release of the correct version of CHDK for your camera's firmware from CHDK[[Downloads| Download Page]];
 
*Decide what CHDK loading method you want to use;
 
*Decide what CHDK loading method you want to use;
 
*Configure your SD memory card using the most appropriate method listed below;
 
*Configure your SD memory card using the most appropriate method listed below;
Line 30: Line 28:
   
 
# Start with an SD card formatted by your camera. This should happen automatically when you put a new card in the camera. If the camera does not want to format your card, it is probably already formatted.
 
# Start with an SD card formatted by your camera. This should happen automatically when you put a new card in the camera. If the camera does not want to format your card, it is probably already formatted.
# Remove the card from your camera. Use your PC and SD card reader to unzip the appropriate CHDK distribution file for your camera model and firmware version into the main root directory of your SD card. Make sure that the CHDK folders are also copied to the SD card. ''Note that for this method to work, there must now be a file called either''' ps.fi2''' or '''ps.fir''' in the root directory of the card. Beta release versions of CHDK downloaded from the [http://chdk.setepontos.com/index.php?action=forum CHDK forum] might not contain this file. If so, then you cannot use the firmware update method for those cameras until the software is released in the'' [http://mighty-hoernsche.de/ CHDK Autobuild Server] Also, Mac users should read the hints in [[FAQ/Mac#You_may_have_issues_with_permissions.|FAQ Mac]] as as you may have issues with permissions when using Apple Archive utiliy.
+
# Remove the card from your camera. Use your PC and SD card reader to unzip the appropriate CHDK distribution file for your camera model and firmware version into the main root directory of your SD card. Make sure that the CHDK folders are also copied to the SD card. ''Note that for this method to work, there must now be a file called either''' ps.fi2''' or '''ps.fir''' in the root directory of the card. Beta release versions of CHDK downloaded from the [http://chdk.setepontos.com/index.php?action=forum CHDK forum] might not contain this file. If so, then you cannot use the firmware update method for those cameras until the software is released in the'' [http://mighty-hoernsche.de/ CHDK Autobuild Server] Also, Mac users should read the hints in [[FAQ/Mac#You_may_have_issues_with_permissions.|FAQ Mac]] as as you may have issues with permissions when using Apple Archive utility.
 
# Put the SD card back into in your camera.
 
# Put the SD card back into in your camera.
# Start your camera directly into Play Mode by pressing the Play button or Play switch. Do not start the camera with the On/Off button - the firmware update method will not work if you do.
+
# Start your camera directly into Play Mode by pressing the Play button or, if you camera does not have a play button, with the Play/Rec switch or Mode dial in the Play position. '''Do not start the camera in Rec (shooting) mode - the firmware update method will not be available if you do.'''
# Press the Canon Menu key and s<span style="font-style: normal; ">croll around until you find a menu item that says "Firm Update...".</span> There are usually three or four tabs in the Menu (varies by camera). You can probably stay on the first tab (typically Playback Settings) <span style="font-style: normal; ">but some experimentation might be necessary</span>.
+
# Press the Canon Menu key and scroll around until you find a menu item that says "Firm Update...". There are usually three or four tabs in the Menu (varies by camera). You can probably stay on the first tab (typically Playback Settings) but some experimentation might be necessary.
# Select "Firm Update..." and press FUNC.SET button.[[Image:SplashScreen.jpg|thumb|160px|right|CHDK splash screen]]
+
# Select "Firm Update..." and press FUNC.SET button.[[File:SplashScreen.jpg|right|200px]]
 
# It should say "'''Update firmware version?'''" Press OK. If everything went correctly, the CHDK splash screen will appear briefly on the Camera's screen.
 
# It should say "'''Update firmware version?'''" Press OK. If everything went correctly, the CHDK splash screen will appear briefly on the Camera's screen.
# Go back to the camera mode and you should see some new OSD (on screen display) elements.
+
# Go back to the camera mode and you should see some new OSD (on screen display) elements. (to go to the camera mode half press the shutter button)
 
# Activate the CHDK menus with the [[CHDK_User_Manual#Key_Shortcuts|&lt;ALT&gt; key]] or key sequence defined for your camera.
 
# Activate the CHDK menus with the [[CHDK_User_Manual#Key_Shortcuts|&lt;ALT&gt; key]] or key sequence defined for your camera.
   
 
==Bootable SD Card Method==
 
==Bootable SD Card Method==
  +
 
===Overview===
 
===Overview===
[[File:SD_card_lock.jpg|thumb]]
+
[[File:SDcardlocked.png|right|200px]]
 
CHDK can be configured so that it automatically loads each time your camera starts. This is done via the "Bootable SD Card" method of loading and requires that the SD card be setup specially for this purpose. To use this method, format and load the card using the instructions below, and then set the card's lock switch (the little slider mechanism on the side of the SD card) to the "LOCK" position. Insert the card into your camera and turn it on normally - you should briefly see the CHDK logo, indicating that CHDK has successfully loaded.
 
CHDK can be configured so that it automatically loads each time your camera starts. This is done via the "Bootable SD Card" method of loading and requires that the SD card be setup specially for this purpose. To use this method, format and load the card using the instructions below, and then set the card's lock switch (the little slider mechanism on the side of the SD card) to the "LOCK" position. Insert the card into your camera and turn it on normally - you should briefly see the CHDK logo, indicating that CHDK has successfully loaded.
   
 
Note that your SD card needs to be "bootable" to use the SD Card Lock method. This means that for cameras released prior to January 2011 there needs to be a FAT16 partition with a slightly modified boot block. Cameras released after January 2011 can boot from either a FAT16 or a FAT32 partition, although <span style="font-style: normal; ">each format</span> requires a different modifications to the boot block.
 
Note that your SD card needs to be "bootable" to use the SD Card Lock method. This means that for cameras released prior to January 2011 there needs to be a FAT16 partition with a slightly modified boot block. Cameras released after January 2011 can boot from either a FAT16 or a FAT32 partition, although <span style="font-style: normal; ">each format</span> requires a different modifications to the boot block.
   
Setup of the SD card is somewhat complicated as different cameras have different requirements and limitations. Listed below are various methods of configuring and SD card for the "SD Card Lock" method.
+
Setup of the SD card is somewhat complicated as different cameras have different requirements and limitations. Listed below are various methods of configuring an SD card for the "SD Card Lock" method.
   
'''Note ''': ''setting up an SD card to be bootable is not the same thing as setting the "boot" flag in the card's MBR. That flag is ignored by Canon cameras.''
+
'''Note''': ''setting up an SD card to be bootable is not the same thing as setting the "boot" flag in the card's MBR. That flag is ignored by Canon cameras.''
   
 
===Bootable <span style="font-style: normal; ">SD Card Method Preparation</span>===
 
===Bootable <span style="font-style: normal; ">SD Card Method Preparation</span>===
   
 
[[File:SD_Card_Matrix.png|right|400px|Bootable SD Card Format Options]]There are several possible configurations that can be used to enable the Bootable SD Card method of loading CHDK. The best method to use depends on when your camera was released, the size of your SD card and your tolerance for needing to take extra steps with some configurations. Details of what to do in each situation are given below.
 
====''For Cameras Released After 2010:''====
   
 
For recent cameras, a single FAT32 partition configured to be bootable is the preferred SD card configuration for automatically loading CHDK.
[[File:SD_Card_Matrix.png|thumb|400px|Bootable SD Card Format Options]]There are several possible configurations that can be used to enable the Bootable SD Card method of loading CHDK. The best method to use depends on when your camera was released, the size of your SD card and your tolerance for needing to take extra steps with some configurations. Details of what to do in each situation are given below.
 
   
 
{{Notice|Some recent cameras format SD cards as exFAT. This format cannot be used for autobooting - you must reformat these cards as FAT32 on your PC. Note also that most newer cameras do not support dual partition CHDK booting.}}
   
 
You can also use a single FAT16 partition if your card is 4G or smaller (or if you are willing to just use 4G of a larger card). You might choose to use a FAT16 partition because you wish to use one of the automated configuration tool (see below) and that tool does not support FAT32 booting.
====For Cameras Released After 2010 :====
 
   
 
There are quite a few method of setting up an SD Card for cameras released after 2010. Listed below are three easy ones - alternative methods can be found at the bottom of this wiki page. '''Note:''' use "Method 3" if you are using a CHDK version that has no ps.fi2 file available in the distribution zip file (eg: a camera still under development or a camera where it's just not available).
With recent cameras a single FAT32 partition configured to be bootable is the preferred SD card configuration for automatically loading CHDK.
 
   
 
'''Method 1 - Using the STICK utility'''
{{Notice|Some recent cameras format SD cards as exFAT. This format cannot be used for autobooting - you must reformat these cards as FAT32 on your PC. Note also that newer cameras do not support dual partition CHDK booting.}}
 
  +
# Download [http://www.zenoshrdlu.com/stick/stick.html STICK] and use it to automatically download the right version of CHDK for your camera, format your SD card suitably for CHDK, and install CHDK correctly.
  +
# If you are attempting to use a version of CHDK not yet in the autobuild, instructions on how to do so can be found [http://www.zenoshrdlu.com/stick/stickx.html here]
   
You can also use a single FAT16 partition if your card is 4G or smaller (or if you are willing to just use 4G of a larger card). You might choose to use a FAT16 partition because you wish to use one of the automated configuration tool (see below) and that tool does not support FAT32 booting.
 
   
 
'''Method 2 - Using CHDK itself to make the SD card bootable.'''
There are quite a few method of setting up an SD Card for cameras released after 2010. Listed below are two easy ones - alternative methods can be found at the bottom of this wiki page. '''Note :''' use the second method if you are using a CHDK version that has no ps.fi2 file available in the distribution zup file ( eg : a camera still under development or a camera like the S100 where its just not available).
 
 
# <span style="font-style: normal; ">Start out with your SD Card Lock switch in the </span><u>unlocked</u><span style="font-style: normal; "> position (t</span><span style="border-style: initial; border-color: initial; font-style: normal; ">he small slide switch on the side of the card - see picture above - make sure it is in the </span><u>unlocked</u><span style="border-style: initial; border-color: initial; font-style: normal; "> position to start this process.)</span>
 
  +
# Low level format the card in camera using the camera's built-in card format menu selection. Warning: any images on the card will be erased at this point. 
'''Method 1 - Using a CHDK itself to make the SD card bootable.'''
 
  +
# Remove the card from your camera and put it into the SD card reader of your PC.
# <span style="font-style: normal; ">Start out with the SD Card Lock switch in the </span><u>unlocked</u><span style="font-style: normal; "> position (t</span><span style="border-style: initial; border-color: initial; font-style: normal; ">here will be a small slide switch on the side of the card - see picture above - make sure it is in the </span><u>unlocked</u><span style="border-style: initial; border-color: initial; font-style: normal; "> position to start this process.)</span>
 
# Low level format the card in camera. The card will now contain a single FAT32 partition. (Warning : any images on the card will be erased at this point. Also, make sure your camera did not format the card as exFAT - see warning note at start of this section - you may need to use something like [http://www.ridgecrop.demon.co.uk/index.htm?guiformat.htm FAT32 Format] to format the card in your PC is so. ).
+
# The card should now contain a single FAT32 partition. If you are using a large SD card,  please make sure your camera did not format the card as exFAT - see warning note at start of this section.  You may need to use something like [https://web.archive.org/web/20091030010016/http://www.ridgecrop.demon.co.uk/index.htm?guiformat.htm FAT32 Format] to reformat the card in your PC if so. 
# Remove the card from your camera and put it into the SD card reader of your PC. Unpack the appropriate build of CHDK for your camera and firmware version directly to the card (including all subdirectories).
+
# Now please check again (by looking at the properties of your card in an SD card reader in your PC) to ensure that your card is formatted either FAT16 or FAT 32''' - and not exFAT!'''
  +
# Unpack the appropriate build of CHDK for your camera and firmware version directly to the card (including all subdirectories).
 
# With the Card Lock switch still in the <u>unlocked</u> position p<span style="font-style: normal; ">ut the card back into your camera.</span>
 
# With the Card Lock switch still in the <u>unlocked</u> position p<span style="font-style: normal; ">ut the card back into your camera.</span>
  +
# Start your camera in Playback (image review) mode, not shooting mode. For most cameras, this is done by powering on the camera using the Play button. For cameras where Playback mode is selected using a switch or mode dial position, select play before pressing the power button. If camera starts in Rec (shooting) mode, the firmware update option will generally not be available, even if you subsequently switch to playback.
# Turn on your camera by pressing the Play button (or using the Play switch on some cameras). Do not start the camera with the On/Off switch or this process will not work.
 
 
# Start CHDK manually by selecting the Firmware Update option in the Canon menus.
 
# Start CHDK manually by selecting the Firmware Update option in the Canon menus.
 
# After the CHDK logo briefly displays, start CHDK by using the [[CHDK_User_Manual#Key_Shortcuts|&lt;ALT&gt; key]] sequence for your camera.
 
# After the CHDK logo briefly displays, start CHDK by using the [[CHDK_User_Manual#Key_Shortcuts|&lt;ALT&gt; key]] sequence for your camera.
#Enter the CHDK menu, and select '''Miscellaneous stuff''' -> '''Make Card Bootable '''
+
#Enter the CHDK menu, and select '''Miscellaneous stuff '''-''''''<nowiki/>'''&#x3E;''' SD Card'''''' -> '''Make Card Bootable '''
#<span style="font-style: normal; ">Turn your camera off, <u> </u>write protect the SD card by moving the little switch on the side of the card to the <u>locked</u> position, insert the card back into your camera</span>
+
#<span style="font-style: normal; ">Turn your camera off, <u> </u>write protect the SD card by moving the little switch on the side of the card to the <u>locked</u> position, insert the card back into your camera.  Note that CHDK will cause the camera to ignore the lock switch so that you can take pictures normally.</span>
   
  +
'''Method 3 - Using EOSCard to make the SD card bootable.'''
 
<span style="font-style: normal; ">​</span>'''Method 2 - Using EOSCard to make the SD card bootable.'''
 
 
# <span style="font-style: normal; ">Start out with the SD Card Lock switch in the </span><u>unlocked</u><span style="font-style: normal; "> position (t</span><span style="border-style: initial; border-color: initial; font-style: normal; ">here will be a small slide switch on the side of the card - see picture above - make sure it is in the </span><u>unlocked</u><span style="border-style: initial; border-color: initial; font-style: normal; "> position to start this process.)</span>
 
# <span style="font-style: normal; ">Start out with the SD Card Lock switch in the </span><u>unlocked</u><span style="font-style: normal; "> position (t</span><span style="border-style: initial; border-color: initial; font-style: normal; ">here will be a small slide switch on the side of the card - see picture above - make sure it is in the </span><u>unlocked</u><span style="border-style: initial; border-color: initial; font-style: normal; "> position to start this process.)</span>
# Low level format the card in camera. The card will now contain a single FAT32 partition. (Warning : any images on the card will be erased at this point. Also, make sure your camera did not format the card as exFAT - see warning note at start of this section - you may need to use something like [http://www.ridgecrop.demon.co.uk/index.htm?guiformat.htm FAT32 Format] to format the card in your PC is so. ).
+
# Low level format the card in camera. The card will now contain a single FAT32 partition. (Warning: any images on the card will be erased at this point. Also, make sure your camera did not format the card as exFAT - see warning note at start of this section - you may need to use something like [https://web.archive.org/web/20091030010016/http://www.ridgecrop.demon.co.uk/index.htm?guiformat.htm FAT32 Format] to format the card in your PC is so.).
 
# Remove the card from your camera and put it into the SD card reader of your PC. Unpack the appropriate build of CHDK for your camera and firmware version directly to the card (including all subdirectories).
 
# Remove the card from your camera and put it into the SD card reader of your PC. Unpack the appropriate build of CHDK for your camera and firmware version directly to the card (including all subdirectories).
 
# Use EOScard to configure your SD card to be bootable in the camera. Read the instructions on this wiki page [[EOScard|EOScard1.2]] and download the software from there.
 
# Use EOScard to configure your SD card to be bootable in the camera. Read the instructions on this wiki page [[EOScard|EOScard1.2]] and download the software from there.
Line 86: Line 89:
 
Now each time that you turn your camera on, the CHDK logo should briefly display automatically, indicating that CHDK has successfully loaded.
 
Now each time that you turn your camera on, the CHDK logo should briefly display automatically, indicating that CHDK has successfully loaded.
   
  +
'''Method 4 - Using Chimp to create a dual partition exFat bootable SD card.'''
<span style="font-style: normal; ">'''''Utilities for cameras released after 2010 :'''''</span>
 
  +
  +
this method is only suitable for large sd cards (SDXC) on >2011 cams that use the card lock boot method. although it will give minor speed gains on cards sized 64GB, consider if you want the trouble a dual partition card can give. if your card is 256GB or bigger you might encounter missing CHDK modules at boot with a FAT32 formatted card. in that case this is your only solution to make it work.
  +
  +
needed: 64Gb or larger sdxc card, pc with Chimp, >2011 chdk capable cam, chdk build that supports dual partition
  +
  +
# if you have a single partition card, unpack the build to your sd card.
  +
# place the card in your cam. card locked or with firmware update.
  +
# go to chdk menu>miscellaneous stuff>Sd card> create dual partition
  +
# place the card back in your pc, quick format the second partition to exFAT
  +
# place the correct build without the CHDK folder on the first, small FAT partition
  +
# place the correct build with the CHDK folder on the second exFAT partition
  +
# use Chimp to make the card bootable
  +
# lock the card and place it in your camera
  +
  +
if you want to make the card single partition again:
  +
  +
# use Chimp to remove the bootflag. '''if you don't the dual partition bootflag will be there even after formats and you'll be unable to remove it with Chimp unless you reformat to dual partition.'''
  +
# delete the files on the FAT partition
  +
# place the card in your cam and do a quick format
  +
# quick format the card on your pc in your favorite file format
   
 
<span style="font-style: normal; ">'''''Utilities for cameras released after 2010:'''''</span>
:'''MS Windows :'''
 
   
 
:'''MS Windows:'''
* [http://www.zenoshrdlu.com/wicks/wicks.html Wicks] : partitions and installs CHDK for any supported camera and SD card size
 
  +
* [https://chdk.setepontos.com/index.php?topic=13091.0 CHIMP]: downloads, partitions and installs CHDK for any supported camera and SD card size
  +
* [http://www.zenoshrdlu.com/stick/stick.html STICK]: downloads, partitions and installs CHDK for any supported camera and SD card size
 
* [http://www.zenoshrdlu.com/wicks/wicks.html WICKS]: partitions and installs CHDK for any supported camera and SD card size
 
*[[EOScard|EOScard1.2]] utility will write a boot string to the correct place on a FAT32 card using Windows computers. Format your SD card as FAT32, use this utility and then unzip the correct CHDK distribution file to the SD card.
 
*[[EOScard|EOScard1.2]] utility will write a boot string to the correct place on a FAT32 card using Windows computers. Format your SD card as FAT32, use this utility and then unzip the correct CHDK distribution file to the SD card.
* [http://www.ridgecrop.demon.co.uk/index.htm?guiformat.htm FAT32 Format] allows you to format SD cards in FAT32 format - useful if you have a newer camera that only supports exFAT format (exFAT does not support CHDK booting).
+
* [https://web.archive.org/web/20051207205507/http://www.ridgecrop.demon.co.uk/fat32format.htm FAT32 Format] allows you to format SD cards in FAT32 format, including cards > 32G Useful if you have a newer camera that only supports exFAT format (exFAT does not support CHDK booting).
  +
* [https://web.archive.org/web/20090705120203/http://www.ridgecrop.demon.co.uk/guiformat.htm GUI version of FAT32 Format] (see above)
* '''Apple Mac :'''
+
* '''Apple Mac:'''
 
*[http://www.zenoshrdlu.com/clickpansdm/sdminst.html SDMInst app] for the Apple Mac can be used to make a FAT32 card bootable. Instructions for the Mac are here [http://chdk.wikia.com/wiki/FAQ/Mac FAQ/Mac]. Please pay particular attention to this section [[FAQ/Mac#Still_Having_Trouble.3F|Problems loading CHKD on SD cards with a Mac computer.]]
 
*[http://www.zenoshrdlu.com/clickpansdm/sdminst.html SDMInst app] for the Apple Mac can be used to make a FAT32 card bootable. Instructions for the Mac are here [http://chdk.wikia.com/wiki/FAQ/Mac FAQ/Mac]. Please pay particular attention to this section [[FAQ/Mac#Still_Having_Trouble.3F|Problems loading CHKD on SD cards with a Mac computer.]]
:'''Linux :'''
+
:'''Linux '''
 
* [http://www.zenoshrdlu.com/licks/licks.html LICKS] the ''Linux Installer for CHDK and SDM'' can be used to create FAT32 bootable cards under Linux.
 
* [http://www.zenoshrdlu.com/licks/licks.html LICKS] the ''Linux Installer for CHDK and SDM'' can be used to create FAT32 bootable cards under Linux.
   
: .
 
 
:
 
 
.
 
.
   
====For Cameras Released Before 2011 :====
+
====''For Cameras Released Before 2011:''====
 
<span style="font-style: normal; ">With older cameras, the best booting method options depends on the size of the SD card. For cards 4G in size or smaller, the card needs to be formatted as FAT16 and configured to be bootable. For cards 8G or larger, you will need to create two partitions - a small 500K FAT16 partition configured to be bootable and a larger partition formatted as FAT32 to take up the rest of the space on the SD card.</span>
 
<span style="font-style: normal; ">With older cameras, the best booting method options depends on the size of the SD card. For cards 4G in size or smaller, the card needs to be formatted as FAT16 and configured to be bootable. For cards 8G or larger, you will need to create two partitions - a small 500K FAT16 partition configured to be bootable and a larger partition formatted as FAT32 to take up the rest of the space on the SD card.</span>
   
Line 109: Line 133:
 
Configuring any SD card to load CHDK via the card lock booting method requires these three steps :
 
Configuring any SD card to load CHDK via the card lock booting method requires these three steps :
 
#Setup the SD card by creating either a single partition (FAT16) or two partitions (a small FAT16 and a larger FAT32).
 
#Setup the SD card by creating either a single partition (FAT16) or two partitions (a small FAT16 and a larger FAT32).
#Modify the boot block of the first partition on the card by inserting the text string "BOOTDISK" at offset 0x40.
+
#Modify the boot block of the first partition on the card by writing the text string "BOOTDISK" at offset 0x40.
 
#Copy the "Complete" CHDK executable distribution to the correct places on the SD card. For single partition cards, all the files and folders from the CHDK distribution file belong on that partition. For dual partition cards, all the files and folders from the CHDK distribution file belong on the large second partition except for the files DISKBOOT.BIN and either PS.FIR or PS.FI2, which belong on the smaller FAT16 bootable partition.
 
#Copy the "Complete" CHDK executable distribution to the correct places on the SD card. For single partition cards, all the files and folders from the CHDK distribution file belong on that partition. For dual partition cards, all the files and folders from the CHDK distribution file belong on the large second partition except for the files DISKBOOT.BIN and either PS.FIR or PS.FI2, which belong on the smaller FAT16 bootable partition.
  +
  +
There are quite a few method of setting up an SD Card for cameras released before 2011. Listed below are four easy ones - alternative methods can be found at the bottom of this wiki page. '''Note:''' use the fourth method if you are using a CHDK version that has no ps.fi2 file available in the distribution zip file (eg: a camera still under development or a camera like the S100 where its just not available).
  +
  +
'''Method 1 - Using the STICK utility'''
  +
# Download [http://www.zenoshrdlu.com/stick/stick.html STICK] and use it to automatically download the right version of CHDK for your camera, format your SD card suitably for CHDK, and install CHDK correctly.
  +
# If you are attempting to use a version of CHDK not yet in the autobuild, instructions on how to do so can be found [http://www.zenoshrdlu.com/stick/stickx.html here]
  +
  +
'''Method 2 - Using CHDK itself to make the SD card bootable (cards 4G or smaller)'''
  +
# <span style="font-style: normal; ">Start out with your SD Card Lock switch in the </span><u>unlocked</u><span style="font-style: normal; "> position (t</span><span style="border-style: initial; border-color: initial; font-style: normal; ">he small slide switch on the side of the card - see picture above - make sure it is in the </span><u>unlocked</u><span style="border-style: initial; border-color: initial; font-style: normal; "> position to start this process.)</span>
  +
# Low level format the card in camera using the camera's built-in card format menu selection. Warning : any images on the card will be erased at this point. ('''Note:''' the card must be 4G or less and must be formatted as FAT16. You will need to verify the format in your PC as some cameras will default to a FAT32 format and pre-2011 cameras will not boot from FAT32).
  +
# Remove the card from your camera and put it into the SD card reader of your PC.
  +
# Now please check again (by looking at the properties of your card in an SD card reader in your PC) to ensure that your card is formatted FAT16 '''- not FAT32 or exFAT!'''
  +
# Unpack the appropriate build of CHDK for your camera and firmware version directly to the card (including all subdirectories).
  +
# With the Card Lock switch still in the <u>unlocked</u> position p<span style="font-style: normal; ">ut the card back into your camera.</span>
  +
# Start your camera in Playback (image review) mode, not shooting mode. For most cameras, this is done by powering on the camera using the Play button. For cameras where Playback mode is selected using a switch or mode dial position, select play before pressing the power button. If camera starts in Rec (shooting) mode, the firmware update option will generally not be available, even if you subsequently switch to playback.
  +
# Start CHDK manually by selecting the Firmware Update option in the Canon menus.
  +
# After the CHDK logo briefly displays, start CHDK by using the [[CHDK_User_Manual#Key_Shortcuts|&lt;ALT&gt; key]] sequence for your camera.
  +
#Enter the CHDK menu, and select '''Miscellaneous stuff''' -> '''Make Card Bootable '''
  +
#<span style="font-style: normal; ">Turn your camera off, <u> </u>write protect the SD card by moving the little switch on the side of the card to the <u>locked</u> position, insert the card back into your camera.  Note that CHDK will cause the camera to ignore the lock switch so that you can take pictures normally.</span>
  +
  +
'''Method 3 - Using CHDK itself to make the SD card bootable with two partitions (cards larger than 4G)'''
  +
# Low level format card in camera. The card now contains either at FAT16 or  FAT32 partition.
  +
# Unpack the CHDK build zip file directly to the card using your PC (make sure the folder structure in the zip file is preserved)
  +
# Start CHDK manually using the Firmware Update method.
  +
#Enter the CHDK menu, and select '''Miscellaneous stuff -&gt; SD Card -&gt; Create card with two partitions'''. CHDK now creates the boot partition as before, but also formats it using FAT16 and marks the partition bootable.
  +
#Put the card back in PC. If necessary, format the newly created 2MB partition to FAT16.
  +
#Re-unpack CHDK to this partition.
  +
#Write protect the card (there is usually a switch on the side of the card; move it to the locked position).
  +
#The camera should now boot CHDK from the card (make sure the folder structure in the zip file is preserved)
  +
#Enter the CHDK menus, and select '''Miscellaneous stuff -> SD Card -> Swap partitions'''
  +
#Shutdown the camera, remove and unlock the card, and put it back in the PC. Now format the large partition, and unpack CHDK onto it (make sure the folder structure in the zip file is preserved)
  +
#Lock the card and put it back in the camera.
  +
#Start CHDK manually with the Firmware Update method one more time, and select '''Miscellaneous stuff -&gt; SD Card -> Swap partitions'''.
  +
  +
'''Caveats:''' Windows does not seem to be able to access both partitions at once. You can use the [http://www.zenoshrdlu.com/wasp/wasp.html WASP ]utility to manage that. Otherwise you will have to run '''Swap partitions''' before you take the card out of the camera so Windows can access your photos, then repeat the last step after you put the card back in to make it boot CHDK automatically. To me, this is much better than having to start CHDK&nbsp;manually every time you turn on the camera!
  +
  +
'''Method 4 - Using EOSCard to make the SD card bootable (cards 4G or smaller)'''
  +
# <span style="font-style: normal; ">Start out with the SD Card Lock switch in the </span><u>unlocked</u><span style="font-style: normal; "> position (t</span><span style="border-style: initial; border-color: initial; font-style: normal; ">here will be a small slide switch on the side of the card - see picture above - make sure it is in the </span><u>unlocked</u><span style="border-style: initial; border-color: initial; font-style: normal; "> position to start this process.)</span>
  +
# Low level format the card in camera.  Warning : any images on the card will be erased at this point. ('''Note:''' the card must be 4G or less and must be formatted as FAT16. You will need to verify the format in your PC as some cameras will default to a FAT32 format and pre-2011 cameras will not boot from FAT16).
  +
# Remove the card from your camera and put it into the SD card reader of your PC. Unpack the appropriate build of CHDK for your camera and firmware version directly to the card (including all subdirectories).
  +
# Use EOScard to configure your SD card to be bootable in the camera. Read the instructions on this wiki page [[EOScard|EOScard1.2]] and download the software from there.
  +
#<span style="font-style: normal; ">Write protect your SD card by moving the little switch on the side of the card to the <u>locked</u> position, insert the card back into your camera.</span>
  +
Now each time that you turn your camera on, the CHDK logo should briefly display automatically, indicating that CHDK has successfully loaded.
   
 
To simplify the steps listed above for the preparation of a CHDK SD card, several utilities are available. These utilities can partition and format bootable SD cards and download & install CHDK to those cards.
 
To simplify the steps listed above for the preparation of a CHDK SD card, several utilities are available. These utilities can partition and format bootable SD cards and download & install CHDK to those cards.
   
  +
'''''Utilities for cameras released before 2011:'''''
:'''MS Windows :'''
 
  +
* [http://www.zenoshrdlu.com/wicks/wicks.html Wicks] : partitions and installs CHDK for any supported camera and SD card size
 
 
:'''MS Windows:'''
* the standalone program'' sdminste.exe ''can be extracted from inside this package : [http://stereo.jpn.org/eng/sdm/file/common_files.zip Common Files] . Instructions are available at [[Using_SDMinste_to_Create_Dual_Partition_SD_cards|Using SDMinste to Create Dual Partition SD cards]] . It can format 4G or smaller cards as bootable FAT16 and it can format cards 8G or larger for dual partition booting.
 
  +
* [https://chdk.setepontos.com/index.php?topic=13091.0 CHIMP]: downloads, partitions and installs CHDK for any supported camera and SD card size + allows easy swapping of primary & secondary partitions of dual partition cards
  +
* [http://www.zenoshrdlu.com/stick/stick.html STICK]: downloads, partitions and installs CHDK for any supported camera and SD card size
 
* [http://www.zenoshrdlu.com/wicks/wicks.html WICKS]: partitions and installs CHDK for any supported camera and SD card size
  +
* [http://www.zenoshrdlu.com/wasp/wasp.html WASP]: allows easy swapping of primary & secondary partitions of dual partition cards
 
* the standalone program'' sdminste.exe ''can be extracted from inside this package: [http://stereo.jpn.org/eng/sdm/file/common_files.zip Common Files]. Instructions are available at [[Using_SDMinste_to_Create_Dual_Partition_SD_cards|Using SDMinste to Create Dual Partition SD cards]]. It can format 4G or smaller cards as bootable FAT16 and it can format cards 8G or larger for dual partition booting.
  +
* instruction are also available for using [[Partition_Wizard_and_MBRFix|Partition Wizard and MBRFix]]
 
* there is also the older '''[[Cardtricks]]''' program for use with SD cards of 4G bytes or less, as described in [[CHDK_for_Dummies#Let.27s_put_the_CHDK_in_the_card|CHDK for Dummies]].
 
* there is also the older '''[[Cardtricks]]''' program for use with SD cards of 4G bytes or less, as described in [[CHDK_for_Dummies#Let.27s_put_the_CHDK_in_the_card|CHDK for Dummies]].
 
* [[EOScard|EOScard1.2]] utility will write a boot string to the correct place on a single partition FAT16 card. Format your SD card as FAT16, use this utility and then unzip the correct CHDK distribution file to the SD card.
 
* [[EOScard|EOScard1.2]] utility will write a boot string to the correct place on a single partition FAT16 card. Format your SD card as FAT16, use this utility and then unzip the correct CHDK distribution file to the SD card.
   
:'''Linux :'''
+
:'''Linux:'''
 
* to make a card bootable use the [http://www.zenoshrdlu.com/licks/licks.html Linux Installer for CHDK and SDM].
 
* to make a card bootable use the [http://www.zenoshrdlu.com/licks/licks.html Linux Installer for CHDK and SDM].
   
:'''Apple Mac :'''
+
:'''Apple Mac:'''
 
* to make a card bootable use the [http://www.zenoshrdlu.com/clickpansdm/sdminst.html SDMInst app] as described in [http://chdk.wikia.com/wiki/FAQ/Mac FAQ/Mac].
 
* to make a card bootable use the [http://www.zenoshrdlu.com/clickpansdm/sdminst.html SDMInst app] as described in [http://chdk.wikia.com/wiki/FAQ/Mac FAQ/Mac].
 
* pay particular attention to [[FAQ/Mac#Still_Having_Trouble.3F|Problems loading CHKD on SD cards with a Mac computer.]]
 
* pay particular attention to [[FAQ/Mac#Still_Having_Trouble.3F|Problems loading CHKD on SD cards with a Mac computer.]]
 
 
 
If you do not wish to use the utilities listed above, there are manual methods available for card configuration. Several of these are listed below. For cards 4G or smaller, you can also follow the instructions give above for cameras released after 2010 provided you first format your SD card as FAT16 using the card reader in your PC computer.
 
   
 
==A Deep Dive into the Boot Process==
 
==A Deep Dive into the Boot Process==
Line 135: Line 204:
 
During the boot process, a Canon P&S camera powers up and checks to see if the SD card lock switch is in the "Locked" position. If the card is locked, the camera next checks the [http://en.wikipedia.org/wiki/File_Allocation_Table#Boot_Sector volume boot sector] of the first partition on the SD card for the signature string "BOOTDISK". This signature is stored starting at offset 0x40 (decimal 64) on a FAT16 volume and at offset 0x1E0 on a FAT32 volume. If the signature is found, the camera checks the root directory of the SD card for a file named "DISKBOOT.BIN". If found, this file is loaded into memory and control is passed to that code. Naturally, this file contains the CHDK program
 
During the boot process, a Canon P&S camera powers up and checks to see if the SD card lock switch is in the "Locked" position. If the card is locked, the camera next checks the [http://en.wikipedia.org/wiki/File_Allocation_Table#Boot_Sector volume boot sector] of the first partition on the SD card for the signature string "BOOTDISK". This signature is stored starting at offset 0x40 (decimal 64) on a FAT16 volume and at offset 0x1E0 on a FAT32 volume. If the signature is found, the camera checks the root directory of the SD card for a file named "DISKBOOT.BIN". If found, this file is loaded into memory and control is passed to that code. Naturally, this file contains the CHDK program
   
Note : when loaded, CHDK causes the camera to ignore the lock the SD card, so that images may be stored.
+
Note : when loaded, CHDK causes the camera to ignore the SD card lock, so that images may be stored.
   
 
For cameras released prior to 2011, booting only works on FAT16 volumes. The maximum size for FAT16 is 4GB so using an SD card larger than 4GB is more complicated. By dividing such cards into two partitions (volumes), one can have a small FAT16 partition (500K) from which to boot, and a much larger FAT32 volume using the rest of the SD card for storing images. When using this method, the FAT16 partition must be the first one in the partition table. When it loads, CHDK will logically swap the partitions after loading, so the camera only sees the larger one. Because of this, only the DISKBOOT.BIN file needs to be located in the smaller partition - all the other CHDK files need to be located on the larger partition. Failing to do this will mean the CHDK logo will not display at boot, menu icons will not appear and things like fonts and test scripts will not be available.
 
For cameras released prior to 2011, booting only works on FAT16 volumes. The maximum size for FAT16 is 4GB so using an SD card larger than 4GB is more complicated. By dividing such cards into two partitions (volumes), one can have a small FAT16 partition (500K) from which to boot, and a much larger FAT32 volume using the rest of the SD card for storing images. When using this method, the FAT16 partition must be the first one in the partition table. When it loads, CHDK will logically swap the partitions after loading, so the camera only sees the larger one. Because of this, only the DISKBOOT.BIN file needs to be located in the smaller partition - all the other CHDK files need to be located on the larger partition. Failing to do this will mean the CHDK logo will not display at boot, menu icons will not appear and things like fonts and test scripts will not be available.
Line 146: Line 215:
   
 
==Other methods for preparation a Bootable SD card==
 
==Other methods for preparation a Bootable SD card==
===Windows===
+
===''Windows''===
 
'''Windows Method #1: HxD GUI (for cameras released after 2010)'''
 
'''Windows Method #1: HxD GUI (for cameras released after 2010)'''
   
#First format your card FAT32
+
#First format your card FAT32.
 
#On a PC, use HxD http://mh-nexus.de/en/hxd/ to EDIT the boot sector of the SD card.
 
#On a PC, use HxD http://mh-nexus.de/en/hxd/ to EDIT the boot sector of the SD card.
#In ''Extra- > Open Disk ''Deselect'' Read Only'' : '''BE CAREFULL''' Select the Unit x: or what ever of your SD card - not your Harddisk!!!
+
#In ''Extra- > Open Disk ''Deselect'' Read Only'': '''BE CAREFUL!''' Select the Unit x: or what ever of your SD card - not your hard disk!!!
 
#Go to the right part at the level of 00001E0 and change the letters "any key " to "BOOTDISK"
 
#Go to the right part at the level of 00001E0 and change the letters "any key " to "BOOTDISK"
#SAVE
+
#SAVE.
#Then you only have to extract all the contents of CHDK distribution zip file into the root of the drive (taking care to have the zip utility restore the orginal directory structure)
+
#Then all the contents of CHDK distribution zip file have to be extracted into the root of the drive (taking care to have the zip utility restore the original directory structure).
#Write protect your SD, and you camera should autoload from it.
+
#Write-protect your SD, and the camera should autoload from it.
 
Thanks to asm1989 for this method from the [http://chdk.setepontos.com/index.php?topic=7889.msg85032#msg85032 CHDK Forum]
 
Thanks to asm1989 for this method from the [http://chdk.setepontos.com/index.php?topic=7889.msg85032#msg85032 CHDK Forum]
 
   
 
'''Windows Method #2: mkbt.exe CLI (for cameras released after 2010)'''
 
'''Windows Method #2: mkbt.exe CLI (for cameras released after 2010)'''
Line 163: Line 231:
 
If you're looking for a Command Line Interface to make your SD card bootable as part of a batch file script, [http://www.nu2.nu/mkbt/ Bart's MKBT] does the trick nicely:
 
If you're looking for a Command Line Interface to make your SD card bootable as part of a batch file script, [http://www.nu2.nu/mkbt/ Bart's MKBT] does the trick nicely:
 
#Format card by any method on this page (recommend using your camera)
 
#Format card by any method on this page (recommend using your camera)
#Make card bootable by any method on this page (recommend using CHDK)
+
#Make card bootable by any method on this page (recommend using [http://zenoshrdlu.com/stick/stick.html STICK])
 
#Copy boot sector from card:
 
#Copy boot sector from card:
 
<span style="line-height:20px;">mkbt.exe -c -x f: bootsect.bin</span>
 
<span style="line-height:20px;">mkbt.exe -c -x f: bootsect.bin</span>
This will create a 512 byte file containing the raw boot sector from the card. Now whenever you want to make your card bootable again:
+
This will create a 512 byte file containing the raw boot sector from the card.
  +
  +
Now whenever you want to make your card bootable again:
 
#Format card
 
#Format card
 
#Copy boot sector to card:
 
#Copy boot sector to card:
 
<span style="line-height:20px;">mkbt.exe -x bootsect.bin f:</span>
 
<span style="line-height:20px;">mkbt.exe -x bootsect.bin f:</span>
 
   
 
'''Windows Method #3: HDHacker GUI (updated April 2012)'''
 
'''Windows Method #3: HDHacker GUI (updated April 2012)'''
Line 181: Line 250:
 
* click on "Read sector from disk"
 
* click on "Read sector from disk"
 
* click on "save sector to file" (512 bytes named something like: BootSector_G9.bin)
 
* click on "save sector to file" (512 bytes named something like: BootSector_G9.bin)
* Open xvi32 (or another [http://en.wikipedia.org/wiki/Comparison_of_hex_editors hex editor] ) to edit this file
+
* Open xvi32 (or another [http://en.wikipedia.org/wiki/Comparison_of_hex_editors hex editor]) to edit this file
 
* For FAT16 cards, go to offset 0x40 (decimal 64) and type <tt>BOOTDISK</tt> in ASCII mode ([http://forums.dpreview.com/forums/read.asp?forum=1010&message=25202367 as explained here]). Keep in mind that, if you do not see <tt>FAT12</tt> or <tt>FAT16</tt> around 0x36 (decimal 54) in the hex editor, you probably picked the wrong drive. Do not overwrite anything in that case.
 
* For FAT16 cards, go to offset 0x40 (decimal 64) and type <tt>BOOTDISK</tt> in ASCII mode ([http://forums.dpreview.com/forums/read.asp?forum=1010&message=25202367 as explained here]). Keep in mind that, if you do not see <tt>FAT12</tt> or <tt>FAT16</tt> around 0x36 (decimal 54) in the hex editor, you probably picked the wrong drive. Do not overwrite anything in that case.
 
* For FAT32 cards, go to offset 0x1E0 (decimal 480) and type <tt>BOOTDISK</tt> in ASCII mode ([http://forums.dpreview.com/forums/read.asp?forum=1010&message=25202367 as explained here]).
 
* For FAT32 cards, go to offset 0x1E0 (decimal 480) and type <tt>BOOTDISK</tt> in ASCII mode ([http://forums.dpreview.com/forums/read.asp?forum=1010&message=25202367 as explained here]).
* Save it as a different file (for example : BootSector_G9_bootable.bin)
+
* Save it as a different file (for example: BootSector_G9_bootable.bin)
 
* With HDHacker again, reselect the proper drive letter corresponding to your SD card in the card reader.
 
* With HDHacker again, reselect the proper drive letter corresponding to your SD card in the card reader.
 
* Set drive to operate = "'''bootsector'''", select sector = "'''bootsector'''"
 
* Set drive to operate = "'''bootsector'''", select sector = "'''bootsector'''"
* press '''"load sector from file"''' and choose the file you just saved (for example : BootSector_G9_bootable.bin)
+
* press '''"load sector from file"''' and choose the file you just saved (for example: BootSector_G9_bootable.bin)
 
* press '''"write sector on disk"''' (Don't forget to select the correct drive letter!)
 
* press '''"write sector on disk"''' (Don't forget to select the correct drive letter!)
* Unzip you the correct CHDK zip file for your camera and firmware version to the SD card, remembering set your unzip utlitily to recreate the folder structure from the zip file on the SD card.
+
* Unzip you the correct CHDK zip file for your camera and firmware version to the SD card, remembering set your unzip utility to recreate the folder structure from the zip file on the SD card.
 
* Lock the card, insert in camera, power on and enjoy.
 
* Lock the card, insert in camera, power on and enjoy.
   
 
'''Windows Method #4: bootable.exe CLI'''
   
 
* Extract from <nowiki>[https://me ga .nz/#!bV1XQIyB!2w2BisA4O5xaF-e1ATXb9n-u41Ay5v7GzWUE1xd8_MY]</nowiki> the "bootable.exe" file (link obfuscated to bypass wikia ban on directly downloadable links - remove spaces to fix it)
'''Windows'' ''Method #4: bootable.exe CLI'''
 
 
* Extract from [ http: // ewavr.nm.ru /chdk / bootable.zip ] the "bootable.exe" file (link obfuscated to bypass wikia ban on directly downloadable links - remove spaces to fix it)
 
 
* Put your SD card into reader or SD slot in computer and copy "bootable.exe" to the SD card
 
* Put your SD card into reader or SD slot in computer and copy "bootable.exe" to the SD card
 
* SD card behaves as disk and has assigned some letter (for example "F:"). Run shell (on winXP: menu Start - Run..., type "cmd") and change to SD card (by typing "F:" and press Enter in this example case)
 
* SD card behaves as disk and has assigned some letter (for example "F:"). Run shell (on winXP: menu Start - Run..., type "cmd") and change to SD card (by typing "F:" and press Enter in this example case)
Line 201: Line 269:
 
* Confirm and your SD card is bootable (Note: Doesn´t work with SanDisk Ultras "USB-Edition"!)
 
* Confirm and your SD card is bootable (Note: Doesn´t work with SanDisk Ultras "USB-Edition"!)
   
 
'''Windows Method #5: CHDK in-camera'''
   
 
If you have a SDHC card that is '''bigger than 4Gb''' and a camera released prior to 2011, you have to create two partitions on the card. This can be done entirely on the camera thanks to [http://chdk.setepontos.com/index.php/topic,3490.msg35163.html#msg35163 Thorwak's great modification and guide]. Here is how to do it, more or less copied from his guide:
'''Windows''' '''Method ''' '''#4: CHDK in-camera'''
 
 
If you have a SDHC card that is '''bigger than 4Gb''' you have to create two partitions on the card. This can now be done entirely on the camera thanks to [http://chdk.setepontos.com/index.php/topic,3490.msg35163.html#msg35163 Thorwak's great modification and guide]. Here is how to do it, more or less copied from his guide:
 
 
* Low level format card in camera. The card now contains one FAT32 partition.
 
* Low level format card in camera. The card now contains one FAT32 partition.
 
* Unpack the '''small''' build of CHDK directly to the card using PC.
 
* Unpack the '''small''' build of CHDK directly to the card using PC.
 
* Start CHDK manually (Firmware update).
 
* Start CHDK manually (Firmware update).
*Enter the CHDK menu, and select '''Miscellaneous stuff''' -&gt; '''Debug Parameters''' -&gt; '''Create card with two partitions'''. CHDK now creates the boot partition as before, but also formats it using FAT12 and marks the partition bootable. (not available on all ports)
+
*Enter the CHDK menu, and select '''Miscellaneous stuff''' -&gt; '''Debug Parameters''' -&gt; '''Create card with two partitions'''. CHDK now creates the boot partition as before, but also formats it using FAT12 and marks the partition bootable (not available on all ports).
*Put the card back in PC. If necessary, format the newly created 2MB partition. Re-unpack '''small''' CHDK to this partition.
+
*Put the card back in PC. If necessary, format the newly created 2MB partition. Once more, unpack '''small''' CHDK to this partition.
 
*Write protect the card (there is usually a switch on the side of the card; move it to the locked position).
 
*Write protect the card (there is usually a switch on the side of the card; move it to the locked position).
*The camera should now boot off of the card.
+
*The camera should now boot from the card.
 
* Enter the CHDK menu, and select '''Miscellaneous stuff''' -&gt; '''Swap partitions'''.
 
* Enter the CHDK menu, and select '''Miscellaneous stuff''' -&gt; '''Swap partitions'''.
 
*Unlock the card, and put it back in the PC. Now format the large partition, and unpack '''full''' CHDK onto it.
 
*Unlock the card, and put it back in the PC. Now format the large partition, and unpack '''full''' CHDK onto it.
Line 217: Line 284:
 
*Start CHDK manually (Firmware update) one more time, and select '''Miscellaneous stuff''' -&gt; '''Swap partitions'''.
 
*Start CHDK manually (Firmware update) one more time, and select '''Miscellaneous stuff''' -&gt; '''Swap partitions'''.
   
  +
'''Windows Method #6: 2017 Experimental Windows Installation Utility'''
Congratulations, now your camera should boot from CHDK automatically!
 
  +
  +
[https://chdk.setepontos.com/index.php?topic=13091 '''CHIMP''']: Canon Hack Installation and Management Platform
   
'''Caveats:''' Windows does not seem to be able to access both partitions at once. See the note below about using Linux to fix that. Otherwise you will have to run '''Swap partitions''' before you take the card out of the camera so windows can access your photos, then repeat the last step after you put the card back in to make it boot CHDK automatically. To me, this is much better than having to start CHDK&nbsp;manually every time you turn on the camera!
+
'''General Windows Caveat:''' Prior to the Q2/2017 Windows 10 update, Windows was not able to access both partitions on a dual partition SD card at once. See the note below about using Linux to fix that. Otherwise you will have to run the CHDK menu item '''Swap partitions''' before you take the card out of the camera so Windows can access your photos, then repeat the last step after you put the card back in to make it boot CHDK automatically.
   
===Apple Mac===
+
===''Apple Mac''===
 
'''Apple Method #1:'''
 
'''Apple Method #1:'''
   
Line 260: Line 329:
 
* Eject the SD card. Slide the tab to the LOCK position
 
* Eject the SD card. Slide the tab to the LOCK position
   
===Linux===
+
===''Linux''===
 
'''Linux Method #1: Smaller SD Cards'''
 
'''Linux Method #1: Smaller SD Cards'''
   
Line 268: Line 337:
   
 
echo -n BOOTDISK | dd bs=1 count=8 seek=64 of='''/dev/sdx1'''
 
echo -n BOOTDISK | dd bs=1 count=8 seek=64 of='''/dev/sdx1'''
 
   
 
'''Linux Method #2a: Larger SD Cards (>4G) for cameras released before 2011'''
 
'''Linux Method #2a: Larger SD Cards (>4G) for cameras released before 2011'''
   
If you have a SD card that is '''bigger than 4Gb '''you have to create 2 partions on the card. The first has to be formatted with FAT16 and will hold the CHDK files for booting (1MB is enough). The second partition has to be formated with FAT32 and will hold the images.
+
If you have a SD card that is '''bigger than 4Gb '''you have to create 2 partitions on the card. The first has to be formatted with FAT16 and will hold the CHDK files for booting (1MB is enough). The second partition has to be formatted with FAT32 and will hold the images. The simplest way to do this in Linux is to install '''gparted'''. With this great GUI based partition manager you can set up the partitions. Within gparted, set the "boot" flag for the first partition. It will not work without this. '''Note''': Windows will not be able to see the second partition holding the pictures unless you do some modification to partition table.
The simplest way to do this in Linux is to install '''gparted'''. With this great GUI based partition manager you can set up the partitions. Within gparted, set the "boot" flag for the first partition. It will not work without this. '''Note''': Windows will not be able to see the second partition holding the pictures unless you do some modification to partition table.
 
   
 
To make the first partition bootable use:
 
To make the first partition bootable use:
 
echo -n BOOTDISK | dd bs=1 count=8 seek=64 of='''/dev/sdx1'''
 
echo -n BOOTDISK | dd bs=1 count=8 seek=64 of='''/dev/sdx1'''
   
 
Notes: from gparted you should already know the correct location of your card (/dev/sdb1 or b2 or a1 or a2 ....). Or by looking at ''dmesg'' just after you inserted your card it will show you your SD card device name e.g. look for a line sometime like [9888.596295] sdb: sdb1 then sdb1 is your device
 
Notes: from gparted you should already know the correct location of your card (/dev/sdb1 or b2 or a1 or a2 ....). Or by looking at ''dmesg'' just after you inserted your card it will show you your SD card device name e.g. look for a line sometine like [ 9888.596295] sdb: sdb1 then sdb1 is your device
 
   
 
gparted tips: Insert the card before starting gparted. If you find the 'fat16'menu option greyed out in the 'format to' menu, you may need to install <tt>dosfstools</tt> in the package manager (in this case you may also have to restart gparted). Remember to hit 'apply all operations' in the edit menu to apply the changes you made to the card before exiting gparted.
 
gparted tips: Insert the card before starting gparted. If you find the 'fat16'menu option greyed out in the 'format to' menu, you may need to install <tt>dosfstools</tt> in the package manager (in this case you may also have to restart gparted). Remember to hit 'apply all operations' in the edit menu to apply the changes you made to the card before exiting gparted.
   
 
'''Linux Method #2b: Larger SD Cards (>4G) for cameras released after 2010:'''
 
 
'''Linux Method #2b: Larger SD Cards (>4G) for cameras released after 2010 :'''
 
 
* fdisk /dev/<your card device>
 
* fdisk /dev/<your card device>
 
* Press "d<enter>" to delete existing partitions
 
* Press "d<enter>" to delete existing partitions
* Press "n<enter> p<enter> 1<enter> <enter> <enter>" to crete a new partition that uses all the card space
+
* Press "n<enter> p<enter> 1<enter> <enter> <enter>" to create a new partition that uses all the card space
 
* Press "t<enter> b<enter>" to set the type to FAT32
 
* Press "t<enter> b<enter>" to set the type to FAT32
 
* Press "w<enter>" to write to card
 
* Press "w<enter>" to write to card
Line 295: Line 359:
 
* Mount the filesystem and copy CHDK files to it
 
* Mount the filesystem and copy CHDK files to it
 
* Unmount the filesystem and lock the card and enjoy CHDK.
 
* Unmount the filesystem and lock the card and enjoy CHDK.
 
 
   
 
'''Linux Method #3'''
 
'''Linux Method #3'''
Line 356: Line 418:
 
Another  Linux User's Guide can been found here: [http://scribblesandsnaps.com/2010/11/16/install-chdk-on-your-canon-camera-using-linux/ Install CHDK on Your Canon Camera Using Linux] (be sure to format your SD card with FAT16 or directly with your camera). 
 
Another  Linux User's Guide can been found here: [http://scribblesandsnaps.com/2010/11/16/install-chdk-on-your-canon-camera-using-linux/ Install CHDK on Your Canon Camera Using Linux] (be sure to format your SD card with FAT16 or directly with your camera). 
   
===Linux Method for making a second partition visible under Windowa===
+
===Linux Method for making a second partition visible under Windows===
   
Assuming your memory card is /dev/sd'''X'''<br />
+
Assuming your memory card is /dev/sd'''X'''
   
 
#Open fdisk
 
#Open fdisk
Line 375: Line 437:
 
#Make filesystems
 
#Make filesystems
 
##mkdosfs /dev/sd'''X'''1; mkdosfs -F32 /dev/sd'''X'''2
 
##mkdosfs /dev/sd'''X'''1; mkdosfs -F32 /dev/sd'''X'''2
#Make the sd'''X'''1 bootable (see instructions above)<br />
+
#Make the sd'''X'''1 bootable (see instructions above)<br /> 
 
#Look at the partition layout for /dev/sd'''X'''1
 
#Look at the partition layout for /dev/sd'''X'''1
 
##fdisk -l /dev/sd'''X'''
 
##fdisk -l /dev/sd'''X'''
Line 390: Line 452:
 
#Change partition id of sd'''X'''1 to extended
 
#Change partition id of sd'''X'''1 to extended
 
##sfdisk --id /dev/sd'''X''' 1 5
 
##sfdisk --id /dev/sd'''X''' 1 5
 
   
 
Credit from above instructions to cg at http://chdk.setepontos.com/index.php/topic,255.30.html
 
Credit from above instructions to cg at http://chdk.setepontos.com/index.php/topic,255.30.html
 
[[Category:CHDK]]
 
[[Category:CHDK]]
 
[[Category:Help]]
 
[[Category:Help]]
[[Category: CHDK internals]]
+
[[Category:CHDK internals]]

Latest revision as of 03:15, 8 March 2024

Notice

PLEASE READ THIS FIRST : A CHDK installation utility for Windows, Linux or Apple computers is available here : STICK. For Windows users, there is also this utility : CHIMP. This wiki page documents other ways to install CHDK on your camera's SD card.


Overview

CHDK loads from a camera's SD card into the camera's RAM memory. It extends the functionality of the camera without changing (flashing) the camera's firmware. Two methods are available to load CHDK into camera memory: the Firmware Update Method and the Bootable SD Card Method. Read the descriptions below to understand the strengths and weaknesses of each method and the step required to configure your SD card for each method.

SDcardunlocked

Prior to starting to use CHDK, you will need to:

  • Determine what year your camera was released using the Camera Platform ID Table wiki page;
  • Determine the firmware version of your camera using firmware version information from the CHDK FAQ;
  • Download the complete release of the correct version of CHDK for your camera's firmware from CHDK Download Page;
  • Decide what CHDK loading method you want to use;
  • Configure your SD memory card using the most appropriate method listed below;
  • Load the CHDK distribution to your SD card.

Firmware Update Method*

Overview

The Firmware Update Method allows you to load CHDK from any SD card formatted to work in your camera. It uses the camera's built-in "Firmware Update..." menu item to load CHDK from a file called either "PS.FIR" or "PS.FI2" (depending on the camera model). It is the easiest way to load CHDK but must be done each time the camera is powered on, because CHDK does not make any permanent changes to the camera when it runs.

  • Note that this method does not actually update the camera's firmware. It tricks the camera into thinking it is doing a firmware update but actually causes CHDK to be loaded into RAM. No firmware "flashing" takes place.

Firmware Update Method Card Preparation

Steps to use the firmware update method are :

  1. Start with an SD card formatted by your camera. This should happen automatically when you put a new card in the camera. If the camera does not want to format your card, it is probably already formatted.
  2. Remove the card from your camera. Use your PC and SD card reader to unzip the appropriate CHDK distribution file for your camera model and firmware version into the main root directory of your SD card. Make sure that the CHDK folders are also copied to the SD card. Note that for this method to work, there must now be a file called either ps.fi2 or ps.fir in the root directory of the card. Beta release versions of CHDK downloaded from the CHDK forum might not contain this file. If so, then you cannot use the firmware update method for those cameras until the software is released in the CHDK Autobuild Server Also, Mac users should read the hints in FAQ Mac as as you may have issues with permissions when using Apple Archive utility.
  3. Put the SD card back into in your camera.
  4. Start your camera directly into Play Mode by pressing the Play button or, if you camera does not have a play button, with the Play/Rec switch or Mode dial in the Play position. Do not start the camera in Rec (shooting) mode - the firmware update method will not be available if you do.
  5. Press the Canon Menu key and scroll around until you find a menu item that says "Firm Update...". There are usually three or four tabs in the Menu (varies by camera). You can probably stay on the first tab (typically Playback Settings) but some experimentation might be necessary.
  6. Select "Firm Update..." and press FUNC.SET button.
    SplashScreen
  7. It should say "Update firmware version?" Press OK. If everything went correctly, the CHDK splash screen will appear briefly on the Camera's screen.
  8. Go back to the camera mode and you should see some new OSD (on screen display) elements. (to go to the camera mode half press the shutter button)
  9. Activate the CHDK menus with the <ALT> key or key sequence defined for your camera.

Bootable SD Card Method

Overview

SDcardlocked

CHDK can be configured so that it automatically loads each time your camera starts. This is done via the "Bootable SD Card" method of loading and requires that the SD card be setup specially for this purpose. To use this method, format and load the card using the instructions below, and then set the card's lock switch (the little slider mechanism on the side of the SD card) to the "LOCK" position. Insert the card into your camera and turn it on normally - you should briefly see the CHDK logo, indicating that CHDK has successfully loaded.

Note that your SD card needs to be "bootable" to use the SD Card Lock method. This means that for cameras released prior to January 2011 there needs to be a FAT16 partition with a slightly modified boot block. Cameras released after January 2011 can boot from either a FAT16 or a FAT32 partition, although each format requires a different modifications to the boot block.

Setup of the SD card is somewhat complicated as different cameras have different requirements and limitations. Listed below are various methods of configuring an SD card for the "SD Card Lock" method.

Note: setting up an SD card to be bootable is not the same thing as setting the "boot" flag in the card's MBR. That flag is ignored by Canon cameras.

Bootable SD Card Method Preparation

Bootable SD Card Format Options

There are several possible configurations that can be used to enable the Bootable SD Card method of loading CHDK. The best method to use depends on when your camera was released, the size of your SD card and your tolerance for needing to take extra steps with some configurations. Details of what to do in each situation are given below.

For Cameras Released After 2010:

For recent cameras, a single FAT32 partition configured to be bootable is the preferred SD card configuration for automatically loading CHDK.

Notice

Some recent cameras format SD cards as exFAT. This format cannot be used for autobooting - you must reformat these cards as FAT32 on your PC. Note also that most newer cameras do not support dual partition CHDK booting.


You can also use a single FAT16 partition if your card is 4G or smaller (or if you are willing to just use 4G of a larger card). You might choose to use a FAT16 partition because you wish to use one of the automated configuration tool (see below) and that tool does not support FAT32 booting.

There are quite a few method of setting up an SD Card for cameras released after 2010. Listed below are three easy ones - alternative methods can be found at the bottom of this wiki page. Note: use "Method 3" if you are using a CHDK version that has no ps.fi2 file available in the distribution zip file (eg: a camera still under development or a camera where it's just not available).

Method 1 - Using the STICK utility

  1. Download STICK and use it to automatically download the right version of CHDK for your camera, format your SD card suitably for CHDK, and install CHDK correctly.
  2. If you are attempting to use a version of CHDK not yet in the autobuild, instructions on how to do so can be found here


Method 2 - Using CHDK itself to make the SD card bootable.

  1. Start out with your SD Card Lock switch in the unlocked position (the small slide switch on the side of the card - see picture above - make sure it is in the unlocked position to start this process.)
  2. Low level format the card in camera using the camera's built-in card format menu selection. Warning: any images on the card will be erased at this point. 
  3. Remove the card from your camera and put it into the SD card reader of your PC.
  4. The card should now contain a single FAT32 partition. If you are using a large SD card,  please make sure your camera did not format the card as exFAT - see warning note at start of this section.  You may need to use something like FAT32 Format to reformat the card in your PC if so. 
  5. Now please check again (by looking at the properties of your card in an SD card reader in your PC) to ensure that your card is formatted either FAT16 or FAT 32 - and not exFAT!
  6. Unpack the appropriate build of CHDK for your camera and firmware version directly to the card (including all subdirectories).
  7. With the Card Lock switch still in the unlocked position put the card back into your camera.
  8. Start your camera in Playback (image review) mode, not shooting mode. For most cameras, this is done by powering on the camera using the Play button. For cameras where Playback mode is selected using a switch or mode dial position, select play before pressing the power button. If camera starts in Rec (shooting) mode, the firmware update option will generally not be available, even if you subsequently switch to playback.
  9. Start CHDK manually by selecting the Firmware Update option in the Canon menus.
  10. After the CHDK logo briefly displays, start CHDK by using the <ALT> key sequence for your camera.
  11. Enter the CHDK menu, and select Miscellaneous stuff -'> SD Card' -> Make Card Bootable
  12. Turn your camera off, write protect the SD card by moving the little switch on the side of the card to the locked position, insert the card back into your camera.  Note that CHDK will cause the camera to ignore the lock switch so that you can take pictures normally.

Method 3 - Using EOSCard to make the SD card bootable.

  1. Start out with the SD Card Lock switch in the unlocked position (there will be a small slide switch on the side of the card - see picture above - make sure it is in the unlocked position to start this process.)
  2. Low level format the card in camera. The card will now contain a single FAT32 partition. (Warning: any images on the card will be erased at this point. Also, make sure your camera did not format the card as exFAT - see warning note at start of this section - you may need to use something like FAT32 Format to format the card in your PC is so.).
  3. Remove the card from your camera and put it into the SD card reader of your PC. Unpack the appropriate build of CHDK for your camera and firmware version directly to the card (including all subdirectories).
  4. Use EOScard to configure your SD card to be bootable in the camera. Read the instructions on this wiki page EOScard1.2 and download the software from there.
  5. Write protect your SD card by moving the little switch on the side of the card to the locked position, insert the card back into your camera.

Now each time that you turn your camera on, the CHDK logo should briefly display automatically, indicating that CHDK has successfully loaded.

Method 4 - Using Chimp to create a dual partition exFat bootable SD card.

this method is only suitable for large sd cards (SDXC) on >2011 cams that use the card lock boot method. although it will give minor speed gains on cards sized 64GB, consider if you want the trouble a dual partition card can give. if your card is 256GB or bigger you might encounter missing CHDK modules at boot with a FAT32 formatted card. in that case this is your only solution to make it work.

needed: 64Gb or larger sdxc card, pc with Chimp, >2011 chdk capable cam, chdk build that supports dual partition

  1. if you have a single partition card, unpack the build to your sd card.
  2. place the card in your cam. card locked or with firmware update.
  3. go to chdk menu>miscellaneous stuff>Sd card> create dual partition
  4. place the card back in your pc, quick format the second partition to exFAT
  5. place the correct build without the CHDK folder on the first, small FAT partition
  6. place the correct build with the CHDK folder on the second exFAT partition
  7. use Chimp to make the card bootable
  8. lock the card and place it in your camera

if you want to make the card single partition again:

  1. use Chimp to remove the bootflag. if you don't the dual partition bootflag will be there even after formats and you'll be unable to remove it with Chimp unless you reformat to dual partition.
  2. delete the files on the FAT partition
  3. place the card in your cam and do a quick format
  4. quick format the card on your pc in your favorite file format

Utilities for cameras released after 2010:

MS Windows:
  • CHIMP: downloads, partitions and installs CHDK for any supported camera and SD card size
  • STICK: downloads, partitions and installs CHDK for any supported camera and SD card size
  • WICKS: partitions and installs CHDK for any supported camera and SD card size
  • EOScard1.2 utility will write a boot string to the correct place on a FAT32 card using Windows computers. Format your SD card as FAT32, use this utility and then unzip the correct CHDK distribution file to the SD card.
  • FAT32 Format allows you to format SD cards in FAT32 format, including cards > 32G Useful if you have a newer camera that only supports exFAT format (exFAT does not support CHDK booting).
  • GUI version of FAT32 Format (see above)
  • Apple Mac:
  • SDMInst app for the Apple Mac can be used to make a FAT32 card bootable. Instructions for the Mac are here FAQ/Mac. Please pay particular attention to this section Problems loading CHKD on SD cards with a Mac computer.
Linux
  • LICKS the Linux Installer for CHDK and SDM can be used to create FAT32 bootable cards under Linux.

.

For Cameras Released Before 2011:

With older cameras, the best booting method options depends on the size of the SD card. For cards 4G in size or smaller, the card needs to be formatted as FAT16 and configured to be bootable. For cards 8G or larger, you will need to create two partitions - a small 500K FAT16 partition configured to be bootable and a larger partition formatted as FAT32 to take up the rest of the space on the SD card.

Notice

Not all cameras support dual partitions. Check the wiki page and forum porting thread for your camera before trying to use dual partitions.

Configuring any SD card to load CHDK via the card lock booting method requires these three steps :

  1. Setup the SD card by creating either a single partition (FAT16) or two partitions (a small FAT16 and a larger FAT32).
  2. Modify the boot block of the first partition on the card by writing the text string "BOOTDISK" at offset 0x40.
  3. Copy the "Complete" CHDK executable distribution to the correct places on the SD card. For single partition cards, all the files and folders from the CHDK distribution file belong on that partition. For dual partition cards, all the files and folders from the CHDK distribution file belong on the large second partition except for the files DISKBOOT.BIN and either PS.FIR or PS.FI2, which belong on the smaller FAT16 bootable partition.

There are quite a few method of setting up an SD Card for cameras released before 2011. Listed below are four easy ones - alternative methods can be found at the bottom of this wiki page. Note: use the fourth method if you are using a CHDK version that has no ps.fi2 file available in the distribution zip file (eg: a camera still under development or a camera like the S100 where its just not available).

Method 1 - Using the STICK utility

  1. Download STICK and use it to automatically download the right version of CHDK for your camera, format your SD card suitably for CHDK, and install CHDK correctly.
  2. If you are attempting to use a version of CHDK not yet in the autobuild, instructions on how to do so can be found here

Method 2 - Using CHDK itself to make the SD card bootable (cards 4G or smaller)

  1. Start out with your SD Card Lock switch in the unlocked position (the small slide switch on the side of the card - see picture above - make sure it is in the unlocked position to start this process.)
  2. Low level format the card in camera using the camera's built-in card format menu selection. Warning : any images on the card will be erased at this point. (Note: the card must be 4G or less and must be formatted as FAT16. You will need to verify the format in your PC as some cameras will default to a FAT32 format and pre-2011 cameras will not boot from FAT32).
  3. Remove the card from your camera and put it into the SD card reader of your PC.
  4. Now please check again (by looking at the properties of your card in an SD card reader in your PC) to ensure that your card is formatted FAT16 - not FAT32 or exFAT!
  5. Unpack the appropriate build of CHDK for your camera and firmware version directly to the card (including all subdirectories).
  6. With the Card Lock switch still in the unlocked position put the card back into your camera.
  7. Start your camera in Playback (image review) mode, not shooting mode. For most cameras, this is done by powering on the camera using the Play button. For cameras where Playback mode is selected using a switch or mode dial position, select play before pressing the power button. If camera starts in Rec (shooting) mode, the firmware update option will generally not be available, even if you subsequently switch to playback.
  8. Start CHDK manually by selecting the Firmware Update option in the Canon menus.
  9. After the CHDK logo briefly displays, start CHDK by using the <ALT> key sequence for your camera.
  10. Enter the CHDK menu, and select Miscellaneous stuff -> Make Card Bootable
  11. Turn your camera off, write protect the SD card by moving the little switch on the side of the card to the locked position, insert the card back into your camera.  Note that CHDK will cause the camera to ignore the lock switch so that you can take pictures normally.

Method 3 - Using CHDK itself to make the SD card bootable with two partitions (cards larger than 4G)

  1. Low level format card in camera. The card now contains either at FAT16 or  FAT32 partition.
  2. Unpack the CHDK build zip file directly to the card using your PC (make sure the folder structure in the zip file is preserved)
  3. Start CHDK manually using the Firmware Update method.
  4. Enter the CHDK menu, and select Miscellaneous stuff -> SD Card -> Create card with two partitions. CHDK now creates the boot partition as before, but also formats it using FAT16 and marks the partition bootable.
  5. Put the card back in PC. If necessary, format the newly created 2MB partition to FAT16.
  6. Re-unpack CHDK to this partition.
  7. Write protect the card (there is usually a switch on the side of the card; move it to the locked position).
  8. The camera should now boot CHDK from the card (make sure the folder structure in the zip file is preserved)
  9. Enter the CHDK menus, and select Miscellaneous stuff -> SD Card -> Swap partitions
  10. Shutdown the camera, remove and unlock the card, and put it back in the PC. Now format the large partition, and unpack CHDK onto it (make sure the folder structure in the zip file is preserved)
  11. Lock the card and put it back in the camera.
  12. Start CHDK manually with the Firmware Update method one more time, and select Miscellaneous stuff -> SD Card -> Swap partitions.

Caveats: Windows does not seem to be able to access both partitions at once. You can use the WASP utility to manage that. Otherwise you will have to run Swap partitions before you take the card out of the camera so Windows can access your photos, then repeat the last step after you put the card back in to make it boot CHDK automatically. To me, this is much better than having to start CHDK manually every time you turn on the camera!

Method 4 - Using EOSCard to make the SD card bootable (cards 4G or smaller)

  1. Start out with the SD Card Lock switch in the unlocked position (there will be a small slide switch on the side of the card - see picture above - make sure it is in the unlocked position to start this process.)
  2. Low level format the card in camera.  Warning : any images on the card will be erased at this point. (Note: the card must be 4G or less and must be formatted as FAT16. You will need to verify the format in your PC as some cameras will default to a FAT32 format and pre-2011 cameras will not boot from FAT16).
  3. Remove the card from your camera and put it into the SD card reader of your PC. Unpack the appropriate build of CHDK for your camera and firmware version directly to the card (including all subdirectories).
  4. Use EOScard to configure your SD card to be bootable in the camera. Read the instructions on this wiki page EOScard1.2 and download the software from there.
  5. Write protect your SD card by moving the little switch on the side of the card to the locked position, insert the card back into your camera.

Now each time that you turn your camera on, the CHDK logo should briefly display automatically, indicating that CHDK has successfully loaded.

To simplify the steps listed above for the preparation of a CHDK SD card, several utilities are available. These utilities can partition and format bootable SD cards and download & install CHDK to those cards.

Utilities for cameras released before 2011:

MS Windows:
  • CHIMP: downloads, partitions and installs CHDK for any supported camera and SD card size + allows easy swapping of primary & secondary partitions of dual partition cards
  • STICK: downloads, partitions and installs CHDK for any supported camera and SD card size
  • WICKS: partitions and installs CHDK for any supported camera and SD card size
  • WASP: allows easy swapping of primary & secondary partitions of dual partition cards
  • the standalone program sdminste.exe can be extracted from inside this package: Common Files. Instructions are available at Using SDMinste to Create Dual Partition SD cards. It can format 4G or smaller cards as bootable FAT16 and it can format cards 8G or larger for dual partition booting.
  • instruction are also available for using Partition Wizard and MBRFix
  • there is also the older Cardtricks program for use with SD cards of 4G bytes or less, as described in CHDK for Dummies.
  • EOScard1.2 utility will write a boot string to the correct place on a single partition FAT16 card. Format your SD card as FAT16, use this utility and then unzip the correct CHDK distribution file to the SD card.
Linux:
Apple Mac:

A Deep Dive into the Boot Process

During the boot process, a Canon P&S camera powers up and checks to see if the SD card lock switch is in the "Locked" position. If the card is locked, the camera next checks the volume boot sector of the first partition on the SD card for the signature string "BOOTDISK". This signature is stored starting at offset 0x40 (decimal 64) on a FAT16 volume and at offset 0x1E0 on a FAT32 volume. If the signature is found, the camera checks the root directory of the SD card for a file named "DISKBOOT.BIN". If found, this file is loaded into memory and control is passed to that code. Naturally, this file contains the CHDK program

Note : when loaded, CHDK causes the camera to ignore the SD card lock, so that images may be stored.

For cameras released prior to 2011, booting only works on FAT16 volumes. The maximum size for FAT16 is 4GB so using an SD card larger than 4GB is more complicated. By dividing such cards into two partitions (volumes), one can have a small FAT16 partition (500K) from which to boot, and a much larger FAT32 volume using the rest of the SD card for storing images. When using this method, the FAT16 partition must be the first one in the partition table. When it loads, CHDK will logically swap the partitions after loading, so the camera only sees the larger one. Because of this, only the DISKBOOT.BIN file needs to be located in the smaller partition - all the other CHDK files need to be located on the larger partition. Failing to do this will mean the CHDK logo will not display at boot, menu icons will not appear and things like fonts and test scripts will not be available.

SD cards do not normally contain multiple partitions. Some operating systems, particularly Windows, do not have drivers which can properly handle SD cards with multiple partitions. Windows will only see the first partition on an SD card. Because of this, the partitions need to be "swapped" before using a card in Windows if one wishes to transfer images directly. The CHDK debug menu has an option which will do this. When moving the card back to the camera, you will have to manually start CHDK via the firmware update method (because the camera will only see the FAT32 partition, so it won't boot), and do a swap again. Alternatively, tools like sdminste.exe can be used to swap the partitions on the PC before returning the card to your camera.

It should also be noted that doing a card format in the camera will format the entire card into one volume, removing CHDK in the process.

If you are still curious about how CHDK autoloads, check out this thread How does CHDK start running.

Other methods for preparation a Bootable SD card

Windows

Windows Method #1: HxD GUI (for cameras released after 2010)

  1. First format your card FAT32.
  2. On a PC, use HxD http://mh-nexus.de/en/hxd/ to EDIT the boot sector of the SD card.
  3. In Extra- > Open Disk Deselect Read Only: BE CAREFUL! Select the Unit x: or what ever of your SD card - not your hard disk!!!
  4. Go to the right part at the level of 00001E0 and change the letters "any key " to "BOOTDISK"
  5. SAVE.
  6. Then all the contents of CHDK distribution zip file have to be extracted into the root of the drive (taking care to have the zip utility restore the original directory structure).
  7. Write-protect your SD, and the camera should autoload from it.

Thanks to asm1989 for this method from the CHDK Forum

Windows Method #2: mkbt.exe CLI (for cameras released after 2010)

If you're looking for a Command Line Interface to make your SD card bootable as part of a batch file script, Bart's MKBT does the trick nicely:

  1. Format card by any method on this page (recommend using your camera)
  2. Make card bootable by any method on this page (recommend using STICK)
  3. Copy boot sector from card:
mkbt.exe -c -x f: bootsect.bin

This will create a 512 byte file containing the raw boot sector from the card.

Now whenever you want to make your card bootable again:

  1. Format card
  2. Copy boot sector to card:
mkbt.exe -x bootsect.bin f:

Windows Method #3: HDHacker GUI (updated April 2012)

  • Download the HDHacker utility from here and the xvi32 hex editor from here to execute the following steps.
  • Format you SD card in your camera (see notes above about FAT16, FAT32 and exFAT)
  • Install and run HDHacker.
  • Select the proper drive letter corresponding to your SD card in the card reader.
  • Set drive to operate = "bootsector", select sector = "bootsector"
  • click on "Read sector from disk"
  • click on "save sector to file" (512 bytes named something like: BootSector_G9.bin)
  • Open xvi32 (or another hex editor) to edit this file
  • For FAT16 cards, go to offset 0x40 (decimal 64) and type BOOTDISK in ASCII mode (as explained here). Keep in mind that, if you do not see FAT12 or FAT16 around 0x36 (decimal 54) in the hex editor, you probably picked the wrong drive. Do not overwrite anything in that case.
  • For FAT32 cards, go to offset 0x1E0 (decimal 480) and type BOOTDISK in ASCII mode (as explained here).
  • Save it as a different file (for example: BootSector_G9_bootable.bin)
  • With HDHacker again, reselect the proper drive letter corresponding to your SD card in the card reader.
  • Set drive to operate = "bootsector", select sector = "bootsector"
  • press "load sector from file" and choose the file you just saved (for example: BootSector_G9_bootable.bin)
  • press "write sector on disk" (Don't forget to select the correct drive letter!)
  • Unzip you the correct CHDK zip file for your camera and firmware version to the SD card, remembering set your unzip utility to recreate the folder structure from the zip file on the SD card.
  • Lock the card, insert in camera, power on and enjoy.

Windows Method #4: bootable.exe CLI

  • Extract from [https://me ga .nz/#!bV1XQIyB!2w2BisA4O5xaF-e1ATXb9n-u41Ay5v7GzWUE1xd8_MY] the "bootable.exe" file (link obfuscated to bypass wikia ban on directly downloadable links - remove spaces to fix it)
  • Put your SD card into reader or SD slot in computer and copy "bootable.exe" to the SD card
  • SD card behaves as disk and has assigned some letter (for example "F:"). Run shell (on winXP: menu Start - Run..., type "cmd") and change to SD card (by typing "F:" and press Enter in this example case)
  • Run "bootable.exe" You will be prompted to give right syntax as "bootable.exe F:"
  • Confirm and your SD card is bootable (Note: Doesn´t work with SanDisk Ultras "USB-Edition"!)

Windows Method #5: CHDK in-camera

If you have a SDHC card that is bigger than 4Gb and a camera released prior to 2011, you have to create two partitions on the card. This can be done entirely on the camera thanks to Thorwak's great modification and guide. Here is how to do it, more or less copied from his guide:

  • Low level format card in camera. The card now contains one FAT32 partition.
  • Unpack the small build of CHDK directly to the card using PC.
  • Start CHDK manually (Firmware update).
  • Enter the CHDK menu, and select Miscellaneous stuff -> Debug Parameters -> Create card with two partitions. CHDK now creates the boot partition as before, but also formats it using FAT12 and marks the partition bootable (not available on all ports).
  • Put the card back in PC. If necessary, format the newly created 2MB partition. Once more, unpack small CHDK to this partition.
  • Write protect the card (there is usually a switch on the side of the card; move it to the locked position).
  • The camera should now boot from the card.
  • Enter the CHDK menu, and select Miscellaneous stuff -> Swap partitions.
  • Unlock the card, and put it back in the PC. Now format the large partition, and unpack full CHDK onto it.
  • Lock the card and put it back in the camera.
  • Start CHDK manually (Firmware update) one more time, and select Miscellaneous stuff -> Swap partitions.

Windows Method #6: 2017 Experimental Windows Installation Utility

CHIMP: Canon Hack Installation and Management Platform

General Windows Caveat: Prior to the Q2/2017 Windows 10 update, Windows was not able to access both partitions on a dual partition SD card at once. See the note below about using Linux to fix that. Otherwise you will have to run the CHDK menu item Swap partitions before you take the card out of the camera so Windows can access your photos, then repeat the last step after you put the card back in to make it boot CHDK automatically.

Apple Mac

Apple Method #1:

More complete directions - FAQ/Mac

Apple Method #2: MacOS X Leopard

  • Load your SD card in a card reader (unless your camera appears as a disk drive when you connect it)
  • Open Disk Utility and highlight the volume. Click "Info" and look for "Disk Identifier". For me, it was /dev/disk2s1
  • close the Info window
  • With the volume highlighted (not the "drive"), click "Unmount".
  • From a Terminal command line, run a command like this:
sudo newfs_msdos -F 16 -v MYSDCARD -b 4096 -c 128 /dev/disk2s1

If you get an error on the Mac command line after running this command like "newfs_msdos: warning: /dev/disk2s1 is not a character device" go ahead and re-mount the drive in the Apple Disk Utility. The drive should still show up as a FAT 16 drive, you can then continue

Apple Method #3: Darwin ports installed

The instructions for the Linux direct method also work for the Mac, provided you have darwin ports installed

  • Go to MacPorts website and install MacPorts [1]
  • type sudo port install hexedit to install hexedit
  • type man hexedit to familiarize yourself with the commands of hexedit
  • Open Disk Utility and click on the image for the SD card - click on "Get Info" to determine the location of the partition (such as disk4s1)
  • Use Disk Utility to unmount the partition
  • in a terminal window, type sudo hexedit /dev/disk4s1. Press enter (that's fn+return on some keyboards). Type in '40' to go to offset 0x40. Hit enter. Hit "tab" to switch to typing on the ASCII side. Type "BOOTDISK". Hit control-X and type "Y" when prompted to save.

Apple Method #4:

If you don't want to install darwinports and hexedit, you can also use the free 0xED [2], or Hex Fiend, which will work with the indirect way as well. This may be the simplest way for a Mac user to get a bootable SD disk.

  • Go to the Disk Utility. Select your SD card from the list at the left, and click Informations to get the disk identifier (example: disk4s1). Use this in the steps below
  • Using Disk Utility, unmount (don't eject!) your SD card.
  • Open a Terminal window and type: dd if=/dev/disk4s1 of=BootSector_G9.bin bs=512 count=1. This copies a sector of the SD card to your Mac's hard disk.
  • The BootSector_G9.bin file in your Home directory contains your SD card's boot sector. Make a backup of it in case anything goes wrong.
  • Open BootSector_G9.bin with 0xED. Keep in mind that, if you do not see FAT12 or FAT16 around 0x36 (decimal 54) in the hex editor, you probably picked the wrong drive. Do not overwrite anything in that case.
  • If the file is correct, select the Overwrite writing method (Command+Shift+O).
  • Go to offset hex 40 (decimal 64) and press Tab. Type BOOTDISK. Save and quit.
  • In your Terminal window, type: dd if=BootSector_G9.bin of=/dev/disk4s1 bs=512 count=1. This copies the modified file to the boot sector of your SD card.
  • Using Disk Utility, mount the card.
  • Copy the file DISKBOOT.BIN to the SD card. Make sure to use the correct version for your model of Canon camera.
  • Eject the SD card. Slide the tab to the LOCK position

Linux

Linux Method #1: Smaller SD Cards

SD card no larger than 4Gb. To start from zero, either format your card with the camera, or use GParted (or fdisk) to create a single partition on the SD card. Make sure the format is FAT16. About gparted: Note that making a single partition doesn't mean dividing the card in two parts, it means creating a single data section called a partition.

To make the partition bootable, use:

echo -n BOOTDISK | dd bs=1 count=8 seek=64 of=/dev/sdx1

Linux Method #2a: Larger SD Cards (>4G) for cameras released before 2011

If you have a SD card that is bigger than 4Gb you have to create 2 partitions on the card. The first has to be formatted with FAT16 and will hold the CHDK files for booting (1MB is enough). The second partition has to be formatted with FAT32 and will hold the images. The simplest way to do this in Linux is to install gparted. With this great GUI based partition manager you can set up the partitions. Within gparted, set the "boot" flag for the first partition. It will not work without this. Note: Windows will not be able to see the second partition holding the pictures unless you do some modification to partition table.

To make the first partition bootable use:

echo -n BOOTDISK | dd bs=1 count=8 seek=64 of=/dev/sdx1

Notes: from gparted you should already know the correct location of your card (/dev/sdb1 or b2 or a1 or a2 ....). Or by looking at dmesg just after you inserted your card it will show you your SD card device name e.g. look for a line sometime like [9888.596295] sdb: sdb1 then sdb1 is your device

gparted tips: Insert the card before starting gparted. If you find the 'fat16'menu option greyed out in the 'format to' menu, you may need to install dosfstools in the package manager (in this case you may also have to restart gparted). Remember to hit 'apply all operations' in the edit menu to apply the changes you made to the card before exiting gparted.

Linux Method #2b: Larger SD Cards (>4G) for cameras released after 2010:

  • fdisk /dev/<your card device>
  • Press "d<enter>" to delete existing partitions
  • Press "n<enter> p<enter> 1<enter> <enter> <enter>" to create a new partition that uses all the card space
  • Press "t<enter> b<enter>" to set the type to FAT32
  • Press "w<enter>" to write to card
  • mkdosfs -F 32 -n <some name> /dev/<your card device's 1st partition>
  • echo -n BOOTDISK | dd bs=1 count=8 seek=480 of=/dev/<your card device's 1st partition>
  • Mount the filesystem and copy CHDK files to it
  • Unmount the filesystem and lock the card and enjoy CHDK.

Linux Method #3

  • Start a terminal, if you haven't done so already
  • Determine the location of your card, it is usually something like /dev/sdx. If the card is mounted, you can determine the location from the mount command. Make sure you pick the right one! Replace the x in /dev/sdx appropriately.
  • Make sure your card is unmounted (umount /dev/sdx1)
  • Now, you need to alter the partition's bootsector. There are two ways to do this. This guide assumes hexedit is used, though you can use any hex editor. Keep in mind that, if you do not see FAT12 or FAT16 around 0x36 (decimal 54) in the hex editor, you probably picked the wrong drive. Do not overwrite anything in that case. If you see FAT32, you will have to reformat the card in FAT16 - this can be easily done with mkdosfs -F 16 /dev/your_card_partition. Make sure to copy all the needed images off the card before doing this.
    1. Directly
      • Open your SD card's FAT partition in hexedit: hexedit /dev/sdx1
      • Go to offset 0x40 (decimal 64) and type BOOTDISK in ASCII mode.
      • Save (Ctrl-X in hexedit) and quit.
    2. Directly (without hexedit)
      • echo -n BOOTDISK | dd bs=1 count=8 seek=64 of=/dev/sdx1 (if you get "dd: /dev/sdx1 Permission denied" put "sudo " before dd)
    3. Indirectly
      • First, extract the bootsector like this: dd if=/dev/sdx1 of=BootSector_G9.bin bs=512 count=1
      • Copy the saved file, so you have a backup: cp BootSector_G9{,_bootable}.bin
      • Open the copy in a hex editor: hexedit BootSector_G9_bootable.bin
      • Go to offset 0x40 (decimal 64) and type BOOTDISK in ASCII mode.
      • Save (Ctrl-X in hexedit) and quit.
      • Upload the bootsector to the card again: dd if=BootSector_G9_bootable.bin of=/dev/sdx1 bs=512 count=1
    4. Indirectly (without hexedit, assuming bash)
      • First, extract the start of the bootsector like this: dd if=/dev/sdx1 of=BS.bootable bs=64 count=1
      • Next, append the required name: echo -n BOOTDISK >> BS.bootable
      • Finally, append the rest: dd if=/dev/sdx1 bs=1 skip=72 count=$[512-72] >> BS.bootable
      • Upload the bootsector to the card again like in the former example: dd if=BS.bootable of=/dev/sdx1 bs=512
    5. Indirectly with script (szymonolko_a_t_o2.pl)
      • Save below lines as script
      • Run it with one argument which is the partition to be made bootable, eg. make.bootable /dev/mmcblk1p1
#!/bin/bash
DEV=$1
if [[ -z "${DEV}" ]]
then
   echo "Usage: $0 partition"
   exit 1
fi
dd if=${DEV} of=1.tmp.bin bs=64 count=1
echo "BOOTDISK" > 2.tmp
dd  if=2.tmp of=2.tmp.bin bs=8 count=1
rm 2.tmp
#512-64-8=440
dd if=${DEV} of=3.tmp.bin skip=9 bs=8 count=55
cat 1.tmp.bin 2.tmp.bin 3.tmp.bin > bootable.bin
rm 1.tmp.bin
rm 2.tmp.bin
rm 3.tmp.bin
dd if=bootable.bin of=${DEV} bs=512 count=1
rm bootable.bin

or

#!/bin/bash
[ "$1" ] || { echo "Usage: $0 partition"; exit 1; }
dd if="$1" of=bootable.bin bs=512 count=1
echo -n "BOOTDISK" | dd of=bootable.bin bs=1 count=8 seek=64 conv=notrunc
dd if=bootable.bin of="$1" bs=512 count=1
rm bootable.bin


Linux Method#4

Another  Linux User's Guide can been found here: Install CHDK on Your Canon Camera Using Linux (be sure to format your SD card with FAT16 or directly with your camera). 

Linux Method for making a second partition visible under Windows

Assuming your memory card is /dev/sdX

  1. Open fdisk
    1. fdisk /dev/sdX
  1. Create an empty dos partition table.
    1. o <enter>
  2. Create sdX1 and sdX2 as primary partitions:
    1. n <enter> p <enter> 1 <enter> 1 <enter> +10M <enter>
    2. n <enter> p <enter> 2 <enter> <enter> <enter>
  3. Change sdX1 -> fat16, sdX2 -> fat32
    1. t <enter> 1 <enter> 6 <enter>
    2. t <enter> 2 <enter> b <enter>
  4. Write changes to disk & exit
    1. w <enter>
  5. Make filesystems
    1. mkdosfs /dev/sdX1; mkdosfs -F32 /dev/sdX2
  6. Make the sdX1 bootable (see instructions above)
     
  7. Look at the partition layout for /dev/sdX1
    1. fdisk -l /dev/sdX
    2. Note the numbers under the "Start", "#sectors", and "Id" parameters
    3. Example output:
      1. Device Boot Start End #sectors Id System
        /dev/sdd1 32 18431 18400 6 FAT16
        /dev/sdd2 18432 31115263 31096832 b W95 FAT32
        /dev/sdd3 0 - 0 0 Empty
        /dev/sdd4 0 - 0 0 Empty
  8. use sfdisk to create sdX3 as clone of sdX1
    1. sfdisk -uS -N3 -f /dev/sdX
    2. Use the numbers you wrote down in the last step for sdX1.
    3. {start} {#sectors} {id} <enter>
      1. From the example output: type "32 18400 6" and press <enter>
  9. Note: It will warn you that partitions 1 and 3 overlap. This is normal. Type "y" confirming that you want to run the command.
    1. y <enter>
  10. Change partition id of sdX1 to extended
    1. sfdisk --id /dev/sdX 1 5

Credit from above instructions to cg at http://chdk.setepontos.com/index.php/topic,255.30.html