diff mbox

kvm-kmod: Document the build process (take 2)

Message ID 1258047322-5750-1-git-send-email-wolfgang.mauerer@siemens.com (mailing list archive)
State New, archived
Headers show

Commit Message

wolfgang.mauerer@siemens.com Nov. 12, 2009, 5:35 p.m. UTC
None
diff mbox

Patch

diff --git a/README b/README
new file mode 100644
index 0000000..bef7586
--- /dev/null
+++ b/README
@@ -0,0 +1,37 @@ 
+Building the KVM kernel module is performed differently depending on whether
+you are working from a clone of the git repository or from a source release.
+Notice that two kernels are involved: One from which the KVM sources
+are taken (kernel A), and one for which the module is built (kernel B). 
+For out-of-tree module builds, it is well possible that kernel A is more
+recent than kernel B.
+
+- To build from a release (this is the default case), simply
+  use ./configure (possibly with any arguments that are required for
+  your setup, see ./configure --help) and make. The kernel specified
+  with --kerneldir refers to kernel B, that is, the kernel for which
+  the module is built.
+
+- Building from a cloned git repository (most likely useful for developers
+  only) requires a kernel tree with the main kvm sources (kernel A) that
+  is included as a submodule in the linux-2.6/ directory.  By default,
+  the KVM development tree on git.kernel.org is used, but this can be
+  changed in the git configuration.
+
+  Before the kvm module can be built, the linux submodule must be initialised
+  and populated. The required sequence of commands is
+
+  git submodule init
+  git submodule update
+  ./configure
+  make sync
+  make
+
+  Notice that you can also specify an existing Linux tree for the
+  synchronisation stage by using
+
+  make sync LINUX=/path/to/kernel/A
+
+  LINUX specifies the path to kernel A from which the KVM sources are taken. 
+  The directory must point to a local git tree, not to a plain directory
+  containing the kernel sources. If LINUX is unset, the default value
+  is linux-2.6/, i.e., the git submodule.