[U-Boot] [PATCH v2 5/5] tools: Add tool to add crc8 to a mac address

Joe Hershberger joe.hershberger at gmail.com
Tue Jan 26 19:01:35 CET 2016


On Tue, Jan 26, 2016 at 10:31 AM, Olliver Schinagl
<o.schinagl at ultimaker.com> wrote:
> Hey all,
>
> On 26-01-16 15:56, Joe Hershberger wrote:
>>
>> Hi Albert,
>>
>> On Tue, Jan 26, 2016 at 7:15 AM, Albert ARIBAUD
>> <albert.u.boot at aribaud.net> wrote:
>>>
>>> Hello Joe,
>>>
>>> On Mon, 25 Jan 2016 18:45:52 -0600, Joe Hershberger
>>> <joe.hershberger at gmail.com> wrote:
>>>>
>>>> On Mon, Dec 14, 2015 at 6:41 AM, Olliver Schinagl
>>>> <o.schinagl at ultimaker.com> wrote:
>>>>>
>>>>> +++ b/tools/gen_mac_addr.c
>>>>
>>>> This is not "generating a mac address", right? Its point is to create
>>>> a CRC for the user-supplied MAC address.
>>>>
>>>> Perhaps a better name would be "gen_ethaddr_rom_crc".
>>>
>>> Hmm, why the "_rom" part?
>>
>> Just to give more hints to the observer that this is for creating a
>> rom or eeprom image to be read by the associated new code in U-Boot.
>
> Well depending on the output, it could even be used to verify what is stored
> in an ROM. So i understand Albert's reasoning that it may not be related to
> ROM at all

You could make it even more generic and just call it gen_crc8... make
it take an arbitrary byte stream. Anyway. I think there's no need for
speculative generality. Make the tool be named for what its purpose
is. Include the features you need it to have. If someone wants to
expand it, it can be renamed at that point.

Thanks,
-Joe


More information about the U-Boot mailing list