commit | 02c801a579e4067211d05522e7dff611cf74c800 | [log] [tgz] |
---|---|---|
author | Lawrence Tang <lawrence.tang@arm.com> | Mon Jul 18 14:43:52 2022 +0100 |
committer | Lawrence Tang <lawrence.tang@arm.com> | Mon Jul 18 14:43:52 2022 +0100 |
tree | b24417a2e593df69c7fcfa234180fbb05bf37fe5 | |
parent | 4ef0a0a4125b8ba973ce079c94275c8e6970acef [diff] |
Add "cper-generate", update README, fix minor bugs.
This repository specifies a structure for representing UEFI CPER records (as described in UEFI Specification Appendix N) in a human-readable JSON format, in addition to a library which can readily convert back and forth between the standard CPER binary format and the specified structured JSON.
This project uses CMake (>=3.10). To build, simply run:
cmake . make
A static library file for the parsing library will be written to lib/
, and test executables will be written to bin/
.
This project comes with several binaries and libraries to help you deal with CPER binary and CPER-JSON. The first of these is cper-convert
, which is a command line tool that can be found in bin/
. With this, you can convert to and from CPER and CPER-JSON through the command line. An example usage scenario is below:
cper-convert to-cper samples/cper-json-test-arm.json --out cper.dump cper-convert to-json cper.generated.dump
Another tool bundled with this repository is cper-generate
, which is another command line tool found in bin/
. This allows you to generate psuedo-random valid CPER records with sections of specified types for testing purposes. An example use of the program is below:
cper-generate --out cper.generated.dump --sections generic ia32x64
Help for both of these tools can be accessed through using the --help
flag in isolation.
Finally, a static library containing symbols for converting CPER and CPER-JSON between an intermediate JSON format can be found generated in lib/
. This contains the following useful library symbols:
json_object* cper_to_ir(FILE* cper_file); void ir_to_cper(json_object* ir, FILE* out);
The specification for this project can be found in specification/
. Specification for the CPER binary format can be found in UEFI Specification Appendix N (2021/03/18).
cper-generate
sections for testing preparation.esting purposes.