[U-Boot] [PATCH 1/3] cmd: fru: Add support for FRU commands

Michal Simek monstr at monstr.eu
Tue Oct 22 13:45:15 UTC 2019


On 22. 10. 19 15:09, Michael Walle wrote:
> Am 2019-10-14 15:29, schrieb Michal Simek:
>> From: Siva Durga Prasad Paladugu <siva.durga.paladugu at xilinx.com>
>>
>> This patch adds support for fru commands "fru capture" and "fru display".
>> The fru capture parses the FRU table present at an address and stores
>> in a
>> structure for later use. The fru display prints the content of captured
>> structured in a readable format.
>>
>> As of now, it supports only common header and board area of FRU. Also, it
>> supports only English language code and ASCII8 format.
>>
>> fru_data variable is placed to data section because fru parser can be
>> called very early before bss is initialized. And also information
>> needs to
>> be shared that's why it is exported via header.
> 
> Wouldn't it make more sense to have a level of indirection so other
> "fru" formats might be supported as well. As far as I can see, only
> "your" type of FRU data is supported by this command and there is now
> way to extend it.

Current code is just showing board information which is what it is in
FRU spec and it is common for all. There is no any OEM specific field now.

> Also why do the user have to manually do a "fru capture"? The use case
> is to display any FRU data, correct? So from a users perspective a "fru
> display" be sufficient to display the data.

The code was written for using fru board detection code where capture
part can be performed without displaying results. Simply because you
need to find where you are running to be able to know which device to
use for showing results. It means internally it needs to be divided.
That's going to second point if make sense to have two separate commands
or just one.
And it should be ok to have only one command till there is a need to do
it differently.

Thanks,
Michal

-- 
Michal Simek, Ing. (M.Eng), OpenPGP -> KeyID: FE3D1F91
w: www.monstr.eu p: +42-0-721842854
Maintainer of Linux kernel - Xilinx Microblaze
Maintainer of Linux kernel - Xilinx Zynq ARM and ZynqMP ARM64 SoCs
U-Boot custodian - Xilinx Microblaze/Zynq/ZynqMP/Versal SoCs



More information about the U-Boot mailing list