Commit fa5177c6 authored by alex@thinkpad's avatar alex@thinkpad
Browse files

QEMU readme: misc notes

- tip to save SD images as qcow2 (they take less disk space)
- instrumentation tools
- history updates
- minor formatting fixes

branch : qemu
parent d8a162fa0db5
......@@ -92,11 +92,11 @@ Tip: after installation, you may change ``ML_PATH`` to emulate ML from other dir
Misc notes
Model-specific parameters: eos/model_list.c (todo: move all hardcoded stuff there).
Model-specific parameters: ``eos/model_list.c`` (todo: move all hardcoded stuff there).
MMIO handlers: eos_handle_whatever (with io_log for debug messages).
MMIO handlers: ``eos_handlers`` -> ``eos_handle_whatever`` (with ``io_log`` for debug messages).
Useful: eos_get_current_task_name/id/stack, eos_mem_read/write.
Useful: ``eos_get_current_task_name/id/stack``, ``eos_mem_read/write``.
To extract MPU messages from a `startup log <>`_,
use ` <>`_ (see `MPU communication`_).
......@@ -479,6 +479,20 @@ Note: you need to copy the raw contents of the entire card, not just one partiti
dd if=/dev/mmcblk0 of=sd.img # not mmcblk0p1
Tip: to save disk space, format the SD card first, copy the desired files,
then create the image as `qcow2 <>`_:
.. code:: shell
qemu-img convert -f raw -O qcow2 /dev/mmcblk0 sd.qcow2
then update ```` to use the new image::
-drive if=sd,format=qcow2,file=sd.qcow2
That way, a 64GB card with Magic Lantern installed, after formatting in camera
with the option to keep ML on the card, will only take up about 15MB as a ``qcow2`` image.
Running from the physical SD/CF card
You may also start QEMU from the same card you use in the physical camera —
......@@ -712,7 +726,7 @@ This is tricky and not automated. You need to be careful with the following glob
.. code:: shell
./ EOSM2,firmware="boot=0" -S -gdb tcp::$GDB_PORT &
arm-none-eabi-gdb -ex "set \$TCP_PORT=$GDB_PORT" -x EOSM2/patches.gdb -ex quit &
......@@ -1063,6 +1077,20 @@ Instrumentation
`TODO (see QEMU forum thread) <>`_
The instrumentation framework provides the following features:
- log all debug messages from Canon: ``-d debugmsg``
- log all memory accesses: ``-d rom/ram/romr/ramw/etc``
- log all function calls: ``-d calls``, ``-d calls,tail``
- log all DryOS/VxWorks task switches: ``-d tasks``
- track all function calls to provide a stack trace: ``-d callstack``
- export all called functions to IDC script: ``-d idc``
- identify memory blocks copied from ROM to RAM: ``-d romcpy``
- check for memory errors (a la valgrind): ``-d memchk``
Debugging symbols from ML can be made available to instrumentation routines from environment variables (see ````).
The address of DebugMsg is exported by ```` (extracted from the GDB script, where it's commented out for speed reasons).
......@@ -1089,15 +1117,18 @@ History
:2015: `100D emulation, serial flash and GDB scripts from nkls <>`_
:2016: `More EOS models boot Canon GUI (no menus yet) <>`_
:2016: `Low-level button codes and GUI modes understood <>`_
:2016: `Users start wondering why the heck are we spending most of our time on this <>`_
:2016: `Users start wondering why the heck are we wasting our time on this <>`_
:2016: `Leegong from Nikon Hacker starts documenting MPU messages <>`_
:2017: `500D menu navigation! (Greg) <>`_
:2017: `nkls solves an important issue that was very hard to track down! <>`_
:2017: `Menu navigation works on most D4 and 5 models <>`_
:2017: `Menu navigation works on most DIGIC 4 and 5 models <>`_
:2017: Working on `Mac (dfort) <>`_
and `Windows 10 / Linux subsystem (g3gg0) <>`_
:2017: `EOS M2 porting walkthrough <>`_
:2017: `Automated tests for ML builds in QEMU <>`_
:2017: `RTC emulation, many patches no longer needed <>`_ (g3gg0)
:2017: `Major progress with DIGIC 6 emulation <>`_
:2017: `Menu navigation works on 20 EOS models! (DIGIC 3-5) <>`_
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment