freeipmi-users
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Freeipmi-users] freeipmi command equivalent to ipmitool fru read/wr


From: CARANNANTE, MARTINE
Subject: Re: [Freeipmi-users] freeipmi command equivalent to ipmitool fru read/write <fru id> <file>
Date: Mon, 25 Apr 2016 08:18:08 +0000

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:address@hidden 
Sent: Friday, April 22, 2016 6:38 PM
To: CARANNANTE, MARTINE
Cc: address@hidden
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
> address@hidden
> https://lists.gnu.org/mailman/listinfo/freeipmi-users

--
Albert Chu
address@hidden
Computer Scientist
High Performance Systems Division
Lawrence Livermore National Laboratory



reply via email to

[Prev in Thread] Current Thread [Next in Thread]