Commit 36d0e5fb authored by alex@thinkpad's avatar alex@thinkpad
Browse files

QEMU: script for reverting changes made in qemu-eos

(i.e. go back to some vanilla version without full reinstallation)

Usage: ./ [-q]  (from qemu-eos directory)

Name starts with different letter to avoid typing ./ by mistake.

branch : qemu
parent 2aacd2ae9274
......@@ -1205,23 +1205,20 @@ made outside the magic-lantern directory, you may run the install script
again. It will not re-download QEMU, but unfortunately you will have to
recompile QEMU from scratch (which is very slow).
If you have changed only the ``eos`` files, to avoid a full recompilation
you may try a script similar to the following:
Alternative, slightly faster:
.. code:: shell
# from the qemu directory
If you have changed only the ``eos`` files (i.e. no changes to QEMU core),
use the following command; afterwards, recompilation will be very fast:
cp -v $ML_PATH/contrib/qemu/eos/* $QEMU_PATH/hw/eos/
cp -v $ML_PATH/contrib/qemu/eos/mpu_spells/* $QEMU_PATH/hw/eos/mpu_spells/
cp -v $ML_PATH/contrib/qemu/eos/dbi/* $QEMU_PATH/hw/eos/dbi/
cp -v $ML_PATH/src/backtrace.[ch] $QEMU_PATH/hw/eos/dbi/
cp -vr $ML_PATH/contrib/qemu/tests/* tests/
cp -vr $ML_PATH/contrib/qemu/scripts/* .
.. code:: shell
# from the qemu directory
./ -q
Test suite
# run this if you want to revert to the QEMU version
# from the magic-lantern/contrib/qemu directory
# (e.g. an older changeset, or just to undo your edits)
# copy files added to QEMU sources
echo "copying files..."
cp -v $ML_PATH/contrib/qemu/eos/* $QEMU_NAME/hw/eos/
cp -v $ML_PATH/contrib/qemu/eos/mpu_spells/* $QEMU_NAME/hw/eos/mpu_spells/
cp -v $ML_PATH/contrib/qemu/eos/dbi/* $QEMU_NAME/hw/eos/dbi/
cp -v $ML_PATH/src/backtrace.[ch] $QEMU_NAME/hw/eos/dbi/
cp -vr $ML_PATH/contrib/qemu/tests/* tests/
cp -vr $ML_PATH/contrib/qemu/scripts/* .
if [ "$1" != "-q" ]; then
# discard local changes and re-apply our patch
DATE=$(date '+%Y-%m-%d_%H-%M-%S')
git diff > $QEMU_NAME-$DATE.patch
echo "Local changes backed up to $QEMU_NAME/$QEMU_NAME-$DATE.patch"
git checkout .
patch -N -p1 < ../$ML_PATH/contrib/qemu/$QEMU_NAME.patch
Markdown is supported
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