Author Topic: Compiling the installer FIR from source  (Read 7840 times)

kurthis

  • New to the forum
  • *
  • Posts: 8
Compiling the installer FIR from source
« on: July 08, 2012, 07:42:41 PM »
Hi!

I have the ARM toolchain up and running, so compiling the autoexec.bin works like a charm... But I fail compiling the installer FIR. The point where it fails is where the makefile tries to access the python script build_fir.py in the dumper directory. The directory just not exists ;)

If it's meant to be that way, I'll just wait. If it's my own fault not being able to compile it, any help would be appreciated.

TIA

a1ex

  • Administrator
  • Hero Member
  • *****
  • Posts: 12391
Re: Compiling the installer FIR from source
« Reply #1 on: July 08, 2012, 07:56:18 PM »
The tools for compiling the FIRs are not public.

kurthis

  • New to the forum
  • *
  • Posts: 8
Re: Compiling the installer FIR from source
« Reply #2 on: July 08, 2012, 07:57:35 PM »
Ok, that explains it well enough ;P

Thanks

BiX

  • New to the forum
  • *
  • Posts: 4
Re: Compiling the installer FIR from source
« Reply #3 on: July 13, 2012, 05:24:25 PM »
Hi,
the fact that the Canon AES keys are not published is understandable. But to want to know what does something we cannot see (the FIR) is also understable  :)
Correct me if I'm wrong, but it seems the FIR calls autoexec.bin (which does basically a copy_and_restart()), so we would have all the code (besides the keys) and thus know what happens when user does 'update'?

Since I'm here, and with apologies if it is already mentioned somewhere in the wiki, is there an emulator somewhere?
(sounds difficult to code blindly and test only from the 5D2 directly  :P )

a1ex

  • Administrator
  • Hero Member
  • *****
  • Posts: 12391
Re: Compiling the installer FIR from source
« Reply #4 on: July 13, 2012, 05:28:36 PM »
The source code for the FIR is in the installer directory (and installer.c in src). You can compile it as an autoexec.bin and run it without having to sign it as FIR.

Of course, this is possible after you enable the bootflag with the FIR provided by us.

coutts

  • Developer
  • Senior
  • *****
  • Posts: 401
Re: Compiling the installer FIR from source
« Reply #5 on: July 23, 2012, 02:04:19 PM »
Here is some info for packing FIR files for older cameras (mostly what I've dealt with in my time working on ML, no idea about newer cameras). It could give you an idea of what goes into it:

http://magiclantern.wikia.com/wiki/Packing_FIR_Files

It can be a lot of work to compile a new FIR just to test a new small change, so this is why we enable the bootflag in the camera and use an autoexec.bin file. It doesn't need to be signed like a FIR file, and boots automatically unlike a FIR file.

vtrandal

  • New to the forum
  • *
  • Posts: 44
Re: Compiling the installer FIR from source
« Reply #6 on: July 31, 2012, 01:27:07 PM »
This is the most informative thread I have read regarding Magic Lantern development. For us non-developers the tools that are available to us compile the code to an autoexec.bin file? It also generates a magiclantern.bin file. What's that for?

From what I have read in this thread I assume that after successfully installing ML 2.3, I can then replace the autoexec.bin on my SD card with the freshly built autoexec.bin for my T3i (600D) to test it? Do I leave everything else on the SD card as is?

scrax

  • Contributor
  • Hero Member
  • *****
  • Posts: 1543
  • Code monkey
Re: Compiling the installer FIR from source
« Reply #7 on: August 06, 2012, 07:29:53 PM »
This is the most informative thread I have read regarding Magic Lantern development. For us non-developers the tools that are available to us compile the code to an autoexec.bin file? It also generates a magiclantern.bin file. What's that for?

From what I have read in this thread I assume that after successfully installing ML 2.3, I can then replace the autoexec.bin on my SD card with the freshly built autoexec.bin for my T3i (600D) to test it? Do I leave everything else on the SD card as is?

Yes!

You can do
 
Code: [Select]
make 600Dor
 
Code: [Select]
make alland copy the autoexec.bin from the 600D or all folder (in platform folder) to the card, overwriting the old one.
All other file are unchanged, so keep the one you had with the release.

and before each make do a make clean (or you will not compile it from zero and sometimes it's bad)


I do this( ; are for concatenate the commands instead of write them one by one...) :
Code: [Select]
make clean; make 600D; cp /path/to/magic-lantern/platform/600D.102/autoexec.bin /path/to/EOS_DIGITAL/
explained is:
make clean <- will remove older file used for previous compilations
make 600D <- will compile a file for the 600D only (so smaller)
cp filetocopy destination <- will copyoverwrite autoexec.bin to the card
I'm using ML2.3 for photography with:
EOS 600DML | EOS 400Dplus | EOS 5D MLbeta5- 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, PS, LR, RawTherapee, LightZone -no video experience-

wintix

  • Freshman
  • **
  • Posts: 56
Re: Compiling the installer FIR from source
« Reply #8 on: November 10, 2012, 10:39:25 PM »
The tools for compiling the FIRs are not public.
Just discovered this piece of information once I had the complete build environment going. So there's no way to build a FIR file that's accepted by the camera on your own?

nanomad

  • Administrator
  • Hero Member
  • *****
  • Posts: 2918
  • All your websites are belong to us
Re: Compiling the installer FIR from source
« Reply #9 on: November 10, 2012, 10:42:11 PM »
No, because it needs to be encrypted and the tools to do that (or the keys for that matter) are not public. Only a couple of devs know them. This is done to avoid infringing copy protection laws (especially the US DMCA)
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

wintix

  • Freshman
  • **
  • Posts: 56
Re: Compiling the installer FIR from source
« Reply #10 on: November 10, 2012, 11:17:51 PM »
Ok, understandable, thanks for clearing that up.

Maybe there should be a note included in the build instructions to let people know that the compilation of .fir files is not publicly possible due to copyright issues and hence fiddling with new ports is not feasible. - Or is there already a sane way to enable the bootflag on 5D3 or 7D? (Those are the only cams I own)


wintix

  • Freshman
  • **
  • Posts: 56
Re: Compiling the installer FIR from source
« Reply #11 on: November 11, 2012, 02:59:34 PM »
Hm. Technically it shouldn't be an issue then to release the python script that puts the .fir together? (without the keys)

nanomad

  • Administrator
  • Hero Member
  • *****
  • Posts: 2918
  • All your websites are belong to us
Re: Compiling the installer FIR from source
« Reply #12 on: November 11, 2012, 03:16:31 PM »
That is correct (I think). The decision is up to the author though.
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