Creating dump header for IBM systems

-Adding dump header script:
-Changes are related to IBM specific systems only, no
impact on the existing dump package format without
dump header. In package function only for IBM systems
the generated header will be added to the dump, for
remaining systems the existing dump format remains same.
-Adding dump header which will be added on top of the
the <obmc file>.tar.xz, only on IBM systems

Note: If user wants to extract the dump, they need to remove
the header from the dump using dd command.
Example
dd bs=628 skip=1 if=<input_dump_file> of=<output_file>

Result:
Tested the dump header using busctl command and dreport script.
Able to add dump header on top of the <obmcdump>.tar.xz file.

Separated out the header from the output file using dd command:
dd bs=628 skip=1 if=<obmc dump>.tar.xz of=openbmc.tar.xz

The new output file doesn't have the header now and can be unzipped.
Post unzipping the files in the dump can be seen.

hexdump ooutput of the dump header:-
00000000  46 49 4c 45 20 20 20 20  00 40 00 00 00 00 00 00  |FILE    .@......|
00000010  00 00 00 00 00 01 00 0f  42 4d 50 44 55 4d 50 2e  |........BMPDUMP.|
00000020  53 49 4d 50 31 30 52 2e  30 30 30 30 30 30 30 36  |SIMP10R.00000006|
00000030  2e 32 30 32 30 30 39 32  39 31 31 31 30 34 33 00  |.20200929111043.|
00000040  53 45 43 54 49 4f 4e 20  00 30 00 00 00 00 00 00  |SECTION .0......|
00000050  00 00 00 01 00 02 00 00  00 00 00 00 00 02 ad dc  |................|
00000060  42 4d 43 44 55 4d 50 00  00 00 00 00 00 00 00 00  |BMCDUMP.........|
00000070  42 4d 43 20 44 55 4d 50  00 00 00 00 00 00 00 00  |BMC DUMP........|
00000080  00 00 00 00 02 10 02 00  00 00 00 00 00 02 ad dc  |................|
00000090  39 31 30 35 2d 32 32 41  00 00 00 00 00 00 00 00  |9105-22A........|
000000a0  00 00 00 00 00 00 00 00  00 00 00 00 00 00 00 00  |................|
000000b0  53 65 72 76 65 72 2d 39  31 30 35 2d 32 32 41 2d  |Server-9105-22A-|
000000c0  53 4e 2d 53 49 4d 50 31  30 52 00 00 00 00 00 00  |SN-SIMP10R......|
000000d0  00 53 49 4d 50 31 30 52  00 00 00 00 00 70 00 00  |.SIMP10R.....p..|
000000e0  00 00 00 00 00 00 00 00  00 00 00 00 00 00 00 00  |................|
*
00000270  01 01 00 00 fd 37 7a 58  5a 00 00 04 e6 d6 b4 46  |.....7zXZ......F|

Signed-off-by: Chirag Sharma <chirshar@in.ibm.com>
Change-Id: I27bffdd96a6da0777d88e3c7f93eee92cffbfd6e
2 files changed
tree: fe758c868f435c8ff9a535f994c96998585ef3f6
  1. offload-extensions/
  2. test/
  3. tools/
  4. xyz/
  5. .clang-format
  6. .gitignore
  7. bmc_dump_entry.cpp
  8. bmc_dump_entry.hpp
  9. core_manager.cpp
  10. core_manager.hpp
  11. core_manager_main.cpp
  12. dump_entry.cpp
  13. dump_entry.hpp
  14. dump_internal.hpp
  15. dump_manager.cpp
  16. dump_manager.hpp
  17. dump_manager_bmc.cpp
  18. dump_manager_bmc.hpp
  19. dump_manager_main.cpp
  20. dump_manager_system.cpp
  21. dump_manager_system.hpp
  22. dump_offload.cpp
  23. dump_offload.hpp
  24. dump_serialize.cpp
  25. dump_serialize.hpp
  26. dump_utils.cpp
  27. dump_utils.hpp
  28. elog_watch.cpp
  29. elog_watch.hpp
  30. errors_map.mako.hpp
  31. errors_map_gen.py
  32. example_errors_watch.yaml
  33. ffdc
  34. LICENSE
  35. MAINTAINERS
  36. meson.build
  37. meson_options.txt
  38. offload-extensions.hpp
  39. README.md
  40. system_dump_entry.cpp
  41. system_dump_entry.hpp
  42. watch.cpp
  43. watch.hpp
README.md

phosphor-debug-collector

Phosphor Debug Collector provides mechanisms to collect various log files and system parameters. Used to troubleshoot problems in OpenBMC based systems.

To Build

To build this package with meson, do the following steps:

    1. meson builddir
    2. ninja -C builddir

To clean the built files run ninja -C builddir clean.

To run unit tests

Tests can be run in the CI docker container, refer local-ci-build

or with an OpenBMC x86 sdk(see below for x86 steps).

meson -Doe-sdk=enabled -Dtests=enabled build
ninja -C build test