I've got what I believe works in this branch on github https://github.com/chu11/freeipmi/tree/frureadwrite
To build: git clone https://github.com/chu11/freeipmi.git cd freeipmi git checkout -b frureadwrite origin/frureadwrite ./autogen.sh ./configure --enable-debug make There's more info the manpages, but I added the read/write into bmc-device since I considered it an advanced niche need. The basics are: bmc-device/bmc-device --read-fru=filename --device-id=num bmc-device/bmc-device --write-fru=filename --device-id=num Also added a --fru-file option to ipmi-fru to test anything you dump out. Al On Tue, 2016-04-26 at 07:08 +0000, CARANNANTE, MARTINE wrote: > Ok > Thanks > Martine > > -----Original Message----- > From: Albert Chu [mailto:[email protected]] > Sent: Tuesday, April 26, 2016 2:07 AM > To: CARANNANTE, MARTINE > Cc: [email protected] > Subject: Re: [Freeipmi-users] freeipmi command equivalent to ipmitool fru > read/write <fru id> <file> > > Hi Martine, > > That seems to be a reasonable request. I just never thought of it as > something needed from the end user side. > > I will try to add into FreeIPMI within a few weeks (probably can't this > week). Will you be able to test & iterate on it a bit? > > Al > > On Mon, 2016-04-25 at 08:18 +0000, CARANNANTE, MARTINE wrote: > > Hi > > > The reason to have these functions (read/write fru) is to be able to backup > > and restore FRU after having changed a board. > > > The contents of FRU are manufacturer specific but not the commands. These > > commands are IPMI standard. > > > > > > In ipmitool, these functions are implemented in lib/ipmi_fru.c . > > (read_fru_area() and write_fru_data()). > > > > > > In freeipmi, there is a beginning of implementation in > > > ./libfreeipmi/cmds/ipmi-fru-inventory-device-cmds.c > > > > > > Inform me of your decision. > > > Thanks > > > Best regards > > > Martine > > > > > > fiid_template_t tmpl_cmd_read_fru_data_rq = > > > { > > > { 8, "cmd", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, > > > { 8, "fru_device_id", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, > > > { 16, "fru_inventory_offset_to_read", FIID_FIELD_REQUIRED | > > FIID_FIELD_LENGTH_FIXED}, > > > { 8, "count_to_read", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, > > > { 0, "", 0} > > > }; > > > > > > /* 2040 = 255 * 8, 255 b/c count_returned field in request is 1 byte > > > long */ fiid_template_t tmpl_cmd_read_fru_data_rs = > > > { > > > { 8, "cmd", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED | > > FIID_FIELD_MAKES_PACKET_SUFFICIENT}, > > > { 8, "comp_code", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED | > > FIID_FIELD_MAKES_PACKET_SUFFICIENT}, > > > { 8, "count_returned", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, > > > { 2040, "requested_data", FIID_FIELD_OPTIONAL | > > FIID_FIELD_LENGTH_VARIABLE}, > > > { 0, "", 0} > > > }; > > > > > > /* 2040 = 255 * 8, 255 b/c bytes_to_write field in request is 1 byte > > > long */ fiid_template_t tmpl_cmd_write_fru_data_rq = > > > { > > > { 8, "cmd", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, > > > { 8, "fru_device_id", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, > > > { 16, "fru_inventory_offset_to_write", FIID_FIELD_REQUIRED | > > FIID_FIELD_LENGTH_FIXED}, > > > { 2040, "data_to_write", FIID_FIELD_REQUIRED | > > FIID_FIELD_LENGTH_VARIABLE}, > > > { 0, "", 0} > > > }; > > > > > > fiid_template_t tmpl_cmd_write_fru_data_rs = > > > { > > > { 8, "cmd", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED | > > FIID_FIELD_MAKES_PACKET_SUFFICIENT}, > > > { 8, "comp_code", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED | > > FIID_FIELD_MAKES_PACKET_SUFFICIENT}, > > > { 8, "count_written", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, > > > { 0, "", 0} > > > }; > > > > > > > > > -----Original Message----- > > > From: Albert Chu [mailto:[email protected]] > > > Sent: Friday, April 22, 2016 6:38 PM > > > To: CARANNANTE, MARTINE > > > Cc: [email protected] > > > Subject: Re: [Freeipmi-users] freeipmi command equivalent to ipmitool > > > fru read/write <fru id> <file> > > > > > > At present there is no equivalent to "fru read" and "fru write". My > > understanding is that this is to read/write fru binary files from/to a > > board. Since this is manufacturer specific, there's never been a request > > for it in FreeIPMI. > > > > > > Is there a particular reason for this need? > > > > > > Al > > > > > > On Fri, 2016-04-22 at 13:27 +0000, CARANNANTE, MARTINE wrote: > > > > Hi > > > > > > > I would like to know what the freeipmi command which does the same thing > > > as ipmitool fru read /write. > > > > > > > Thanks in advance > > > > > > > Best regards > > > > > > > Martine > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > _______________________________________________ > > > > > > > Freeipmi-users mailing list > > > > > > > [email protected] > > > > > > > https://lists.gnu.org/mailman/listinfo/freeipmi-users > > > > > > > > > -- > > > Albert Chu > > > [email protected] > > > Computer Scientist > > > High Performance Systems Division > > > Lawrence Livermore National Laboratory > > > > > > > > > -- > Albert Chu > [email protected] > Computer Scientist > High Performance Systems Division > Lawrence Livermore National Laboratory > > -- Albert Chu [email protected] Computer Scientist High Performance Systems Division Lawrence Livermore National Laboratory _______________________________________________ Freeipmi-users mailing list [email protected] https://lists.gnu.org/mailman/listinfo/freeipmi-users
