Support IPMI OEM command to edit BMC MAC Address

Implement the IPMI command to edit BMC MAC Address.
The workflow of this design is described as below:
1. Get the bus and address of the baseboard FRU device by calling
GetManagedObjects method of xyz.openbmc_project.FruDevice. The baseboard
is indicated by the CHASSIS_TYPE is "23". If the baseboard doesn't have
"CHASSIS_TYPE" field or it is not "23", users can indicate the FRU's bus
and address by manual via "mac-address-fru-bus" and
"mac-address-fru-addr" options.
2. Get the FRU raw data by calling GetRawFru method of
xyz.openbmc_project.FruDevice with input parameters are bus and address
in the step 1.
3. Update the new MAC address to FRU data which are read in step 2 and
recalculate checksum.
4. Write new FRU data to EEPROM by calling WriteFru method
xyz.openbmc_project.FruDevice.

Tested:
   1. Update BMC MAC Address to 70:E2:84:86:76:C0
    $ ipmitool raw 0x3c 0x01 0x70 0xe2 0x84 0x86 0x76 0xc0
   2. Check FRU for the new MAC Address in Board Extra
    $ ipmitool fru print 0 | grep "Board Extra"
   3. Reboot BMC and check if eth1 has new BMC MAC Address
    $ ifconfig eth1 | grep HWaddr
      eth1      Link encap:Ethernet  HWaddr 70:E2:84:86:76:C0

Signed-off-by: Thang Tran <thuutran@amperecomputing.com>
Change-Id: I08f6f6eb9dd701406dc81b18110cbe2d98321e59
4 files changed
tree: 19eaadd877311a2491454d4bf527b1832f14dec6
  1. include/
  2. src/
  3. LICENSE
  4. meson.build
  5. meson_options.txt
  6. OWNERS