Generating the Patches for Submission
To generate the Qemu/Linux patches you need to submit, we will use git to compute the code modifications you brought on top of the vanilla versions (tag v8.2.0
for Qemu and v6.6
for Linux).
First, add any file modified/added to the version control system, for example for Qemu, after completing the first (guided) part of the exercise, we have the following files modified/added:
cd ~/virt-101-exercise/qemu-8.2.0/
git status
Not currently on any branch.
Changes not staged for commit:
(use "git add <file>..." to update what will be committed)
(use "git restore <file>..." to discard changes in working directory)
modified: hw/misc/Kconfig
modified: hw/misc/meson.build
Untracked files:
(use "git add <file>..." to include in what will be committed)
hw/misc/my-rng.c
prefix/
Add the necessary files (do not add the prefix/
directory, which contain the binaries resulting from the build):
git add hw/misc/Kconfig hw/misc/meson.build hw/misc/my-rng.c
git commit -m "guided part of the exercise done"
Make sure to also add any other file (e.g. additional source files if you added some) that may be needed to build your solution when marking. Git may ask you to indicate your name/email to identify your commit.
You can then generate the patch by computing the difference with the tag we used as base:
git diff v8.2.0 > qemu.patch
Proceed similarly for Linux.
Note that
git diff
will produce a patch containing the difference between the commit/tag passed as parameters (herev8.2.0
) and the latest commit on the current branch, i.e. if you have unstaged modifications they will not be present in the patch. So make sure to commit anything you want included in the patch.
For the instructions on how to submit the patches and report, please see the logistics part at the beginning of this guide.