mail archive of the barebox mailing list
 help / color / mirror / Atom feed
From: Ahmad Fatoum <a.fatoum@pengutronix.de>
To: Sascha Hauer <s.hauer@pengutronix.de>
Cc: barebox@lists.infradead.org
Subject: Re: [PATCH 04/10] common: add barebox TLV support
Date: Mon, 14 Apr 2025 16:57:35 +0200	[thread overview]
Message-ID: <f6fbe760-c64a-4d73-b820-fda3f5c69e43@pengutronix.de> (raw)
In-Reply-To: <Z_0glf7ptAh3RtAF@pengutronix.de>

Hello Sascha,

On 4/14/25 16:49, Sascha Hauer wrote:
> On Fri, Apr 11, 2025 at 09:40:39AM +0200, Ahmad Fatoum wrote:
>> barebox TLV is a scheme for storing factory data on non-volatile
>> storage. Unlike state, it's meant to be read-only and if content
>> is limited to already specified tags, it can be extended later on,
>> without modifying the bootloader binary.
>>
>> Signed-off-by: Ahmad Fatoum <a.fatoum@pengutronix.de>
>> ---
>> +struct tlv_mapping barebox_tlv_v1_mappings[] = {
>> +	{ 0x0002, tlv_format_str, "device-hardware-release" },
>> +	{ 0x0003, tlv_format_dec, "factory-timestamp" },
> 
> The numbers in the examples suggest that the format is in epoch time,
> but shouldn't this be documented?

Good point. Yes, it's seconds since the UNIX epoch.
Will document it for v2.

>> +	{ 0x0004, tlv_handle_serial, "device-serial-number"},
>> +	{ 0x0005, tlv_format_dec, "modification" },
>> +	{ 0x0006, tlv_format_str, "featureset" },
> 
> I think things like "device-hardware-release", "modification" and "featureset"
> need (better) documentation, at least when they are supposed to be generic.

In the end the revision scheme and the concrete interpretation of bits
depends on the project, but I can add some generic documentation inline,
e.g.:

device-hardware-release: Detailed release information string for the device

modification: 0: Device is unmodified. Any set bits indicate a
board-specific modification after assembly

featureset: Any set bits indicate enablement of board-specific features

> 
>> +	{ 0x0007, tlv_format_str, "pcba-serial-number"},
>> +	{ 0x0008, tlv_format_str, "pcba-hardware-release"},
> 
> Assuming 'pcb' is for printed circuit board, what is 'a'?

assembly as in the PCB with electronics components attached.

Cheers,
Ahmad

> 
> Sascha
> 
> 

-- 
Pengutronix e.K.                  |                             |
Steuerwalder Str. 21              | http://www.pengutronix.de/  |
31137 Hildesheim, Germany         | Phone: +49-5121-206917-0    |
Amtsgericht Hildesheim, HRA 2686  | Fax:   +49-5121-206917-5555 |




  reply	other threads:[~2025-04-14 15:09 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-04-11  7:40 [PATCH 00/10] Add barebox TLV infrastructure Ahmad Fatoum
2025-04-11  7:40 ` [PATCH 01/10] net: factor out eth_of_get_fixup_node Ahmad Fatoum
2025-04-11  7:40 ` [PATCH 02/10] net: export list of registered ethernet addresses Ahmad Fatoum
2025-04-11  7:40 ` [PATCH 03/10] common: add optional systemd.hostname generation Ahmad Fatoum
2025-04-11  7:40 ` [PATCH 04/10] common: add barebox TLV support Ahmad Fatoum
2025-04-14 14:49   ` Sascha Hauer
2025-04-14 14:57     ` Ahmad Fatoum [this message]
2025-04-14 15:06       ` Sascha Hauer
2025-04-11  7:40 ` [PATCH 05/10] commands: add TLV debugging command Ahmad Fatoum
2025-04-11  7:40 ` [PATCH 06/10] scripts: add bareboxtlv host/target tool Ahmad Fatoum
2025-04-11  7:40 ` [PATCH 07/10] boards: add decoder for LXA TLV v1 format Ahmad Fatoum
2025-04-11  7:40 ` [PATCH 08/10] scripts: Add Barebox TLV Generator Tooling Ahmad Fatoum
2025-04-14 15:00   ` Sascha Hauer
2025-04-11  7:40 ` [PATCH 09/10] doc: Add User-Documentation for Barebox TLV Ahmad Fatoum
2025-04-11  7:40 ` [PATCH 10/10] ARM: stm32mp: lxa: enable TLV support for TAC & FairyTux2 Ahmad Fatoum

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=f6fbe760-c64a-4d73-b820-fda3f5c69e43@pengutronix.de \
    --to=a.fatoum@pengutronix.de \
    --cc=barebox@lists.infradead.org \
    --cc=s.hauer@pengutronix.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox