
======================
 makdumpfile's README
======================

* REQUIREMENTS
  Please download the following library file and install it:
  - elfutils-0.125.tar.gz
    The "make install" of elfutils installs some commands (ld, readelf, etc.),
    and the compiling problem sometimes happens due to using the installed
    commands. To install only the library files, do the following method.
     # tar -zxvf elfutils-0.125.tar.gz
     # cd elfutils-0.125
     # ./configure
     # make
     #
     # mkdir /usr/local/include/elfutils/
     # cp ./libdw/libdw.h   /usr/local/include/elfutils/libdw.h
     # cp ./libdw/dwarf.h   /usr/local/include/dwarf.h
     # cp ./libelf/libelf.h /usr/local/include/libelf.h
     # cp ./libelf/gelf.h   /usr/local/include/gelf.h
     #
     # cp ./libelf/libelf.a /usr/local/lib/libelf.a
     # cp ./libdw/libdw.a   /usr/local/lib/libdw.a
     # cp ./libasm/libasm.a /usr/local/lib/libasm.a
     # cp ./libebl/libebl.a /usr/local/lib/libebl.a
     #

* BUILD & INSTALL
  1.Get the latest makedumpfile from the following site:
    https://sourceforge.net/projects/makedumpfile/
  2.Uncompress the tar file:
    # tar -zxvf makedumpfile-x.y.z.tar.gz
  3.Enter the makedumpfile subdirectory:
    # cd makedumpfile
  4.Build, and install:
    # make; make install

* SUPPORTED KERNELS
  makedumpfile (version 1.1.6) supports the following kernels.

         |      FLATMEM      |   DISCONTIGMEM    |     SPARSEMEM
         |-------------------+-------------------+-------------------
   Kernel|    | x86|    | PPC|    | x86|    | PPC|    | x86|    | PPC
  Version| x86| _64|ia64|  64| x86| _64|ia64|  64| x86| _64|ia64|  64
  -------+----+----+----+----+----+----+----+----+----+----+----+----
  2.6.15 | OK | -- | -- | -- | -- | -- | -- | -- | -- | -- | -- | --
  2.6.16 | OK | OK | -- |    | -- | OK | OK | -- | -- |    | -- |
  2.6.17 | OK | OK | -- |    | -- | OK | -- | -- | -- | OK | -- |
  2.6.18 | OK | OK | -- | OK | -- | OK | OK | -- | -- | OK | OK | OK
  2.6.19 | OK | OK | -- | OK | OK | OK |TODO| -- | OK | OK | OK | OK
  2.6.20 | OK | OK | -- | KP | OK | OK |TODO| -- | OK | OK | OK | KP
  21-rc5 | OK | OK | -- | OK | OK | OK |TODO| -- | OK | OK | OK | OK
  2.6.21 | OK | OK | -- |    | OK | OK |TODO|    | OK | OK | OK | 
  2.6.22 | OK | OK | -- |    | OK | OK |TODO|    | OK | OK | OK | 

  OK    : Support.
  --    : Not support.
  Empty : Not test yet.
  TODO  : TODO.
  KP    : Both kexec/kdump does not work with PPC64 2.6.20 kernels. 
          This is a known problem fixed with later kernels.

* USAGE
  Please see "man makedumpfile" or "makedumpfile -h".

* TODO
  1. Supporting more kernels.

* FAQ
  001: It cannot be compiled with the following messages:
    # make
    gcc -g -O2 -Wall -D__x86_64__ -c -o ./x86.o ./x86.c
    gcc -g -O2 -Wall -D__x86_64__ -c -o ./x86_64.o ./x86_64.c
    gcc -g -O2 -Wall -D__x86_64__ -c -o ./ia64.o ./ia64.c
    gcc -g -O2 -Wall -D__x86_64__ -c -o ./ppc64.o ./ppc64.c
    gcc -g -O2 -Wall -D_FILE_OFFSET_BITS=64 -DVERSION='"1.1.4"'
    -DRELEASE_DATE='"08 June 2007"' -D__x86_64__ x86.o x86_64.o ia64.o
    ppc64.o-o makedumpfile
    makedumpfile.c -static -ldw -lelf -lz
    /tmp/ccYv3cGF.o: In function `get_debug_info':
    /tmp/makedumpfile/makedumpfile.c:1341: undefined reference to
    `elf_getshstrndx'
    collect2: ld returned 1 exit status
    make: *** [makedumpfile] Error 1
    #

    The compiler cannot find out elf_getshstrndx() because it tries
    searching it only from /usr/lib/libelf.a though elf_getshstrndx()
    is archived in /usr/local/lib/libelf.a.
    To solve the problem, add the option (-L/usr/local/lib/) to CFLAGS
    of Makefile like the following:

    CFLAGS = -g -O2 -Wall -D_FILE_OFFSET_BITS=64 -L/usr/local/lib/ \
        -DVERSION='"$(VERSION)"' -DRELEASE_DATE='"$(DATE)"'

* REFERENCES
  https://sourceforge.net/projects/makedumpfile/
  http://lists.infradead.org/pipermail/kexec/
  https://lists.linux-foundation.org/pipermail/fastboot/

* BUG REPORT
  If finding some bugs, please send the information to the following:
  Ken'ichi Ohmichi <oomichi@mxs.nes.nec.co.jp>
  Masaki Tachibana <tachibana@mxm.nes.nec.co.jp>
  kexec-ml <kexec@lists.infradead.org>

