
=======================
 makedumpfile's README
=======================

* REQUIREMENTS
  Please download the following library file and install it exactly as below;
  do NOT use "make install".
  - elfutils-0.125.tar.gz
    The "make install" of elfutils installs some commands (ld, readelf, etc.),
    and compiling problems sometimes happen due to using the installed
    commands. To install only the library & header files, use 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-x.y.z
  4.Build, and install:
    # make; make install

* SUPPORTED KERNELS
  This makedumpfile 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|s390
  -------+----+----+----+----+----+----+----+----+----+----+----+----+----
  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 |    | -- | OK | OK | OK | OK |
  2.6.20 | OK | OK | -- | #1 | OK | OK | OK | -- | OK | OK | OK | #1 |
  21-rc5 | OK | OK | -- | OK | OK | OK | OK | -- | OK | OK | OK | OK |
  2.6.21 | OK | OK | -- |    | OK | OK | OK | -- | OK | OK | OK |    |
  2.6.22 | OK | OK | -- |    | OK | OK | OK | -- | OK | OK | OK |    |
  2.6.23 | OK | OK | -- |    | OK | OK | OK | -- | OK | OK | OK |    |
  2.6.24 | OK | OK | -- |    | OK | OK | OK | -- | OK | OK | OK |    |
  2.6.25 | OK | ** | -- |    |    | ** | OK | -- | OK | OK | OK |    |
  2.6.26 | OK | ** | -- |    |    | ** | OK | -- | OK | OK | OK |    |
  2.6.27 | OK | ** | -- |    |    | ** | OK | -- | #2 | OK | OK |    |
  2.6.28 | OK | ** | -- |    |    | ** | OK | -- | OK | OK | OK |    |
  2.6.29 | OK | ** | -- |    |    | ** | OK | -- | OK | OK | OK |    |
  2.6.30 | OK | ** | -- |    |    | ** | OK | -- | OK | OK | OK |    |
  2.6.31 | OK | ** | -- |    |    | ** |    | -- | OK | OK | OK |    |
  2.6.32 | OK | ** | -- |    |    | ** |    | -- | OK | OK |    |    | OK
  2.6.33 | OK | ** | -- |    |    | ** |    | -- | OK | OK |    |    |
  2.6.34 | OK | ** | -- |    |    | ** |    | -- | OK | OK |    |    |
  2.6.35 | OK | ** | -- |    |    | ** |    | -- | OK | OK |    |    |
  2.6.36 | OK | ** | -- |    |    | ** |    | -- | OK | OK |    |    |

  OK    : Support.
  --    : Not support.
  Empty : Not test yet.
  TODO  : TODO.
  #1    : Both kexec/kdump does not work with PPC64 2.6.20 kernels. 
          This is a known problem fixed with later kernels.
  #2    : kdump does not work with i386 sparsemem 2.6.27 kernels. 
          This is a known problem fixed with later kernels.
  **    : The deleted memory model.
          On x86_64, both FLATMEM and DISCONTIGMEM have been deleted since
          linux-2.6.25.

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

* TODO
  1. Supporting more kernels.
  2. Fixing the report message.
     (Now, it sometimes counts the number of free_pages duplicating zero-pages
      if creating an ELF dumpfile.)

* NOTE
  1. A vmcoreinfo file should be generated by the makedumpfile which is used
     for dump filtering. If installing the latest makedumpfile, the vmcoreinfo
     file should be regenerated by it. Actually, makedumpfile v1.2.0 or later
     cannot work by vmcoreinfo file which is generated by v1.1.9 or before.

  2. If using linux-2.6.24 and kexec-tools-testing-20061214, /proc/vmcore
     contains vmcoreinfo data. So it is possible to create a dumpfile without
     -x option (or -i option) like the following:
     # makedumpfile -d 31 /proc/vmcore dumpfile

  3. On makedumpfile-1.2.5 or before, both '--xen-syms' and '--xen-vmcoreinfo'
     excluded Xen user domain pages. Since makedumpfile-1.2.6, '-X' option
     have been added for excluding Xen user domain pages, and these options
     does not exclude Xen user domain pages. So user should specify '-X'
     option for excluding Xen user domain pages.

* 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 elf_getshstrndx() because it tries
    searching for 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>
  Minoru Usui <usui@mxm.nes.nec.co.jp>
  Masayuki Igawa <igawa@mxs.nes.nec.co.jp>
  Daisuke Nishimura <nishimura@mxp.nes.nec.co.jp>
  kexec-ml <kexec@lists.infradead.org>

