# Magic Lantern Boots Linux on Canon DSLR



## Canon Rumors Guy (Apr 2, 2015)

```
<iframe src="https://www.youtube.com/embed/IcBEG-g5cJg" width="100%" height="390" frameborder="0" allowfullscreen="allowfullscreen"></iframe></p>
<p>We saw this yesterday and thought it could potentially be a joke, so we didn’t bother posting it. However, it looks like it’s still true today.</p>
<p>The folks at Magic Lantern have booted the Linux kernel on a Canon DSLR.</p>
<p>FROM MAGIC LANTERN:</p>
<p>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!</p>
<ul>
<li>It is portable, the same binary runs on all ML-enabled cameras (confirmed for 60D, 600D, 7D, 5D2 and 5D3)</li>
<li>Allocates all available RAM</li>
<li>Prints debug messages on the camera screen</li>
<li>Sets up timer interrupts for scheduling</li>
<li>Mounts a 8 MiB ext2fs initial ramdisk</li>
<li>Starts /bin/init from the initrd</li>
<li>Shis init process is a selfcontained, libc-less hello world</li>
<li>Next step: build userspace binaries (GUI, etc)</li>
</ul>
<p><a href="http://www.magiclantern.fm/forum/index.php?topic=14847" target="_blank">Read more at Magic Lantern</a></p>
```


----------



## lintoni (Apr 2, 2015)

The implications of where this could end up, the possibilities... let's hope this goes somewhere useful!


----------



## sanj (Apr 2, 2015)

I thought this site was in English. Why suddenly Latin???


----------



## cosmopotter (Apr 2, 2015)

Can somebody explain the significance of this achievement?

My guess is that it opens up the possibility of writing operating system software from the ground up rather than the current ML method of operating WITHIN the Canon OS.

Is that correct?


----------



## gsealy (Apr 2, 2015)

It will be interesting to see how things work out. As I understand things the camera boots the OS from the SD card rather than from the firmware. So the Canon OS is completely out of the picture. I am thinking then this is a replacement rather then playing nice in the Canon OS address space as ML has done so far. Once the Linux OS framework is in place then it becomes a matter of addressing and using the peripherals. It will take time to get the job done, but it seems possible. 

It would be wonderful if the life of the cameras could be extended in this manner. Many people paid $3500 for a 5DIII, for example. Even getting 10 bit video out of it on the HDMI port is an improvement. We will see.


----------



## gsealy (Apr 2, 2015)

cosmopotter said:


> Can somebody explain the significance of this achievement?
> 
> My guess is that it opens up the possibility of writing operating system software from the ground up rather than the current ML method of operating WITHIN the Canon OS.
> 
> Is that correct?



That is the way I see it.


----------



## mackguyver (Apr 2, 2015)

gsealy said:


> cosmopotter said:
> 
> 
> > Can somebody explain the significance of this achievement?
> ...


Maybe, though we'll probably just end up with a YouTube video of people playing video games (on their DSLR) like most of these device firmware hacks


----------



## gsealy (Apr 2, 2015)

mackguyver said:


> gsealy said:
> 
> 
> > cosmopotter said:
> ...



One thing that strikes me is that it is not necessary that there is only one version of the software. For example, if the user is only going to shoot stills, then load those libraries that provide enhanced capabilities for that. Leave video capability completely out of it. If a person is going to shoot video, then load in only the video libraries that day. Doing this conserves memory and it allows both stills and videos capability to be better developed.


----------



## gsealy (Apr 2, 2015)

One other thing -- the 5DIII sensor is 5760 × 3840, which is large enough to capture 4K. If they could develop software to shoot 4K and store it in some manner (maybe even to an Atomos), then that software would sell like hotcakes even at $500+. ML could recoup their investment in no time. The thing about the Atomos is that it has peaking and other capabilities built into the unit so initially those features would not have to be created in the camera's onboard software. (Just thinking out loud, sorry.)


----------



## cosmopotter (Apr 2, 2015)

It would be nice if ML made an OS that could be burned to the FPGA to just hijack the entire camera and free up the memory cards for their intended use... assuming there are FPGA chips in current DSLR's.


----------



## gsealy (Apr 2, 2015)

cosmopotter said:


> It would be nice if ML made an OS that could be burned to the FPGA to just hijack the entire camera and free up the memory cards for their intended use... assuming there are FPGA chips in current DSLR's.



I am thinking that once the software gets solid and reliable enough then the firmware itself could be replaced. Then, yes, the cards could be used as intended. The thing is with the new Canon cameras emerging this year, then the 5DIII will become cheaper and cheaper. Users will be less inhibited to replace the OS.


----------



## Marsu42 (Apr 2, 2015)

mackguyver said:


> Maybe, though we'll probably just end up with a YouTube video of people playing video games (on their DSLR) like most of these device firmware hacks



There's already an Arkanoid and Sokoban game module for ML, so I'm excited they've managed to port Linux to it now since yesterday.

It was always a possibility as the arm core of the DIGIC is well known, the only reason Canon runs their proprietary DryOS is that they didn't want to pay any more fees for a Unix-like 3rd party port and Linux is too big for the limited feature set Canon implements.

I'm excited what new possibilities this will bring to every Canon camera (except the 1d, that is).


----------



## Schmave (Apr 2, 2015)

cosmopotter said:


> It would be nice if ML made an OS that could be burned to the FPGA to just hijack the entire camera and free up the memory cards for their intended use... assuming there are FPGA chips in current DSLR's.



I'm pretty sure there are no FPGAs in any Canon DSLRs. They would be much more expensive and much lower performance (and higher power) than a dedicated ASIC, which we know they have in their DIGIC processors. Besides, by definition an OS is software code that runs on a processor, so I don't know how an FPGA would fit into this...


----------



## Denisb (Apr 2, 2015)

sanj said:


> I thought this site was in English. Why suddenly Latin???


in quodam loco quis ?


----------



## Denisb (Apr 2, 2015)

So if you can boot Linux on a EOS Camera you can boot Android. And then you can use all the photo / video softwares including Photoshop and obviously InStaGrAm directly on the camera. I hope camera with touchscreen and wifi like the *MY* 70d will get there soon.


----------



## the.unkle.george (Apr 2, 2015)

> 'm pretty sure there are no FPGAs in any Canon DSLRs.



There's not enough volume in DSLRs for custom ASIC. The 7dmII has a Xilinx Spartan 6 FPGA.
http://www.lensrentals.com/blog/media/2014/11/7d2camerabacksml-1024x793.jpg


This is a pretty amazing achievement. It opens the doors to much more direct control over the camera and warranty voiding.


----------



## m (Apr 2, 2015)

sudo apt-get install gimp


----------



## Schmave (Apr 2, 2015)

the.unkle.george said:


> > 'm pretty sure there are no FPGAs in any Canon DSLRs.
> 
> 
> 
> ...



Well I'll be darned. I wonder what they're using it for. It looks like it's on the other side of the board opposite where the sensor is, so maybe they are using it to do something with the digitized data before it goes to the DIGIC processors. I can't make out which version of Spartan 6 it is but depending on which model it could be anywhere from a few $10's to a couple hundred dollars for the FPGA (I'm guessing it's on the lower end of the price range). Interesting.


----------



## gsealy (Apr 3, 2015)

Just saying -- if you go on the ML site, they are saying they are just doing this for 'fun' and they have no goals. I am a software engineer and I can perhaps see their perspective. But to me, having "no goals" also means "don't expect much."


----------



## Berowne (Apr 3, 2015)

m said:


> sudo apt-get install gimp



chmod ugo=rwx Canon OS


----------



## Machaon (Apr 3, 2015)

Awesome. The sky (hardware) is the limit...


----------



## msm (Apr 3, 2015)

Cool now all we need is the ability to connect a keyboard and a mouse and to direct the output to HDMI so it can replace our PCs.


----------

