table of contents
FRUGEN(1) | User Commands | FRUGEN(1) |
NAME¶
frugen - Universal, full-featured IPMI FRU Information generator
SYNOPSIS¶
frugen [options] <filename>
DESCRIPTION¶
FRU Generator v2.0+git20240917.25293b1 (C) 2016-2024, Alexander Amelkin <alexander@amelkin.msk.ru>
OPTIONS¶
-d <argument>, --board-date <argument>
- Set board manufacturing date/time, use "DD/MM/YYYY HH:MM:SS" format. By default the current system date/time is used unless -u is specified.
-g <argument>, --debug <argument>
- Set debug flag (use multiple times for multiple flags):
- fver - Ignore wrong version in FRU header aver - Ignore wrong version in area headers rver - Ignore wrong version in multirecord area record version asum - Ignore wrong area checksum (for standard areas) rhsum - Ignore wrong record header checksum (for multirecord) rdsum - Ignore wrong data checksum (for multirecord) rend - Ignore missing EOL record, use any found records.
-h[<argument>], --help[=<argument>]
- Display this help. Use any option name as an argument to show help for a single option.
- Examples:
- frugen -h # Show full program help frugen -hhelp # Help for long option '--help' frugen -hh # Help for short option '-h'.
-j <argument>, --json <argument>
- Load FRU information from a JSON file, use '-' for stdin.
-o <argument>, --out-format <argument>
- Output format, one of: binary - Default format when writing to a file.
- For stdout, the following will be used, even
- if 'binary' is explicitly specified:
- json
- - Default when writing to stdout.
- text
- - Plain text format, no decoding of MR area records.
-r <argument>, --raw <argument>
- Load FRU information from a raw binary file, use '-' for stdin.
-s <argument>, --set <argument>
- Set a text field in an area to the given value, use given encoding Requires an argument in form [<encoding>:]<area>.<field>=<value> If an encoding is not specified at all, frugen will attempt to preserve the encoding specified in the template or will use 'auto' if none is set there. To force 'auto' encoding you may either specify it explicitly or use a bare ':' without any preceding text.
- Supported encodings:
- auto - Autodetect encoding based on the used characters.
- This will attempt to use the most compact encoding
- among the following.
- 6bitascii - 6-bit ASCII, available characters:
- !"#$%^&'()*+,-./
- 1234567890:;<=>?
- @ABCDEFGHIJKLMNO PQRSTUVWXYZ[\]^_
- bcdplus
- - BCD+, available characters:
- 01234567890 -.
- text - Plain text (Latin alphabet only).
- Characters: Any printable 8-bit ASCII byte.
- binary - Binary data represented as a hex string.
- Characters: 0123456789ABCDEFabcdef
- For area and field names, please refer to example.json
- You may specify field name 'custom' to add a new custom field. Alternatively, you may specify field name 'custom.<N>' to replace the value of the custom field number N given in the input template file.
- Examples:
- frugen -r fru-template.bin -s text:board.pname="MY BOARD" out.fru
- # (encode board.pname as text)
- frugen -r fru-template.bin -s board.pname="MY BOARD" out.fru
- # (preserve original encoding type if possible)
- frugen -r fru-template.bin -s :board.pname="MY BOARD" out.fru
- # (auto-encode board.pname as 6-bit ASCII)
- frugen -j fru-template.json -s binary:board.custom=0102DEADBEEF out.fru
- # (add a new binary-encoded custom field to board)
- frugen -j fru-template.json -s binary:board.custom.2=0102DEADBEEF out.fru
- # (replace custom field 2 in board with new value).
-t <argument>, --chassis-type <argument>
- Set chassis type (hex). Defaults to 0x02 ('Unknown').
-u, --board-date-unspec
- Don't use current system date/time for board mfg. date, use 'Unspecified'.
-U <argument>, --mr-uuid <argument>
- Set System Unique ID (UUID/GUID) NOTE: This does NOT replace the data specified in the template.
-v, --verbose
- Increase program verbosity (debug) level.
Example (encode from scratch):¶
- frugen -s board.mfg="Biggest International Corp." \
- --set board.pname="Some Cool Product" \ --set text:board.pn="BRD-PN-123" \ --board-date "10/1/2017 12:58:00" \ --set board.serial="01171234" \ --set board.file="Command Line" \ --set binary:board.custom="01020304FEAD1E" \ fru.bin
Example (decode to json, output to stdout):¶
- frugen --raw fru.bin -o json -
Example (modify binary file):¶
- frugen --raw fru.bin \
- --set text:board.serial=123456789 \ --set text:board.custom.1="My custom field" \ fru.bin
February 2025 | frugen 2.0+git20240917.25293b1 |