From: Sascha Hauer <s.hauer@pengutronix.de>
To: Ahmad Fatoum <a.fatoum@pengutronix.de>
Cc: barebox@lists.infradead.org
Subject: Re: [PATCH 08/10] scripts: Add Barebox TLV Generator Tooling
Date: Mon, 14 Apr 2025 17:00:05 +0200 [thread overview]
Message-ID: <Z_0i9cXehlM2D5EE@pengutronix.de> (raw)
In-Reply-To: <20250411074045.2019372-9-a.fatoum@pengutronix.de>
On Fri, Apr 11, 2025 at 09:40:43AM +0200, Ahmad Fatoum wrote:
> From: Chris Fiege <cfi@pengutronix.de>
>
> This host-tooling creates binaries in the Barebox TLV format.
> It is intended to be used in the factory (either as script or library)
> and creates a tlv binary from a given schema and data.
>
> For convenience an example schema and dataset are provided.
>
> diff --git a/scripts/bareboxtlv-generator/requirements.txt b/scripts/bareboxtlv-generator/requirements.txt
> new file mode 100644
> index 000000000000..a1f7e3b3f2a3
> --- /dev/null
> +++ b/scripts/bareboxtlv-generator/requirements.txt
> @@ -0,0 +1,2 @@
> +crcmod
> +pyaml
> diff --git a/scripts/bareboxtlv-generator/schema-example.yaml b/scripts/bareboxtlv-generator/schema-example.yaml
> new file mode 100644
> index 000000000000..4927b869513d
> --- /dev/null
> +++ b/scripts/bareboxtlv-generator/schema-example.yaml
> @@ -0,0 +1,48 @@
> +magic: 0xc6895c21
> +max_size: 0x100
The first thing I tried with this was according to the user
documentation:
./bareboxtlv-generator.py --input-data data-example.yaml schema-example.yaml tlv.bin
And fed that into the barebox tlv command. I ended up with an empty node
because the magic doesn't match.
Can we change the magic to TLV_MAGIC_BAREBOX_V1 in the example and only
add things here that are supposed to be generic? That would make the
example more useful as a starting point.
> +
> +tags:
> + factory-timestamp:
> + tag: 0x0003
> + format: "decimal"
> + length: 8
> + example: 1636451762
> +
> + modification:
> + tag: 0x0005
> + format: decimal
> + length: 1
> + example: 42
> + purpose: "0: Device unmodified; 1: Device has undocumented modifications"
0 is unmodified, 1 is modified and 42 is what? ;)
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 |
next prev parent reply other threads:[~2025-04-14 15:21 UTC|newest]
Thread overview: 17+ 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
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 [this message]
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
2025-04-22 11:40 ` [PATCH 00/10] Add barebox TLV infrastructure Ahmad Fatoum
2025-06-02 10:18 ` Sascha Hauer
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=Z_0i9cXehlM2D5EE@pengutronix.de \
--to=s.hauer@pengutronix.de \
--cc=a.fatoum@pengutronix.de \
--cc=barebox@lists.infradead.org \
/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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.