StorageType配置为EepromV2,fru write没有写入

        "FruData_Expander": {
            "FruId": 1,
            "FruDev": "#/Eeprom_EXU",
            "EepromWp": 0,
            "StorageType": "EepromV2"
        },
        "Fru_Expander": {
            "PcbVersion": ".A",
            "PowerState": 1,
            "Health": 0,
            "EepStatus": "<=/Eeprom_EXU.HealthStatus",
            "Type": 50,
            "FruDataId": "#/FruData_Expander"
        },
        "Eeprom_EXU": {
            "OffsetWidth": 2,
            "AddrWidth": 1,
            "Address": 174,
            "WriteTmout": 100,
            "ReadTmout": 100,
            "RwBlockSize": 32,
            "WriteInterval": 20,
            "HealthStatus": 0
        }

配置如上,对Eeprom的读写没有问题,看组件代码初始化时候也有对Eeprom的操作,硬件那边有收到信号。


每次写入就这么一行打印,没有其他的了,然后实际fru没变化,硬件那边也没有信号。这个fru文件按照规范生成的,是对文件有什么特别的要求吗?看着像是没通过某种校验,所以没有去写入。



Fru问题一键日志.txt (7.5 MB)
收集的一键日志,实际是tar.gz格式,被我改后缀名了

1、ipmitool的指令加上-vv,看下工具包装的ipmitool fru write指令具体都包含了哪些命令;

2、openubmc正常通过ipmi写fru是分两步的,先调用0x30 0x90 0x04写入,然后调用0x30 0x90 0x06刷新,数据才会到eep里,你按照这个步骤执行试试能不能写进去。

ipmitool工具的命令返回

ipmitool fru write 1 fru.bin -vvv
Using ipmi device 0
Set IPMB address to 0x20
OpenIPMI Request Message Header:
  netfn     = 0x6
  cmd       = 0x1
Iana: 2011
Running Get PICMG Properties my_addr 0x20, transit 0, target 0
OpenIPMI Request Message Header:
  netfn     = 0x2c
  cmd       = 0x0
OpenIPMI Request Message Data (1 bytes)
 00
Discovered PICMG Extension Version 2.2
Acquire IPMB address
OpenIPMI Request Message Header:
  netfn     = 0x2c
  cmd       = 0x1
OpenIPMI Request Message Data (1 bytes)
 00
Discovered IPMB address 0x20
Interface address: my_addr 0x20 transit 0:0 target 0x20:0 ipmb_target 0

FRU ID           : 1
FRU File         : fru.bin
OpenIPMI Request Message Header:
  netfn     = 0xa
  cmd       = 0x10
OpenIPMI Request Message Data (1 bytes)
 01
Fru Size   = 2048 bytes
Fru Access = 0h
Fru Size         : 2048 bytes
Size to Write    : 152 bytes
OpenIPMI Request Message Header:
  netfn     = 0xa
  cmd       = 0x11
OpenIPMI Request Message Data (4 bytes)
 01 00 00 08
FRU DATA (9 bytes)
 08 01 00 00 01 05 00 00 f9
Bloc Numb : 0
Bloc Id   : Common Header Section
Bloc Start: 0
Bloc Size : 8

Bloc Numb : 1
Bloc Id   : Board Section
Bloc Start: 8
Bloc Size : 32

Bloc Numb : 2
Bloc Id   : Product Section
Bloc Start: 40
Bloc Size : 2008

Writing 8 bytes (Bloc #0: Common Header Section)
OpenIPMI Request Message Header:
  netfn     = 0xa
  cmd       = 0x12
OpenIPMI Request Message Data (11 bytes)
 01 00 00 01 00 01 05 0b 00 00 ee
Wrote 8 bytes
Writing 32 bytes (Bloc #1: Board Section)
OpenIPMI Request Message Header:
  netfn     = 0xa
  cmd       = 0x12
OpenIPMI Request Message Data (35 bytes)
 01 08 00 01 04 03 ca 31 30 2e 31 2e 31 32 33 2e
 31 cb 53 4e 30 30 30 30 30 30 30 30 31 c1 00 00
 00 00 6d
Wrote 32 bytes
Writing 35 bytes (Bloc #2: Product Section)
OpenIPMI Request Message Header:
  netfn     = 0xa
  cmd       = 0x12
OpenIPMI Request Message Data (38 bytes)
 01 28 00 01 06 00 4f d8 9b c3 42 4d 43 c8 42 4d
 43 5f 54 45 53 54 cb 53 4e 30 30 30 30 30 30 30
 30 32 c8 31 32 33
Wrote 35 bytes
Writing 35 bytes (Bloc #2: Product Section)
OpenIPMI Request Message Header:
  netfn     = 0xa
  cmd       = 0x12
OpenIPMI Request Message Data (38 bytes)
 01 4b 00 34 35 36 37 38 00 c1 00 00 00 00 00 1e
 01 08 00 c4 53 49 4e 4f c8 42 4d 43 5f 54 45 53
 54 c3 42 46 42 c3
Wrote 35 bytes
Writing 35 bytes (Bloc #2: Product Section)
OpenIPMI Request Message Header:
  netfn     = 0xa
  cmd       = 0x12
OpenIPMI Request Message Data (38 bytes)
 01 6e 00 58 58 58 cd 53 4e 30 30 30 30 30 30 30
 30 30 30 33 00 00 c8 31 32 33 34 41 42 43 44 ca
 32 30 32 35 2d 30
Wrote 35 bytes
Writing 7 bytes (Bloc #2: Product Section)
OpenIPMI Request Message Header:
  netfn     = 0xa
  cmd       = 0x12
OpenIPMI Request Message Data (10 bytes)
 01 91 00 38 2d 32 35 c1 00 cf
Wrote 7 bytes
Done


用ubmc的0x30 0x90 0x04命令可以写入,eeprom也正常写入值了,但是重启bmc,eeprom里面的数据又没了,请问是为什么呢?感觉像是bmc又全部写0了

第一次重启ipmitool fru能看到上一次的记录的信息,但是eeprom手动去读里面全是0
再次重启ipmitool fru也变成默认的数据了

写的是有效数据到对应域里了吗?不是有效数据的话确实有可能会被bmc初始化阶段清掉,V2就是这套逻辑,V3可能也是

fru.bin的大小改称2048试试,注意看一下EXU的SMC配置了吗?

指的是什么SMC?

对应板的SMC,

这个肯定有的,上下电功能都要依赖

现在有几个问题:

1、这个EepromV2指的是V2的规范,其实并不是标准的fru规范吗?对应的域要怎么样才不会被清除呢

2、使用ipmi标准命令是不是没法写入eep,只能用30 90 04那个OEM命令?

3、我昨天改成了MCU的Type,好像就不会清除Eeprom了,但是下同样的命令,会报0xC9的错误

我之前通过fru read导出的2048大小的bin文件,写入时会有这个报错 :smiling_face_with_tear:

刚刚试了下StorageType为MCU,并把之前的fru扩展成2048大小,fru write可以写入了print有相应的信息,但是Eeprom那边没有写进去,写保护是关闭的,手动对Eeprom操作可以写入。


你好!这个链接的信息可能对你解决本问题有所帮助,请参考,谢谢!