[PATCH] [PATCH] Add INSTALL file

Bernhard Walle bwalle at suse.de
Tue Aug 26 04:33:56 EDT 2008


1 file changed, 65 insertions(+)
INSTALL |   65 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++


To describe static compilation. I hope the rest is also okay.


Signed-off-by: Bernhard Walle <bwalle at suse.de>

diff --git a/INSTALL b/INSTALL
new file mode 100644
--- /dev/null
+++ b/INSTALL
@@ -0,0 +1,65 @@
+Installation
+============
+
+General
+-------
+
+kexec-tools uses Autoconf, so you can just use
+
+    ./configure
+    make
+    su -c "make install"
+
+to install kexec-tools on your system. However, you should check first if your
+favourite Linux distribution doesn't offer a package. If that package is recent
+enough, you should consider using that package instead.
+
+
+Installation directory
+----------------------
+
+To change the default installation directory, call ./configure with
+
+    --prefix=<prefix> (for example, /usr)
+    --bindir=<binary directory> (for example, /usr/bin)
+    --sbindir=<super user binary directory>  (for example, /usr/sbin)
+    --mandir=<manpage directory> (for example, /usr/share/man)
+
+and so on. See the output of
+
+    ./configure --help
+
+for all options.
+
+
+Static compilation
+------------------
+
+To compile kexec-tools statically (i.e., independent of libraries that are
+present on the system), use
+
+    LDFLAGS=-static ./configure <options>
+
+instead.
+
+
+Cross compilation
+-----------------
+
+Because kexec is also used in the embedded world, cross-compilation is
+supported. You cannot only set "CC", "LD", "CCFLAGS" and "LDFLAGS" environment
+variables for the ./configure call as usual, you can also set
+
+    TARGET_CC       -- the C compiler used for files that should run on the
+                       target
+    TARGET_CCFLAGS  -- compilation flags for $TARGET_CC
+    TARGET_LD       -- linker used for files that should run on the
+                       target
+
+Because the build process also requires files that must be executed during the
+build, you also need a host compiler, only the target compiler is not enough.
+
+    BUILD_CC        -- the C compiler used for files that should run on the
+                       host (the system that builds the kexec-tools)
+    BUILD_CFLAGS    -- compilation flags for $BUILD_CC
+



More information about the kexec mailing list