QEMU full firmware emulation

#818 Open
Repository
Branch
qemu
Repository
Branch
unified

Bitbucket cannot automatically merge this request.

The commits that make up this pull request have been removed.

Bitbucket cannot automatically merge this request due to conflicts.

Review the conflicts on the Overview tab. You can then either decline the request or merge it manually on your local system using the following commands:

hg update 97b73e7a781e
# Note: This will create a new head!
hg merge 48b06f2f7729
hg commit -m 'Merged in qemu (pull request #818)'
Author
  1. Alex
Reviewers
Description

Current state: http://www.magiclantern.fm/forum/index.php?topic=2864.100

(boots Canon GUI on select models, can browse Canon and ML menu on 500D with unmodified autoexec.bin, can browse ML menu with minimally modified autoexec.bin on select models, photo capture emulation on a few models)

Jenkins job: http://builds.magiclantern.fm/jenkins/job/QEMU-tests/

The development will continue on this branch after merging, but the current state is already useful for merging.

For ML core, this means:

  • drop most of the old CONFIG_QEMU hacks
  • fine-tune QEMU-specific API (enabled with CONFIG_QEMU=y)

Some TODOs (not necessarily before merging; any help is welcome):

  • move old QEMU tests (e.g. hptimer) in the test suite
  • upgrade to latest QEMU (trouble at UART)
  • submit ARM patches upstream
  • refactor the code to match other QEMU machine definitions
  • move all state variables to EOSState (rather than using static variables here and there)
  • fix nondeterministic errors reproducible by many small file write calls (likely related to SD emulation or timers, not sure)
  • fix CF emulation and add tests
  • fix GUI mode switching on models other than 500D
  • use Canon's UART register for qprintf (so binaries with QEMU messages can run unmodified on the camera)
  • fix Canon's UART Dry-shell (see e.g. https://nada-labs.net/2014/finding-jtag-on-a-canon-elph100hs-ixus115/ )
  • emulate LiveView (hard)
  • emulate external monitors (we have VRAM dumps) (hard)
  • emulate other cores alongside the main one (e.g. TX19A, Eeko, 5D4AE, 7D(2) master/slave) (hard)
  • add a nice GUI with buttons (probably easy and fun for new contributors)

Comments (3)

  1. Daniel Fort

    Looks like this needs the same treatment as the backtrace branch in order to compile on OS X:

    [ CP       ]   ../../src/backtrace.c
    usage: cp [-R [-H | -L | -P]] [-fi | -n] [-apvX] source_file target_file
           cp [-R [-H | -L | -P]] [-fi | -n] [-apvX] source_file ... target_directory
    make: *** [../../src/backtrace.c] Error 64