README.md
Requires administrator privileges to run.
-----------------------------------------------------------------------------
Usage: FRUTool [ID=id] [options] [info1=Data] [info2=Data] ...

Options:
FILE ----- Set data by file IPMI ----- Set ipmitool command line
HOST ----- IP address of the BMC remote server
USER ----- Username for remote login PSWD ----- Password for remote login
FRUIF ---- Read FRU data from file FRUOF ---- Output FRU data to file
FRUSIZE -- Preset FRU size

Chassis Info.
CTY ------ Chassis Type (1-17) CPN ------ Chassis Part Number
CSN ------ Chassis Serial Number CEX# ----- Chassis Extra data(0 - 7)
CMF ------ Chassis Manufacturer(CEX0) CVR ----- Chassis Version(CEX1)
CAT ------ Chassis Asset Tag(CEX2) CSK ----- Chassis SKU Number(CEX3)
CMD ------ Chassis Model(CEX4)

Board Info.
BDT ------ Board Mfg (YYYY/MM/DD) BMF ------ Board Manufacturer
BPN ------ Board Product Name BSN ------ Board Serial Number
BPA ------ Board Part Number BFI ------ Board FRU File ID
BEX# ----- Board Extra data(0 - 7)
BVR ------ Board Version(BEX0) BAT ----- Board Asset Tag(BEX1)

Product Info.
PMF ------ Product Manufacturer PPN ------ Product Product Name
PPM ------ Product Part/Model Number PPV ------ Product Product Version
PSN ------ Product Serial Number PAT ------ Product Asset Tag
PFI ------ Product FRU File ID PEX# ----- Product Extra data(0 - 7)
PUD ------ Product UUID(PEX0) PSK ----- Product SKU Number(PEX1)
PFM ------ Product Family(PEX2)

Format:
Enclosed with '"' if spaces needed. eg. "PPN=product name"
Started w/ hex followed by ',' to set data type, eg. "CEX0=0x00,0x1 0x2 0x3"
Option w/o data and '=' to use barcode scanner, w/o data but w/ '=' to erase.

Example:
FRUTool ID=0 BDT=2018/1/1 BSN=123456 - Set Mfg Date=2018/1/1, SN=123456
FRUTool ID=0 BDT BPN BSN - Mfg Date=system date, auto Product Name, scan SN
FRUTool ID=0 BDT=RTC - Mfg Date=RTC date
FRUTool ID=0 BDT=GMT - Mfg Date=GMT date

More examples:
FRUTool ID=0 "CEX0=0x00,0xa 0xb 0xc 0xd"
- Set chassis extra data0 to 0xa 0xb 0xc 0xd

FRUTool ID=0 CEX1=
- Delete chassis extra data1

FRUTool ID=0 "PMF=Product Manufacturer"
- Set product manufacturer string with space

FRUTool ID=0 host=192.168.0.100 user=admin pswd=admin
- Remote access.
- Do not use BDT (retrieve system date) on remote access, need to set Mfg date manually.
- Do not use BPN (detect product name) on remote access, need to set product name manually.

FRUTool ID=0 "ipmi=ipmitool -H 192.168.0.100 -U admin -P admin"
- Assign ipmitool path and IP address to do remote access.
- Do not use BDT (retrieve system date) on remote access, need to set Mfg date manually.
- Do not use BPN (detect product name) on remote access, need to set product name manually.

FRUTool fruif=input.bin
- Display FRU info from file input.bin.

FRUTool fruif=input.bin fruof=output.bin CSN=CSN_123456
- Read FRU data from input.bin, set chassis serial number, write to output.bin.

FRUTool fruszie=1024 fruof=output.bin PPV=v1.00
- Generate FRU output file output.bin with product version info.

FRUTool id=0 fruof=output.bin
- Read FRU data from BMC, write to output.bin.

FRUTool file=FRUTool.txt
- input from file, check FRUTool.txt (as below) for details

//Example input file >>>
ID=0
CSN=12345678
CEX0=0x00,0xa 0xb 0xc 0xd
CEX1=0x00,0x1,0x2,0x3,0x4,0x05,0x06,0x7,0x8
BDT
BMF=ASRockRack
BPN
BSN=123-456-789
BEX0=0x00,0x01 0x02 0x03 0x04
PMF=Product Manufacturer
PPN=Product Name
PPM=
//Example input file <<<

NOTE:
DOS enviroment does not support remote options.