Author Topic: Linux on your Canon DSLR? Why not?  (Read 204254 times)

a1ex

  • Administrator
  • Hero Member
  • *****
  • Posts: 12564
Linux on your Canon DSLR? Why not?
« on: April 01, 2015, 08:00:24 AM »
We, the Magic Lantern Team, are very proud to present you a new milestone in DSLR customization!

LINUX ON CANON EOS CAMERAS!

(edit: after playing a game, making it look like an April's fool, we can ensure: this is not a fake!)

Starting from our recent discovery about display access from bootloader, we thought, hey, we could now have full control of the resources from this embedded computer. At this stage, we knew what kind of ARM processor we have (ARM 946E-S), how much RAM we have (256MB/512MB depending on the model), how to print things on the display (portable code), how to handle timers and interrupts, how to do low-level SD card access on select models (600D and 5D3), and had a rough idea where to start looking for button events.

So, why not trying to run a different operating system?

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
- this init process is a selfcontained, libc-less hello world
- next step: build userspace binaries (GUI, etc)

Demo video:

Download: autoexec.bin

Source code (WIP): https://bitbucket.org/hudson/magic-lantern/branch/linux-bootloader

We hope this proof of concept will encourage you to tinker more with your new embedded computer. Maybe you want to run Angry Birds on it, or maybe Gimp? :)

Enjoy!



Audionut

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 3657
  • Blunt and to the point
Re: Linux on your Canon DSLR? Why not?
« Reply #1 on: April 01, 2015, 08:31:29 AM »
This opens up so many possibilities.  Just wow!

DeafEyeJedi

  • Hero Member
  • *****
  • Posts: 3413
  • 5D3 | M1 | 7D | 70D | SL1 | M2 | 50D
Re: Linux on your Canon DSLR? Why not?
« Reply #2 on: April 01, 2015, 08:38:16 AM »
Definitely another pipe dream coming true for many!
5D3.113 | 5D3.123 | EOSM.203 | 7D.203 | 70D.112 | 100D.101 | EOSM2.* | 50D.109

edilson

  • New to the forum
  • *
  • Posts: 4
Re: Linux on your Canon DSLR? Why not?
« Reply #3 on: April 01, 2015, 08:48:26 AM »
I've just notice that I haven't had an properly account yet --
anyway ... just had to comment this great new, it's amazing! Thanks for share ;)
 :D :D
ML on 500D.111 (Other cameras: 5D3 - 6D - 50D)
My photography channel is 'Sobre Foto': YouTubeInstagram  Facebook - Twitter

rbrune

  • Contributor
  • Freshman
  • *****
  • Posts: 64
Re: Linux on your Canon DSLR? Why not?
« Reply #4 on: April 01, 2015, 08:49:43 AM »
1. April? :/

vroem

  • New to the forum
  • *
  • Posts: 41
Re: Linux on your Canon DSLR? Why not?
« Reply #5 on: April 01, 2015, 09:04:06 AM »
If this is as true as you seem to imply on Twitter, you sure chose a great day to announce it!

edilson

  • New to the forum
  • *
  • Posts: 4
Re: Linux on your Canon DSLR? Why not?
« Reply #6 on: April 01, 2015, 09:07:49 AM »
hahaha
yes ... inopportune day to announce
ML on 500D.111 (Other cameras: 5D3 - 6D - 50D)
My photography channel is 'Sobre Foto': YouTubeInstagram  Facebook - Twitter

rbrune

  • Contributor
  • Freshman
  • *****
  • Posts: 64
Re: Linux on your Canon DSLR? Why not?
« Reply #7 on: April 01, 2015, 09:31:51 AM »
If it is real: how much do we know about the usb interface chip?
It would be great to get something like adb working to have an interactive shell.

Walter Schulz

  • Contributor
  • Hero Member
  • *****
  • Posts: 8828
Re: Linux on your Canon DSLR? Why not?
« Reply #8 on: April 01, 2015, 09:38:21 AM »
Playing with expections: Boss level!

Danne

  • Developer
  • Hero Member
  • *****
  • Posts: 7739
Re: Linux on your Canon DSLR? Why not?
« Reply #9 on: April 01, 2015, 10:07:04 AM »
Awesome. Now we can run exiftool straight in the cam  :P

ItsMeLenny

  • Hero Member
  • *****
  • Posts: 930
  • 550D
Re: Linux on your Canon DSLR? Why not?
« Reply #10 on: April 01, 2015, 10:28:02 AM »
It's quite easy to tell that this whole video is computer generated.
And if you read closely what is written on the SD card it says "April Fools".

a1ex

  • Administrator
  • Hero Member
  • *****
  • Posts: 12564
Re: Linux on your Canon DSLR? Why not?
« Reply #11 on: April 01, 2015, 03:06:32 PM »
If you are not exactly a Linux fan, you might want to try this: http://www.magiclantern.fm/forum/index.php?topic=14853

nitrosito

  • New to the forum
  • *
  • Posts: 13
Re: Linux on your Canon DSLR? Why not?
« Reply #12 on: April 01, 2015, 03:17:32 PM »
WOW! Congrulations! This is big!

Excelent notice

thearczoro

  • New to the forum
  • *
  • Posts: 12
  • Eggless
Re: Linux on your Canon DSLR? Why not?
« Reply #13 on: April 01, 2015, 03:47:56 PM »
Hhhmm... That would be awesome.  ;)
Camera: Canon 500D
FW: 1.1.1
ML: Nightly (4 October 2017)

insippo

  • Just arrived
  • *
  • Posts: 1
Re: Linux on your Canon DSLR? Why not?
« Reply #14 on: April 01, 2015, 05:57:59 PM »
great. I can use facebook with my d600

tob

  • New to the forum
  • *
  • Posts: 21
Re: Linux on your Canon DSLR? Why not?
« Reply #15 on: April 01, 2015, 06:39:59 PM »
April fool?

g3gg0

  • Developer
  • Hero Member
  • *****
  • Posts: 3190
Re: Linux on your Canon DSLR? Why not?
« Reply #16 on: April 01, 2015, 09:42:06 PM »
should i be honest?
Help us with datasheets - Help us with register dumps
magic lantern: 1Magic9991E1eWbGvrsx186GovYCXFbppY, server expenses: paypal@g3gg0.de
ONLY donate for things we have done, not for things you expect!

Walter Schulz

  • Contributor
  • Hero Member
  • *****
  • Posts: 8828
Re: Linux on your Canon DSLR? Why not?
« Reply #17 on: April 01, 2015, 09:45:28 PM »
Where is the fun in that?

g3gg0

  • Developer
  • Hero Member
  • *****
  • Posts: 3190
Re: Linux on your Canon DSLR? Why not?
« Reply #18 on: April 01, 2015, 10:02:01 PM »
we had enough fun seeing responses that were somewhere between "AMAZING!" and "haa, haa...."

so.. enjoy the demo. we had fun with creating it :)
you will be the first ones who boot linux on their DSLR.
and i hope there will be some more soon :)



we updated the first post, check it
Help us with datasheets - Help us with register dumps
magic lantern: 1Magic9991E1eWbGvrsx186GovYCXFbppY, server expenses: paypal@g3gg0.de
ONLY donate for things we have done, not for things you expect!

Walter Schulz

  • Contributor
  • Hero Member
  • *****
  • Posts: 8828
Re: Linux on your Canon DSLR? Why not?
« Reply #19 on: April 01, 2015, 10:15:50 PM »
Ok, I tried it on 7D and had Linux running and my first kernel panic on DSLR.




g3gg0

  • Developer
  • Hero Member
  • *****
  • Posts: 3190
Re: Linux on your Canon DSLR? Why not?
« Reply #20 on: April 01, 2015, 10:17:32 PM »
see, you are one of the first people ever having a kernel panic on the 7D.
very few people can tell this :)

the kernel panic is due to my hackish "init" process, that only prints a "hello world", exiting back to kernel.
thats a good thing.
Help us with datasheets - Help us with register dumps
magic lantern: 1Magic9991E1eWbGvrsx186GovYCXFbppY, server expenses: paypal@g3gg0.de
ONLY donate for things we have done, not for things you expect!

Walter Schulz

  • Contributor
  • Hero Member
  • *****
  • Posts: 8828
Re: Linux on your Canon DSLR? Why not?
« Reply #21 on: April 01, 2015, 10:24:37 PM »
Yes, first person officially reporting 7D with kernel panic!
And 650D, too.

Not that much Endorphin released, though!

On second thought: This is pretty much "Alice's Adventures in Wonderland" opening the door after falling down the rabbit hole. I cannot imagine all the options ...

Greg

  • Contributor
  • Hero Member
  • *****
  • Posts: 607
Re: Linux on your Canon DSLR? Why not?
« Reply #22 on: April 01, 2015, 10:27:40 PM »
500D

rbrune

  • Contributor
  • Freshman
  • *****
  • Posts: 64
Re: Linux on your Canon DSLR? Why not?
« Reply #23 on: April 01, 2015, 11:15:12 PM »
EOS-M also seems to boot it.

Is there already a git/hg for kernel/initrd/userspace set up?

nikfreak

  • Developer
  • Hero Member
  • *****
  • Posts: 1197
Re: Linux on your Canon DSLR? Why not?
« Reply #24 on: April 01, 2015, 11:34:14 PM »
pranked by BSOD but this autoexec doesn't even power on 70D.
70D.112 & 100D.101