Author Topic: Getting started with development  (Read 94596 times)

a1ex

  • Administrator
  • Hero Member
  • *****
  • Posts: 10320
  • 5D Mark Free
Getting started with development
« on: June 07, 2012, 12:55:48 PM »
Step 1. Get the source code
hg clone -u unified https://bitbucket.org/hudson/magic-lantern


Step 2. Get a compiler

2a -> pre-built toolchain (recommended: GCC 4.8.3)

2b -> pre-built VM if you feel lazy (Kudos to Anton2707) (User/Root password is 123456)
This VM seems to be currently off-line.  nikfreak has a VM available here.

2c -> Build the compiler yourself, like real hackers do

You may need to tweak the Makefile.user file, so it matches your compiler. By default, the Makefile is configured for the prebuilt toolchain:
Code: [Select]
ARM_ABI=none-eabi
ARM_PATH=~/gcc-arm-none-eabi-4_8-2013q4
GCC_VERSION=-4.8.3

Step 3. Start hacking

Code: [Select]
cd platform/550D.109
make clean && make zip

http://www.magiclantern.wikia.com/wiki/For_Developers

miyake

  • Developer
  • Senior
  • *****
  • Posts: 394
Re: Getting started with development
« Reply #1 on: July 23, 2012, 05:29:36 PM »
deleted

Alia5

  • Freshman
  • **
  • Posts: 99
  • 600D
Re: Getting started with development
« Reply #2 on: July 23, 2012, 11:10:39 PM »
I'm a litte bit scared of this line of the wiki
Run make and keep your fingers crossed!
make

This will compile a new autoexec.bin, which contains unencrypted ARM code, ready to brick your camera (God forbid...) See Build_instructions for next steps.

But on the Link wich leads me further I cant read anything that would help...

so it wont brick my camera? or what?

a1ex

  • Administrator
  • Hero Member
  • *****
  • Posts: 10320
  • 5D Mark Free
Re: Getting started with development
« Reply #3 on: July 23, 2012, 11:17:28 PM »
When you alter the source code you need to be much more careful that with things already tested for hundreds or thousands of hours.

See also http://magiclantern.wikia.com/wiki/Unbricking - it contains my mistakes and how I've fixed them.

Alia5

  • Freshman
  • **
  • Posts: 99
  • 600D
Re: Getting started with development
« Reply #4 on: July 23, 2012, 11:25:49 PM »
Alright, thanks a lot!

miyake

  • Developer
  • Senior
  • *****
  • Posts: 394
Re: Getting started with development
« Reply #5 on: July 24, 2012, 04:39:38 AM »
I'm understanding that is ML advantage is not changing boot sequence constantly.
Most cell phones hack is every time build boot sequence , So the brick risk is very high.
But ML change a boot sequence only one time which is installing.

So my understanding:
It's nothing to brick which is broken boot sequence installing with  changing only autoexec.bin .
BTW Cannon firmware does not solve invalid NVRAM config. So If we write a invalid config value from custom autoexec.bin , Canon firmware will not boot.(but recovery method available)

Anyway, anybody not guaranteed . At your own risk when you built your own built.
So you do not take a this risk. Use release version of ML

a1ex

  • Administrator
  • Hero Member
  • *****
  • Posts: 10320
  • 5D Mark Free
Re: Getting started with development
« Reply #6 on: July 24, 2012, 07:43:42 AM »
That's right. Except that ML does never overwrite executable bootloader code, it just sets a flag in the bootloader data area by calling a Canon function. This is a feature probably used by them for troubleshooting (hint: EOS_DEVELOP).

scrax

  • Developer
  • Hero Member
  • *****
  • Posts: 1417
  • Code monkey
Re: Getting started with development
« Reply #7 on: November 09, 2012, 07:06:50 AM »
I'm using ML2.3 for photography with:
EOS 600DML | EOS 400Dplus - EF 100mm f/2.8 USM Macro  - EF-S 17-85mm f4-5.6 IS USM - EF 70-200mm f/4 L USM - 580EXII - OsX Lion, Photoshop & Lightroom -no video experience- MLTools

dpham23

  • Just arrived
  • *
  • Posts: 1
Re: Getting started with development
« Reply #8 on: December 05, 2012, 09:20:56 PM »
How come I don't see a branch for the 5d Mark 3?

scrax

  • Developer
  • Hero Member
  • *****
  • Posts: 1417
  • Code monkey
Re: Getting started with development
« Reply #9 on: December 05, 2012, 10:57:55 PM »
it's all in the unified
I'm using ML2.3 for photography with:
EOS 600DML | EOS 400Dplus - EF 100mm f/2.8 USM Macro  - EF-S 17-85mm f4-5.6 IS USM - EF 70-200mm f/4 L USM - 580EXII - OsX Lion, Photoshop & Lightroom -no video experience- MLTools

NerveGas

  • New to the forum
  • *
  • Posts: 20
Re: Getting started with development
« Reply #10 on: March 03, 2013, 04:16:13 AM »
I have my own build compiled, before I turn on the boot flat with this file: how do i turn it off later on?

littlefooch

  • Just arrived
  • *
  • Posts: 1
Re: Getting started with development
« Reply #11 on: April 15, 2013, 02:44:42 PM »
Is anyone using Eclipse for ML development? 

Thanks

R

nanomad

  • Administrator
  • Hero Member
  • *****
  • Posts: 2918
  • All your websites are belong to us
Re: Getting started with development
« Reply #12 on: April 15, 2013, 03:32:24 PM »
I tried but there are so many platform-specific defines it's almost impossible. You need to use a custom makefile builder and specify the correct target
EOS 1100D | EOS 650 (No, I didn't forget the D) | Ye Olde Canon EF Lenses ('87): 50 f/1.8 - 28 f/2.8 - 70-210 f/4 | EF-S 18-55 f/3.5-5.6 | Metz 36 AF-5

deletedAcc.0021

  • Member
  • ***
  • Posts: 238
  • 600d x 4
Re: Getting started with development
« Reply #13 on: May 03, 2013, 02:31:19 PM »
any idea what is wrong here?  this is what I get when I run "make 600d"

C:\MLnew\magic-lantern>make 600d
process_begin: CreateProcess(NULL, date +%Y-%m-%d, ...) failed.
/usr/bin/sh: date: command not found
process_begin: CreateProcess(NULL, pwd, ...) failed.
make -C /platform/600D.102
make: *** /platform/600D.102: No such file or directory.  Stop.
make: *** [600d] Error 2

scrax

  • Developer
  • Hero Member
  • *****
  • Posts: 1417
  • Code monkey
Re: Getting started with development
« Reply #14 on: May 03, 2013, 02:33:51 PM »
try:
make 600D

with the uppercase D

and are you in the source folder when launcing this command? I've no experience on win so not sure if that's the problem
I'm using ML2.3 for photography with:
EOS 600DML | EOS 400Dplus - EF 100mm f/2.8 USM Macro  - EF-S 17-85mm f4-5.6 IS USM - EF 70-200mm f/4 L USM - 580EXII - OsX Lion, Photoshop & Lightroom -no video experience- MLTools

nanomad

  • Administrator
  • Hero Member
  • *****
  • Posts: 2918
  • All your websites are belong to us
Re: Getting started with development
« Reply #15 on: May 03, 2013, 02:46:19 PM »
any idea what is wrong here?  this is what I get when I run "make 600d"

C:\MLnew\magic-lantern>make 600d
process_begin: CreateProcess(NULL, date +%Y-%m-%d, ...) failed.
/usr/bin/sh: date: command not found
process_begin: CreateProcess(NULL, pwd, ...) failed.
make -C /platform/600D.102
make: *** /platform/600D.102: No such file or directory.  Stop.
make: *** [600d] Error 2

Windows, good luck :P
EOS 1100D | EOS 650 (No, I didn't forget the D) | Ye Olde Canon EF Lenses ('87): 50 f/1.8 - 28 f/2.8 - 70-210 f/4 | EF-S 18-55 f/3.5-5.6 | Metz 36 AF-5

deletedAcc.0021

  • Member
  • ***
  • Posts: 238
  • 600d x 4
Re: Getting started with development
« Reply #16 on: May 03, 2013, 03:33:41 PM »
tried the upper case D .. same error.  I think it might be an error in Makefile.user

my windows path to yagarto is: c:/yagarto, so would it be the same in makefile.user or with the ~


# Path-related stuff
# for yagarto or the official ARM toolchain use ARM_ABI=none-eabi otherwise use ARM_ABI=elf
CCACHE=ccache
ARM_ABI=none-eabi
ARM_PATH=~/yagarto
ARM_BINPATH=$(ARM_PATH)/bin/arm-none-eabi-gcc-4.7.2
#GCC_VERSION=4.7.2
#OBJCOPY=$(ARM_BINPATH)/arm-$(ARM_ABI)-objcopy
#AR=$(ARM_BINPATH)/arm-$(ARM_ABI)-ar
#RANLIB=$(ARM_BINPATH)/arm-$(ARM_ABI)-ranlib
#READELF=$(ARM_BINPATH)/arm-$(ARM_ABI)-readelf

scrax

  • Developer
  • Hero Member
  • *****
  • Posts: 1417
  • Code monkey
Re: Getting started with development
« Reply #17 on: May 03, 2013, 03:38:33 PM »
yes, try to put the full address with c: instead of the ~
I'm using ML2.3 for photography with:
EOS 600DML | EOS 400Dplus - EF 100mm f/2.8 USM Macro  - EF-S 17-85mm f4-5.6 IS USM - EF 70-200mm f/4 L USM - 580EXII - OsX Lion, Photoshop & Lightroom -no video experience- MLTools

deletedAcc.0021

  • Member
  • ***
  • Posts: 238
  • 600d x 4
Re: Getting started with development
« Reply #18 on: May 03, 2013, 03:42:36 PM »
tried both ways, no difference.

double checked the ARM path, BINPath and version ... all correct.


deletedAcc.0021

  • Member
  • ***
  • Posts: 238
  • 600d x 4
Re: Getting started with development
« Reply #19 on: May 03, 2013, 03:45:19 PM »
I also installed Yagarto Tools, so I would have "make" ... should that path be in the Makefile.user also? And if so where?

RenatoPhoto

  • Moderators
  • Hero Member
  • *****
  • Posts: 1509
  • 5DM3 / 7D
Re: Getting started with development
« Reply #20 on: May 03, 2013, 04:20:19 PM »
I also installed Yagarto Tools, so I would have "make" ... should that path be in the Makefile.user also? And if so where?

Here is the link to the windows installation guide by Pel

http://www.magiclantern.fm/forum/index.php?topic=2899.msg14021#msg14021

Also note my Makefile.user user for windows here

http://www.magiclantern.fm/forum/index.php?topic=2899.msg31741#msg31741
http://www.pululahuahostal.com  |  EF 300 f/4, EF 100-400 L, EF 180 L, EF-S 10-22, Samyang 14mm, Sigma 28mm EX DG, Sigma 8mm 1:3.5 EX DG, EF 50mm 1:1.8 II, EF 1.4X II, Kenko C-AF 2X

dlrpgmsvc

  • Senior
  • ****
  • Posts: 398
  • The 7D and 50D Robin Hood
Re: Getting started with development
« Reply #21 on: May 17, 2013, 05:44:59 PM »
Now i can compile ! But what is the procedure to put my modifications online as a "pull request" ? Many thanks !  :P
If you think it's impossible, you have lost beforehand

nanomad

  • Administrator
  • Hero Member
  • *****
  • Posts: 2918
  • All your websites are belong to us
Re: Getting started with development
« Reply #22 on: May 18, 2013, 02:03:08 AM »
Now i can compile ! But what is the procedure to put my modifications online as a "pull request" ? Many thanks !  :P
After you fork the repo on bitbucket.org you can push your changes to it and then click on the pull request button
EOS 1100D | EOS 650 (No, I didn't forget the D) | Ye Olde Canon EF Lenses ('87): 50 f/1.8 - 28 f/2.8 - 70-210 f/4 | EF-S 18-55 f/3.5-5.6 | Metz 36 AF-5

dlrpgmsvc

  • Senior
  • ****
  • Posts: 398
  • The 7D and 50D Robin Hood
Re: Getting started with development
« Reply #23 on: May 18, 2013, 02:02:51 PM »
Many thanks, Nanomad ! But now I cannot find how to sync my pc local sources with BitBucket sources on my fork repository. I have found "download" but it's for only one file at-a-time. I found "Import/Export" but it's only for "issues". How can I proceed ? Many thanks again !
If you think it's impossible, you have lost beforehand

nanomad

  • Administrator
  • Hero Member
  • *****
  • Posts: 2918
  • All your websites are belong to us
EOS 1100D | EOS 650 (No, I didn't forget the D) | Ye Olde Canon EF Lenses ('87): 50 f/1.8 - 28 f/2.8 - 70-210 f/4 | EF-S 18-55 f/3.5-5.6 | Metz 36 AF-5