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: ./sure_copy_from_contrib.sh [-q]  (from qemu-eos directory)

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

--HG--
branch : qemu
parent 2aacd2ae9274
...@@ -1205,23 +1205,20 @@ made outside the magic-lantern directory, you may run the install script ...@@ -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 again. It will not re-download QEMU, but unfortunately you will have to
recompile QEMU from scratch (which is very slow). recompile QEMU from scratch (which is very slow).
If you have changed only the ``eos`` files, to avoid a full recompilation Alternative, slightly faster:
you may try a script similar to the following:
.. code:: shell .. code:: shell
#!/bin/bash # from the qemu directory
./sure_copy_from_contrib.sh
QEMU_PATH=${QEMU_PATH:=qemu-2.5.0}
ML_PATH=${ML_PATH:=../magic-lantern} 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/ .. code:: shell
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/* .
# from the qemu directory
./sure_copy_from_contrib.sh -q
Test suite Test suite
`````````` ``````````
......
#!/bin/bash
# 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)
QEMU_NAME=${QEMU_NAME:=qemu-2.5.0}
ML_PATH=${ML_PATH:=../magic-lantern}
# 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')
cd $QEMU_NAME
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
fi
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