MLV Lite - The sweet taste of MLV with none of the extra calories™

Lua scripting updated


Twitter: @autoexec_bin    Facebook: magiclantern.firmware    Live chat: [email protected]

Want to help with Magic Lantern development, but have no coding skills?

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



a1ex

  • Administrator
  • Hero Member
  • *****
  • Posts: 8609
  • 5D Mark Free
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!


« Last Edit: April 01, 2015, 10:54:50 PM by a1ex »

Audionut

  • Moderators
  • Hero Member
  • *****
  • Posts: 3265
  • I have a 1Dx, I'm awesome.
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: 2268
  • 5D3 / M1 / 7D / 70D / SL1
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, EOS-M, 7D, 70D.111B & 100D.100A ¶ 6.5 3.5 (Opteka APS-C), 14 T3.1 (Rokinon), 16-35L II, 22 STM, 2.8 D (Nikkor), 24 Pancake, 40 Pancake, 50 1.4 AI (Nikkor), 50L, 55 3.5 (Micro-Nikkor), 105 2.5 PC (Nikkor), 24-105L, 200 4 AI (Nikkor), 75-300 4-5.6 ¶ DIY Slider ¶ Sticks & Heads

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

  • New to the forum
  • *
  • Posts: 39
Re: Linux on your Canon DSLR? Why not?
« Reply #4 on: April 01, 2015, 08:49:43 AM »
1. April? :/
« Last Edit: April 01, 2015, 08:53:55 AM by rbrune »

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!
« Last Edit: April 01, 2015, 03:11:31 PM by vroem »

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

  • New to the forum
  • *
  • Posts: 39
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

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

Danne

  • Hero Member
  • *****
  • Posts: 2132
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: 794
  • 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: 8609
  • 5D Mark Free
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: 4
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 (06 April 2015)

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?


Walter Schulz

  • Hero Member
  • *****
  • Posts: 4647
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: 2701
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

Walter Schulz

  • Hero Member
  • *****
  • Posts: 4647
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: 2701
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.

Walter Schulz

  • Hero Member
  • *****
  • Posts: 4647
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 ...
« Last Edit: April 01, 2015, 10:32:20 PM by Walter Schulz »

Greg

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

rbrune

  • New to the forum
  • *
  • Posts: 39
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

  • Hero Member
  • *****
  • Posts: 720
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.111A & 100D.100B

 

courtesy