FRUGEN(1)

NAME
frugen - Universal, full-featured IPMI FRU Information generator

SYNOPSIS
frugen [options] <filename>

DESCRIPTION
FRU Generator v3.1 (C) 2016-2025, Alexander Amelkin <alexander@amelkin.msk.ru>

OPTIONS

-d <argument>, --board-date <argument>

    Set board manufacturing date/time, use "DD/MM/YYYY HH:MM" format. By default, if the date is neithers specified by this option, nor is given in the input template, the resulting output depends on the output format and presence of '-u' option as follows:

-o  | -u specified | -u not specified

    -------|----------------------|------------------------- binary | set to 'unspecified' | current system date/time json | not included | "auto" text | "Unspecified" | "Unspecified (auto)" -------|----------------------|-------------------------.

-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 record version in multirecord area asum - Ignore wrong area checksum (for standard areas) rhsum - Ignore wrong record header checksum (for multirecord) rdsum - Ignore wrong record data checksum (for multirecord) rdlen - Ignore wrong record data size (for multirecord) aeof - Ignore missing end-of-field in info areas, try to decode till the end reol - 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.

NOTE: When generating a binary FRU using command line options only,
    that is, without an input template file, please keep in mind that the areas will be put into the output binary file in the order of given options. Hence, to create a FRU with the default layot, use area-related options in the default order, which is: chassis, board, product, multirecord.

When using a template, the order of areas will be preserved
    for the areas defined in the template. Any new areas will be added in the order of options as described above.

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. A plus sign before <N> indicates that you wish the new field to inserted before the existing entry at rather than replace it.

    You may also specify either H/S/F or T/E/L letter for <N> to respectively indicate that you want the entry to be _inserted_ at the head/start/first position in the list, or added at the tail/end/last position.

    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, at the end of list)

frugen -j fru-template.json -s binary:board.custom.h=0102DEADBEEF out.fru
    # (add a new binary-encoded custom field to board, at the head of list)

frugen -j fru-template.json -s binary:board.custom.2=0102DEADBEEF out.fru
    # (replace custom field 2 in board with new value)

frugen -j fru-template.json -s binary:board.custom.+2=0102DEADBEEF out.fru
    # (insert a custom field at position 2 in board, old 2 becomes 3).

-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>

    Add/update a System Unique ID (UUID/GUID) record in MR area.

-v, --verbose

    Increase program verbosity (debug) level.

-V, --version

    Show the program version.

  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