[PATCH v2 1/3] cmd: mvebu: Implement the Marvell hw_info command

Luka Kovacic luka.kovacic at sartura.hr
Sun Feb 28 23:03:13 CET 2021


Hello Marek,

On Sat, Feb 27, 2021 at 2:05 PM Marek Behun <marek.behun at nic.cz> wrote:
>
> Luka, Tom,
>
> I am very against this.
>
> there already is `mac` command in cmd/mac.c with following help
>    display and program the system ID and MAC addresses in EEPROM
>    [read|save|id|num|errata|date|ports|port_number]
>    mac read
>        - read EEPROM content into memory data structure
>    mac save
>        - save memory data structure to the EEPROM
>    mac id
>        - program system id per hard coded value
>    mac num string
>        - program system serial number to value string
>    mac errata string
>        - program errata data to value string
>    mac date YYMMDDhhmmss
>        - program date to string value YYMMDDhhmmss
>    mac ports N
>        - program the number of network ports to integer N
>    mac X string
>        - program MAC addr for port X [X=0,1..] to colon separated string"
>
> Why introducing new, vendor specific commands, when we have a global
> API for such a thing?

I have to admit, I wasn't aware that this command existed.

I will transfer the implementation of the hw_info command into this existing
framework, I completely agree that this is a better solution.
Also when the "mac read" command would be executed, I'd also transfer
all of the other OEM values to the environment (the MACs and the 4
additional values).

Also I'll check how the current implementation is done in some of the boards.

Kind regards,
Luka

>
> Marek


More information about the U-Boot mailing list