https://bitbucket.org/hudson/magic-lantern
Raw File
Tip revision: 54dbdea82c3e07cdbe999d3697b9e1f522c7dd15 authored by Giovanni C on 05 June 2013, 07:47:46 UTC
Close branch 500d.
Tip revision: 54dbdea
INSTALL.txt
Installing Magic Lantern 0.2 for Canon 550D, Firmware 1.0.9



WARNING
=======

::

           ***************************************************
           *                                                 *
           * THIS IS DANGEROUS AND MIGHT DAMAGE YOUR CAMERA. *
           *  NO WARRANTIES.  NO GUARANTEES.  DO NOT TAUNT.  *
           *                                                 *
           ***************************************************

If you are not comfortable with this, stop reading and delete the
software before you are tempted to try running it on your camera.

To repeat this important point::

           ***************************************************
           *                                                 *
           * THIS IS DANGEROUS AND MIGHT DAMAGE YOUR CAMERA. *
           *   IF IT BREAKS, YOU GET TO KEEP BOTH PIECES.    *
           *                                                 *
           ***************************************************

Important notes
===============

* EyeFi cards `are known to cause problems <https://bitbucket.org/hudson/magic-lantern/issue/216/eye-fi-pro-x2-doesnt-work>`_, so it's better to use normal cards. 

* If you have a bootable SD card and have the ``DISKBOOT`` flag 
  set in the camera (which the installer does), and you do not have 
  an ``AUTOEXEC.BIN`` file on the card the camera **WILL NOT BOOT!**
  It will hang and not wake up until the battery is removed.
  
* If you encounter a "locked up" camera, **quickly remove the battery**.
  Otherwise the ARM might be in a tight-loop and get very hot, very quickly. 
  Your battery will run down and your LCD might show some discoloration.
  
* When in doubt, remove the battery and reboot. 

* **And, remember that this software can damage or destroy your camera.**


Introduction
============

There are 2 ways of running user code on the 550D/T2i/Kiss X4:

1. using the update process with a **.fir** file, which must be digitally signed.

2. using the bootdisk process: the **autoexec.bin** file is loaded and executed. 
   This file does not have to be signed, but the bootdisk flag must be enabled in the camera.

To install Magic Lantern on your camera, you must download the right 
magiclantern for your firmware: 1.0.8 or 1.0.9. The recommended way 
is to upgrade your camera to 1.0.9 in order to get the latest features.

No development will be done on 1.0.8 any more. 
Magic Lantern does not work at all with earlier firmware versions.

Installing Magic Lantern for 550D firmware version 1.0.9 (current)
==================================================================

[[Video:Magic Lantern Installation Tutorial for Canon 550D / Rebel T2i|thumb|400px|right|Installation tutorial by saw0media]]

**Make sure you have the Canon Firmware 1.0.9 first!**
**Running Magic Lantern on an incorrect firmware version may brick your camera!**

If you already use a previous version of Magic Lantern for 550D firmware **1.0.9**, it's easy.
Download the latest ML and unzip everything on your SD card. Done. Enjoy!

If you already use Magic Lantern for 550D/1.0.8, format your card, 
upgrade camera firmware to 1.0.9 and follow the ML install steps.

{{clr}}

Step 0. Downloading
~~~~~~~~~~~~~~~~~~~
* Download this release: `magiclantern-0.2.0.rc1.550d.fw109.zip <https://bitbucket.org/hudson/magic-lantern/downloads/magiclantern-0.2.0.rc1.550d.fw109.zip>`_
* Read `this discussion thread <http://groups.google.com/group/ml-devel/browse_thread/thread/850ec268bc883ceb>`_ for more info.

Step 1. Enabling bootflag
~~~~~~~~~~~~~~~~~~~~~~~~~

.. image:: 550install.jpg
    :alt: thumb|right|Magic Lantern install screen

* Remove any accessories from your camera (such as battery grip or external flash)
* Format the SD card from the camera (low level, from ``Wrench 1`` menu)
* Copy ``magiclantern.fir`` from the zip archive on the SD card
* Launch the firmware update process. For this, 
  start the camera and select ``Firmware ver 1.0.9`` from the ``Wrench 3`` menu 
  (must be in manual or P mode to select)
* The installer (``magiclantern.fir``) will enable the bootdisk flag in NVRAM
  by calling the ``bootdisk_enable()`` function from Canon firmware.
  
  This is the **only** persistent change to your camera, which can be reverted.
* Once the drive light has gone off and stays off for a few seconds, remove the battery.

Step 2. Making the SD card bootable
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

The file ``autoexec.bin`` can be launched if the bootdisk is enabled 
AND the SD card is "prepared" with special values written in boot sector:

* for FAT16 cards: ``EOS_DEVELOP`` at offset 43 and ``BOOTDISK`` at offset 64
* for FAT32 cards: ``EOS_DEVELOP`` at offset 71 and ``BOOTDISK`` at offset 92

**Do not put an "prepared" (bootable) card without ``autoexec.bin`` in the camera! (it won't boot and you'll have to take the battery out).**

Mac OS X
````````

Use `**MacBoot** <http://www.zenoshrdlu.com/macboot/macboot.html>`_ by `Dave Mitchell <http://www.zenoshrdlu.com/>`_.

.. image:: MacBoot.jpg
    :alt: 300px|right|MacBoot usage

Select your SD card drive, check ``Make DSLR-bootable`` and hit Prepare.

Windows
```````

Use `**EOScard** <http://pel.hu/down/EOScard.exe>`_ (thanks `Pel <http://pel.hu/>`_!)

.. image:: EOScard.png
    :alt: frame|right|EOScard usage

Select your SD card drive, check ``EOS_DEVELOP`` and ``BOOTDISK`` and hit Save.

If the antivirus `is complaining <https://bitbucket.org/hudson/magic-lantern/issue/207/problem-using-eoscardexe-with-bitdefender>`_, put it on Game Mode or try another operating system ;)

{{clr}}

Linux and Mac OS X (command line)
`````````````````````````````````

You can use ``make_bootable.sh``, which is included in the archive.
You need to change the following line in order to indicate your SD card device::

    # change this
    dev=/dev/disk1s1

* To find the correct ``/dev/`` entry under **OS X** type::

      diskutil list | grep FAT

  That will list all mounted FAT disks, the ``/dev/`` entry is the last column. Note also that under OS X this script will leave the card unmounted, eject and reinsert it to re-mount it. 

* To find the correct ``/dev/`` entry under **Linux** type::

      mount | grep fat

  and choose the one labeled ``EOS_DIGITAL``. You may have to run this script as root, for example::
      
      sudo bash make_bootable.sh

Step 3. The last one :)
~~~~~~~~~~~~~~~~~~~~~~~

Delete ``magiclantern.fir`` and copy ``autoexec.bin``, ``magic.cfg`` 
and ``*.bmp`` files on your SDCard. Put the card in the camera.

Switch on your camera, and Magic Lantern (``autoexec.bin``) will boot.

As long as you had enabled the ``BOOTDISK`` flag once, you card is "prepared";
the camera will try to load any ``autoexec.bin``. The ``.fir`` file is not needed any more,
unless for some reason you will want to retry the installation process.


Troubleshooting
~~~~~~~~~~~~~~~

* If Magic Lantern does not work (i.e. no new features are noticed), repeat Step 2. 
  Also try a low-level format of the card from the camera, or try with an older (FAT16) card.

* **Again, NEVER let a prepared card without a working autoexec.bin on it, remove the battery immediatly during 5 secs, switching off is not enough !!!** 

* Look in the `issue tracker <https://bitbucket.org/hudson/magic-lantern/issues>`_ for similar problems; if you can't find the solution, create a new issue there.

* If the camera does not boot (seems dead), **remove the battery and the card**. 
  Then put the battery back and try to boot the camera without card. Then put a formatted card 
  in the camera and try to boot without Magic Lantern. Only after you are sure the camera is OK, 
  you can try to see what's wrong with Magic Lantern.

.


Uninstalling Magic Lantern
==========================

Uninstalling ML from one card
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Format the card from the camera, and Magic Lantern will be gone (only from that card, of course).

**Don't** just delete the Magic Lantern files from the card! If you do, the camera won't boot and you'll have to take the battery out.

Uninstalling ML from the camera
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

Put this in ``magic.cfg`` to reset the ``DISKBOOT`` flag from the camera::

    magic.disable_bootdiskf = 1


Older versions (archived)
=========================

550D/1.0.9
~~~~~~~~~~

* 3 Dec 2010: `magiclantern-0.1.9-rc0_550d_fw109.zip <http://bitbucket.org/hudson/magic-lantern/downloads/magiclantern-0.1.9-rc0_550d_fw109.zip>`_

550D/1.0.8
~~~~~~~~~~

No further development will be done on the 1.0.8 firmware.

Official builds from Trammell Hudson
````````````````````````````````````
* `Announcing pre-alpha firmware <http://groups.google.com/group/ml-devel/msg/49631dc8fec89779>`_
* RC1 release: `magiclantern-550d.rc1.zip <http://bitbucket.org/hudson/magic-lantern/downloads/magiclantern-550d.rc1.zip>`_
* 8 Aug 2010: `Update 550D beta, now with gain control <http://groups.google.com/group/ml-devel/browse_thread/thread/1192bdeeb58e94d5>`_

Unofficial (experimental) builds
````````````````````````````````
* 11 Nov 2010: `magiclantern for 550D, compiled with shorter config file <http://groups.google.com/group/ml-devel/msg/87b96d3cb43b4bec>`_
* 23 Nov 2010: `Recording Internal and external audio simultaneously <http://groups.google.com/group/ml-devel/msg/1c690d8dee580ee3>`_
* 07 Dec 2010: `fixed cropmarks <http://groups.google.com/group/ml-devel/msg/5abd238291b1d2b3>`_
* 09 Dec 2010: `enabled zebras and histogram <http://groups.google.com/group/ml-devel/browse_thread/thread/e15fac669f293d2a>`_
* 11 Dec 2010: `GUI menus & lots of extras <http://groups.google.com/group/ml-devel/browse_thread/thread/97488a67eff87b7e>`_
* 12 Dec 2010: `enabled QScale and spotmeter <http://groups.google.com/group/ml-devel/msg/0dbfe7d9ee043525>`_

Risks
=====

* This firmware does a (very small) (semi-)permanent change to your camera: it changes the ``DISKBOOT`` flag, which is stored in NVRAM. This change can be reverted (see the mailing list and bootflags.c).
* There `is a report <https://bitbucket.org/hudson/magic-lantern/issue/211/550-t2i-seems-dead>`_ of Magic Lantern which seems to have damaged a 550D during installation. We are still investigating the problem, but it seems an `autoexec.bin` issue combined with card incompatibility. The `ML install log <https://bitbucket-assetroot.s3.amazonaws.com/hudson/magic-lantern/20101222/211/LOG000-failed.LOG>`_ indicates that Magic Lantern completed the installation procedure.
  
  There are also reports on CHDK forum that some users `bricked their 350D <http://chdk.setepontos.com/index.php?topic=4202.315>`_, most probably by installing a hack on the wrong firmware version. There are also lots of reports of camera refusing to boot after installing ML; this happens because they have tried to start the camera from a bootable (i.e. prepared) card without ``autoexec.bin``.
* Starting the camera with a bootable card without an ``autoexec.bin`` **will cause symptoms similar to a bricked one** (it will not boot). This may scare you. It it happens, **take the battery out quickly** and the camera should be fine. There are many reports about cameras which behave like being bricked, when in fact it was just ``autoexec.bin`` missing. That's why you should read the install instructions carefully.
* On certain cameras, there are power management issues (i.e. if you turn off the camera or let it go to standby, it won't start any more). Make sure you don't have these problems; if you do, take the battery out after each shooting session!
* Even if you don't have power issues, it's a good idea to take the battery out when you don't use the camera.
* The biggest risk is when experimenting with source code without knowing what you are doing. Calling certain functions or calling them at the wrong moment can be dangerous.
* Risks are low with pre-built binaries, since we test them on our cameras before making them public.
* Risks are minimal with official versions (from the main repo), since they get tested by many users before releasing them.

That being said, Magic Lantern for 550D was downloaded over 5000 times, and most users run it successfully and use it for production, not only for testing.

.

Source code
===========

You can build your own ``AUTOEXEC.BIN`` files with `the 550d branch of the 
source code <http://bitbucket.org/hudson/magic-lantern/overview>`_::

    hg clone -r 550d https://bitbucket.org/hudson/magic-lantern

There is **no** Canon source or object code in the Magic Lantern tree 
and we do **not** distribute ROM dumps since they contain code that is 
copyright by Canon. If you have the camera in hand, you can make your own 
dump for analysis and use `this IDC database 
<http://groups.google.com/group/ml-devel/browse_thread/thread/e134ff54ae181c36>`_
to add symbols to it.

If you want to compile your own ``AUTOEXEC.BIN``, check the following wiki pages:

* [[For Developers]]
* [[Build instructions/550D]]
* [[550d dev]]
back to top