Magic Lantern Boots Linux on Canon DSLR’s? Really?

by Hugh BrownstoneLeave a Comment

Now we know what it feels like when someone writes something on April Fool’s Day and we can’t tell whether it’s true or not. You don’t mess with the Zohan, and you don’t mess with Magic Lantern on April 1st.

We saw the post, but we were still giddy with our own April Fool’s antics and dismissed as another April Fool’s joke the news that Magic Lantern had been able to boot Linux on a bunch of Canon DSLRs, from a 600D up to and including the 5D Mark III.

I mean: come on! April 1st? Linux?

For those of you who don’t know, Linux is a full-blown, open source operating system that is used to run more bad boy supercomputers like IBM’s Blue Gene/L and Thunder than any other – including Unix itself.

What the heck would it be doing on a Canon 600D?

We read the entire thread on the Magic Lantern forum – twice.  We saw that a number of contributors – including a senior guy or two – assumed it was a joke, too.

Still, this is Magic Lantern: they’ve done amazing stuff, and they’re working with another favorite project of ours, the apertus° AXIOM open source cinema camera. [bctt tweet=”Running LINUX on Canon DSLRs? Really?”]

And other contributors wrote that they were busy toiling away trying to get it to work themselves.

Finally, the ML forum administrator updated the original post to write point blank: “this is not a fake!

Even then, we had our suspicions: either it was true, or they were a merry gang of pranksters — and at this point, either would be impressive.

So we sat on the story until we could check in with our own deep throat source at Magic Lantern.

Our source says it’s real.

But to what end?

And there’s the rub for planet5D readers: it’s too early to tell how something like this could yield an end-user benefit as simple for photographers and videographers (including us) to grasp as audio meters, a headphone jack, trap focus, HDR, and the so many other functions Magic Lantern has given us over the years.

4K? Can’t confirm.

But you don’t mess with the Zohan, and you shouldn’t underestimate what the Magic Lantern community can do.

We don't.

[Magic Lantern] Booting Linux Kernel 3.19 on Canon EOS DSLRs

Canon Rumors: Magic Lantern Boots Linux on Canon DSLR

Magic Lantern Boots Linux on Canon DSLR

Snap from the video


From Magic Lantern:

We took the latest Linux kernel (3.19) and did the first steps to port it. As we have nearly zero experience with kernel development, we didn’t get too far, but we can present a proof of concept implementation that boots the Linux kernel 3.19 on Canon EOS DSLR cameras!

* It is portable, the same binary runs on all ML-enabled cameras (confirmed for 60D, 600D, 7D, 5D2 and 5D3)

* Allocates all available RAM

* Prints debug messages on the camera screen

* Sets up timer interrupts for scheduling

* Mounts a 8 MiB ext2fs initial ramdisk

* Starts /bin/init from the initrd

* Shis init process is a selfcontained, libc-less hello world

* Next step: build userspace binaries (GUI, etc)

Read more at Magic Lantern

What might this add to Canon camera functionality? More from Alex:

Does it really have to be a goal? Some people tend to forget that we are doing all this for fun.

The biggest immediate gain for us is a deeper understanding of camera internals (for now: interrupts, timers, MPU communication, bootloader routines, and portable code that runs on all cameras).

At some point, we hope to be able to intercept buttons (which requires a good understanding of MPU communication). We might be able to drive the sensor and take a picture as well, but I wouldn't bet on it (it may take anywhere between a few weeks and several years, and I wouldn't call it “the goal”). A related quest is to emulate the entire Canon firmware in QEMU – again, with no immediate benefit for regular users.

MPU communication is quite useful – there have been some feature requests about changing focus or aperture during a long exposure. If there's a way to do it, that would be via MPU.

About direct sensor access: we can already do whatever we want with it from playback mode, because Canon code does not use the sensor there. No need to run a custom OS for that. But since we don't know how to drive the sensor, we have no feature that makes use of this yet.

We also hope to attract more developers to the project. By running a separate OS, the risks of soft-bricking your camera with bad code are much lower than with a user task running on top of Canon firmware. Why? because Canon code saves settings periodically, by reflashing the ROM. Since we have no MMU, a out-of-range write (or invalid pointer) and some bad luck can be enough to cause Canon code to write gibberish in their settings area. Just ask @chris_overseas what happened with his 5D3 recently.

@kitor: keep an eye on the display thread, I'll build a binary for that first. The display code did not work on 5D classic (also a VxWorks camera), so…

Source: Canon Rumors

(cover photo credit: snap from the video)

Leave a Comment