# frugy - FRU Generator YAML
This is a tool which generates EEPROM images according to the [IPMI](https://www.intel.com/content/www/us/en/products/docs/servers/ipmi/ipmi-second-gen-interface-spec-v2-rev1-1.html) [FRU](https://www.intel.com/content/dam/www/public/us/en/documents/specification-updates/ipmi-platform-mgt-fru-info-storage-def-v1-0-rev-1-3-spec-update.pdf) standard from [YAML](https://yaml.org/spec/1.2/spec.html) configuration files. It can also parse a FRU EEPROM image and write its contents to a YAML file, or dump them to stdout.
## Installation
From [PyPI](https://pypi.org/project/frugy):
```
pip3 install frugy
```
From [GitHub](https://github.com/MicroTCA-Tech-Lab/frugy):
```
pip3 install git+https://github.com/MicroTCA-Tech-Lab/frugy
```
## Usage
```
$ frugy --help
usage: frugy [-h] [--version] [-o OUTPUT] [-w] [-r] [-d]
[-e EEPROM_SIZE] [-s SET] [-t] [-b] [-c] [-l [LIST]]
[-v VERBOSITY]
[srcfile]
FRU Generator YAML
positional arguments:
srcfile Source file for reading
optional arguments:
-h, --help show this help message and exit
--version show program's version number and exit
-o OUTPUT, --output OUTPUT
output file (derived from input file if not set)
-w, --write FRU write mode (convert YAML to FRU image), default
-r, --read FRU read mode (convert FRU image to YAML)
-d, --dump dump FRU information to stdout (same as -r -o -)
-e EEPROM_SIZE, --eeprom-size EEPROM_SIZE
pad FRU image to match EEPROM size in bytes (only
valid in write mode)
-s SET, --set SET set FRU record field to a value (only valid in write
mode)
-t, --timestamp set BoardInfo.mfg_date_time timestamp to current UTC
time (only valid in write mode)
-b, --broken enable workaround to parse Opal Kelly EEPROMs
-c, --ignore-checksum-errors
ignore checksum errors when parsing a FRU image
-l [LIST], --list [LIST]
list supported FRU records or schema of specified
record
-v VERBOSITY, --verbosity VERBOSITY
set verbosity (0=quiet, 1=info, 2=debug)
```
## Examples
```
frugy damc-fmc2zup.yml
```
Read `damc-fmc2zup.yml` configuration, generate FRU image `damc-fmc2zup.bin`.
```
frugy damc-fmc2zup.yml -o fmc2zup_fru_eeprom.bin -e 2048
```
Read `damc-fmc2zup.yml` configuration, generate `fmc2zup_fru_eeprom.bin`, make it 2048 bytes (pad with 0xff).
```
frugy damc-fmc2zup.bin -r
```
Read and parse FRU image `damc-fmc2zup.bin`, generate YAML file `damc-fmc2zup.yml`.
```
frugy dmmc-stamp.yml -s BoardInfo.serial_number=1234 -s ProductInfo.version=1.0 -t
```
Read `dmmc-stamp.yml`, generate FRU with `BoardInfo.serial_number` set to *1234*, `ProductInfo.version` to *1.0* and `BoardInfo.mfg_date_time` to current UTC time.
```
frugy dmmc-stamp.yml -s serial_number=1234 -t
```
Read `dmmc-stamp.yml`, generate FRU with `BoardInfo.serial_number` *and* `ProductInfo.serial_number` set to *1234* and `BoardInfo.mfg_date_time` to current UTC time.
```
frugy -l
```
Show list of all supported FRU records.
```
frugy -l PointToPointConnectivity
```
Show layout of the FRU record called 'PointToPointConnectivity'.
## Supported FRU records
* [Overview of supported records](docs/records.md)
### YAML keywords for supported FRU records
* [Detailed list of supported IPMI records](docs/ipmi.md)
* [Detailed list of supported PICMG records](docs/picmg.md)
* [Detailed list of supported FMC records](docs/fmc.md)
## Example configuration file
```yaml
BoardInfo:
manufacturer: DESY
product_name: DMMC-STAMP Rev.A
serial_number: '0000'
part_number: '0000'
fru_file_id: none
ProductInfo:
manufacturer: DESY
product_name: DMMC-STAMP Rev.A
part_number: '0000'
version: '0000'
serial_number: '0000'
asset_tag: none
fru_file_id: none
MultirecordArea:
- type: ModuleCurrentRequirements
current_draw: 6.5
```
More example configurations are stored in the [`examples`](examples)
folder.
Raw data
{
"_id": null,
"home_page": "https://techlab.desy.de",
"name": "frugy",
"maintainer": "",
"docs_url": null,
"requires_python": ">=3.6",
"maintainer_email": "",
"keywords": "ipmi fru microtca amc fmc picmg vita",
"author": "Patrick Huesmann",
"author_email": "patrick.huesmann@desy.de",
"download_url": "https://files.pythonhosted.org/packages/9b/fb/35c36c8bfcdb70cf17d0c3efeb5a513d686e56e8c801a113a50613d6b6fd/frugy-0.4.2.tar.gz",
"platform": null,
"description": "# frugy - FRU Generator YAML\n\nThis is a tool which generates EEPROM images according to the [IPMI](https://www.intel.com/content/www/us/en/products/docs/servers/ipmi/ipmi-second-gen-interface-spec-v2-rev1-1.html) [FRU](https://www.intel.com/content/dam/www/public/us/en/documents/specification-updates/ipmi-platform-mgt-fru-info-storage-def-v1-0-rev-1-3-spec-update.pdf) standard from [YAML](https://yaml.org/spec/1.2/spec.html) configuration files. It can also parse a FRU EEPROM image and write its contents to a YAML file, or dump them to stdout.\n\n## Installation\n\nFrom [PyPI](https://pypi.org/project/frugy):\n```\npip3 install frugy\n```\n\nFrom [GitHub](https://github.com/MicroTCA-Tech-Lab/frugy):\n```\npip3 install git+https://github.com/MicroTCA-Tech-Lab/frugy\n```\n\n## Usage\n\n```\n$ frugy --help\nusage: frugy [-h] [--version] [-o OUTPUT] [-w] [-r] [-d]\n [-e EEPROM_SIZE] [-s SET] [-t] [-b] [-c] [-l [LIST]]\n [-v VERBOSITY]\n [srcfile]\n\nFRU Generator YAML\n\npositional arguments:\n srcfile Source file for reading\n\noptional arguments:\n -h, --help show this help message and exit\n --version show program's version number and exit\n -o OUTPUT, --output OUTPUT\n output file (derived from input file if not set)\n -w, --write FRU write mode (convert YAML to FRU image), default\n -r, --read FRU read mode (convert FRU image to YAML)\n -d, --dump dump FRU information to stdout (same as -r -o -)\n -e EEPROM_SIZE, --eeprom-size EEPROM_SIZE\n pad FRU image to match EEPROM size in bytes (only\n valid in write mode)\n -s SET, --set SET set FRU record field to a value (only valid in write\n mode)\n -t, --timestamp set BoardInfo.mfg_date_time timestamp to current UTC\n time (only valid in write mode)\n -b, --broken enable workaround to parse Opal Kelly EEPROMs\n -c, --ignore-checksum-errors\n ignore checksum errors when parsing a FRU image\n -l [LIST], --list [LIST]\n list supported FRU records or schema of specified\n record\n -v VERBOSITY, --verbosity VERBOSITY\n set verbosity (0=quiet, 1=info, 2=debug)\n```\n\n## Examples\n\n```\nfrugy damc-fmc2zup.yml\n```\nRead `damc-fmc2zup.yml` configuration, generate FRU image `damc-fmc2zup.bin`.\n\n```\nfrugy damc-fmc2zup.yml -o fmc2zup_fru_eeprom.bin -e 2048\n```\nRead `damc-fmc2zup.yml` configuration, generate `fmc2zup_fru_eeprom.bin`, make it 2048 bytes (pad with 0xff).\n\n```\nfrugy damc-fmc2zup.bin -r\n```\nRead and parse FRU image `damc-fmc2zup.bin`, generate YAML file `damc-fmc2zup.yml`.\n\n```\nfrugy dmmc-stamp.yml -s BoardInfo.serial_number=1234 -s ProductInfo.version=1.0 -t\n```\nRead `dmmc-stamp.yml`, generate FRU with `BoardInfo.serial_number` set to *1234*, `ProductInfo.version` to *1.0* and `BoardInfo.mfg_date_time` to current UTC time.\n\n```\nfrugy dmmc-stamp.yml -s serial_number=1234 -t\n```\nRead `dmmc-stamp.yml`, generate FRU with `BoardInfo.serial_number` *and* `ProductInfo.serial_number` set to *1234* and `BoardInfo.mfg_date_time` to current UTC time.\n\n```\nfrugy -l\n```\nShow list of all supported FRU records.\n\n```\nfrugy -l PointToPointConnectivity\n```\nShow layout of the FRU record called 'PointToPointConnectivity'.\n\n## Supported FRU records\n\n* [Overview of supported records](docs/records.md)\n\n### YAML keywords for supported FRU records\n\n* [Detailed list of supported IPMI records](docs/ipmi.md)\n* [Detailed list of supported PICMG records](docs/picmg.md)\n* [Detailed list of supported FMC records](docs/fmc.md)\n\n## Example configuration file\n\n```yaml\nBoardInfo:\n manufacturer: DESY\n product_name: DMMC-STAMP Rev.A\n serial_number: '0000'\n part_number: '0000'\n fru_file_id: none\nProductInfo:\n manufacturer: DESY\n product_name: DMMC-STAMP Rev.A\n part_number: '0000'\n version: '0000'\n serial_number: '0000'\n asset_tag: none\n fru_file_id: none\nMultirecordArea:\n- type: ModuleCurrentRequirements\n current_draw: 6.5\n```\n\nMore example configurations are stored in the [`examples`](examples)\n folder.\n",
"bugtrack_url": null,
"license": "BSD",
"summary": "FRU Generator YAML",
"version": "0.4.2",
"project_urls": {
"Homepage": "https://techlab.desy.de"
},
"split_keywords": [
"ipmi",
"fru",
"microtca",
"amc",
"fmc",
"picmg",
"vita"
],
"urls": [
{
"comment_text": "",
"digests": {
"blake2b_256": "d59fc86b96981b14395736f720e129fcc472f09ad31ba5340df2f1d65a430657",
"md5": "a0f764ff4188d1617a40b18b7855f4e4",
"sha256": "2f9aed6a98a6c72086523ba3d3c27ad0208d9fe1e5deef15dc7e76cdc9a13bc2"
},
"downloads": -1,
"filename": "frugy-0.4.2-py3-none-any.whl",
"has_sig": false,
"md5_digest": "a0f764ff4188d1617a40b18b7855f4e4",
"packagetype": "bdist_wheel",
"python_version": "py3",
"requires_python": ">=3.6",
"size": 27273,
"upload_time": "2023-05-10T10:29:25",
"upload_time_iso_8601": "2023-05-10T10:29:25.614340Z",
"url": "https://files.pythonhosted.org/packages/d5/9f/c86b96981b14395736f720e129fcc472f09ad31ba5340df2f1d65a430657/frugy-0.4.2-py3-none-any.whl",
"yanked": false,
"yanked_reason": null
},
{
"comment_text": "",
"digests": {
"blake2b_256": "9bfb35c36c8bfcdb70cf17d0c3efeb5a513d686e56e8c801a113a50613d6b6fd",
"md5": "3ea84463e17a80883c2dc6b0fe47a3ee",
"sha256": "dc8f4898605c2457bc0a320f6dd3532064a159ddb6c0e50f48b977c8bef3690f"
},
"downloads": -1,
"filename": "frugy-0.4.2.tar.gz",
"has_sig": false,
"md5_digest": "3ea84463e17a80883c2dc6b0fe47a3ee",
"packagetype": "sdist",
"python_version": "source",
"requires_python": ">=3.6",
"size": 25647,
"upload_time": "2023-05-10T10:29:27",
"upload_time_iso_8601": "2023-05-10T10:29:27.473745Z",
"url": "https://files.pythonhosted.org/packages/9b/fb/35c36c8bfcdb70cf17d0c3efeb5a513d686e56e8c801a113a50613d6b6fd/frugy-0.4.2.tar.gz",
"yanked": false,
"yanked_reason": null
}
],
"upload_time": "2023-05-10 10:29:27",
"github": false,
"gitlab": false,
"bitbucket": false,
"codeberg": false,
"lcname": "frugy"
}