Step 1. Get the source codehg clone -u unified
https://bitbucket.org/hudson/magic-lanternStep 2. Get a compiler
2a ->
pre-built toolchain from gcc-arm-embedded (preferred 5_4-2016q3, but any other version should work)
Manual toolchain setup should be straightforward on
Linux,
Mac and
Windows Subsystem for Linux.
General instructions:Either unzip the downloaded toolchain in your HOME directory (for example, you may get ~/gcc-arm-none-eabi-5_4-2016q3/bin/arm-none-eabi-gcc), or install a package that provides arm-none-eabi-gcc and make sure it's in your executable PATH. That way, the compiler will be picked up by our Makefiles without additional tweaking.
Ubuntu: package gcc-arm-none-eabi (older) or gcc-arm-embedded from ppa:team-gcc-arm-embedded/ppa (latest). Or just unzip the downloaded toolchain into your HOME directory if you prefer to avoid a system-wide installation.
Mac: the easiest way is probably
this tutorial from Daniel Fort, but manual setup should work just as well.
Windows 10 WSL is known to require some tweaking (such as installing an X server for QEMU), but generally works well.
Windows (native, without WSL): you may install
Cygwin (but make sure there are no spaces in your username). For Windows XP you will have to use an older version of Cygwin, but other than that, it should work without much trouble.
2b ->
QEMU installation script will download the recommended toolchain and install it for you.
This method is recommended for
Ubuntu,
Mac and
Win10 WSL; other Linux distros may require additional tweaking.
Besides setting up and compiling QEMU, this script also installs the ARM compiler and debugger, and will provide an environment to run your camera firmware and Magic Lantern in the emulator (very useful for debugging and reverse engineering -
check out the guide).
Videos: for Ubuntu and Mac (todo: WSL and native Windows).

To run QEMU install script:
hg clone https://bitbucket.org/hudson/magic-lantern
cd magic-lantern
hg up qemu -C
cd contrib/qemu
./install.sh
2c ->
Linaro bare-metal toolchain should also work (use ARM_ABI=eabi in Makefile.user).
2d ->
pre-built VM if you feel lazy (Kudos to
Anton2707)
(User/Root password is 123456)Also, nikfreak has a VM available
here (with ARM-console preinstalled).
Note: these VMs are old and do not have the latest bells and whistles (QEMU etc), but these should be easy to install.
2e ->
Docker (experimental, feedback welcome if you decide to try it)
2f ->
Build the compiler yourself.
Step 3. Start hackinghg up unified -C
cd platform/550D.109
make clean && make zip
make install
make install_qemu
Useful branches- unified (mainline)
-
Experiments section on the download page (WIP stuff)
-
Pull requests on Bitbucket (same)
-
All branches (lots of unfinished work and experiments)
-
crop_rec_4k (4K recording and lossless compression, very bleeding edge)
-
dm-spy-experiments (logging tools for reverse engineering)
-
iso-research (CMOS/ADTG ISO experiments, adtg_gui, raw_diag)
-
qemu (camera firmware emulation)
- new-sound-system (experimental audio controls for DIGIC 5)
- 1200D, 1300D, 100D_merge_fw101, 70D_merge_fw112, 5Ds_experiments etc (ports in progress)
- vxworks (450D, 40D, other oldies are welcome); vxworks-dm-spy (logging)
- digic6-dumper (80D, 750D, 7D2 etc)
- recovery (experiments running from bootloader context, mostly diagnostics or ROM dumping)
Useful stuff-
Writing modules tutorial #1: Hello, World!-
How can I run Magic Lantern in QEMU? (aka QEMU guide)
-
EOS firmware in QEMU - development and reverse engineering guide (must read for understanding how the firmware works)
- Notes on old wiki:
http://www.magiclantern.wikia.com/wiki/For_Developers- Using WiFi SD (
FlashAir and
Transcend) to avoid swapping the card back and forth
- Speed up compilation:
export MAKEFLAGS="-j8" # parallel build
make install ML_MODULES="lua ettr" # only compile the modules you are interested in
- Examine ASM code: tag a function with DUMP_ASM, then run: make dump_asm
-
Stack trace in crash logs
-
Submitting a pull request