Giter Site home page Giter Site logo

swipswaps / magiclantern_hg_02 Goto Github PK

View Code? Open in Web Editor NEW

This project forked from reticulatedpines/magiclantern_hg_02

0.0 0.0 0.0 298.57 MB

License: GNU General Public License v2.0

Makefile 1.09% C 88.89% Perl 1.67% Assembly 3.39% C++ 1.18% Python 3.72% Shell 0.04%

magiclantern_hg_02's Introduction

          ***************************************************
          *                                                 *
          * THIS IS DANGEROUS AND MIGHT DAMAGE YOUR CAMERA. *
          *  NO WARRANTIES.  NO GUARANTEES.  DO NOT TAUNT.  *
          *                                                 *
          ***************************************************

If you are not comfortable with this, stop reading and delete the
software before you are tempted to try running it on your camera.
It works on my camera, with my version of arm-linux-gcc, and with
my version of perl to build the firmware file, but that is no
guarantee that it will work for you.

Please see the COPYING file for additional terms that cover
distribution of this software.

To repeat this important point:

          ***************************************************
          *                                                 *
          * THIS IS DANGEROUS AND MIGHT DAMAGE YOUR CAMERA. *
          *   IF IT BREAKS, YOU GET TO KEEP BOTH PIECES.    *
          *                                                 *
          ***************************************************

IMPORTANT NOTES

* If you encounter a "locked up" camera, quickly remove the battery.
  Otherwise the ARM might be in a tight-loop and get very hot, very quickly.
  Your battery will run down and your LCD might show some discoloration.

* When in doubt, remove the battery and reboot.

* And, remember that this software can damage or destroy your camera.


BOOT PROCESS OVERVIEW

* Camera DryOS copies .fir file into RAM at 0x800000 and jumps into it.
* The first instruction does a long jump to 0x80000c to clear some headers
* The CPSR is updated to put the ARM into supervisor mode (it already is)
* An initial stack is setup at 0x1900
* Branch to cstart() in reboot.c
* set up the memory regions for the camera version of DryOS
* enable all caches and rw regions
* select reboot vectors in low memory
* copies the 5d-hack.bin blob to above the DryOS BSS
	* This is the RESTARTSTART location
	* End of BSS is found in _entry() where it loops to zero it
	* Note off by 0x120 error due to .fir header.
* flushes caches
* Jumps into 5d-hack.bin copy_and_restart() code at RESTARTSTART (0x48000)
	* copy_and_restart() must be first routine in 5d-hack.c
* copy_and_restart() copies the first 64 KB of ROM to 0x50000
* It then patches a few instructions to fixup some branch instructions
  and to return to its control before control is transfered to the
  cstart() routine in the firmware.  It also updates the end of the BSS
  so that both itself and the copied portion of DryOS will be saved
* It installs a task dispatch hook in the function pointer at 0x1934.
  This will be called when ever a new task is run, allowing our code
  to disable Canon tasks or re-purpose them with our own implementations.


magiclantern_hg_02's People

Contributors

osresearch avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.