Magic Lantern Forum

Developing Magic Lantern => General Development => Topic started by: kurthis on July 08, 2012, 07:42:41 PM

Title: Compiling the installer FIR from source
Post by: kurthis 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
Title: Re: Compiling the installer FIR from source
Post by: a1ex on July 08, 2012, 07:56:18 PM
The tools for compiling the FIRs are not public.
Title: Re: Compiling the installer FIR from source
Post by: kurthis on July 08, 2012, 07:57:35 PM
Ok, that explains it well enough ;P

Thanks
Title: Re: Compiling the installer FIR from source
Post by: BiX 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 )
Title: Re: Compiling the installer FIR from source
Post by: a1ex 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.
Title: Re: Compiling the installer FIR from source
Post by: coutts 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.
Title: Re: Compiling the installer FIR from source
Post by: vtrandal 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?
Title: Re: Compiling the installer FIR from source
Post by: scrax on August 06, 2012, 07:29:53 PM
Quote from: vtrandal 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?

Yes!

You can do
make 600D
or
make all
and 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...) :
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
Title: Re: Compiling the installer FIR from source
Post by: wintix on November 10, 2012, 10:39:25 PM
Quote from: a1ex on July 08, 2012, 07:56:18 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?
Title: Re: Compiling the installer FIR from source
Post by: nanomad 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)
Title: Re: Compiling the installer FIR from source
Post by: wintix 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)

Title: Re: Compiling the installer FIR from source
Post by: wintix 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)
Title: Re: Compiling the installer FIR from source
Post by: nanomad on November 11, 2012, 03:16:31 PM
That is correct (I think). The decision is up to the author though.