From: Simon Glass <sjg-F7+t8E8rja9g9hUCZPvPmw@public.gmane.org>
To: "Rafał Miłecki" <zajec5-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
Cc: "David Gibson"
<david-xT8FGy+AXnRB3Ne2BGzF6laj5H9X9Tb+@public.gmane.org>,
"Jon Loeliger" <loeliger-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>,
devicetree-compiler-u79uwXL29TY76Z2rM5mHXA@public.gmane.org,
"Rafał Miłecki" <rafal-g1n6cQUeyibVItvQsEIGlw@public.gmane.org>
Subject: Re: [PATCH] Support 'b' format for printing raw bytes with fdtget
Date: Tue, 7 Dec 2021 08:07:24 -0700 [thread overview]
Message-ID: <CAPnjgZ3MCjyJx5u8daJE-j7z1gg_zzWSffPcGiL9KDb3qttN+A@mail.gmail.com> (raw)
In-Reply-To: <20211206154953.17089-1-zajec5-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
Hi Rafał,
On Mon, 6 Dec 2021 at 09:09, Rafał Miłecki <zajec5-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:
>
> From: Rafał Miłecki <rafal-g1n6cQUeyibVItvQsEIGlw@public.gmane.org>
>
> FT is sometimes used for storing raw data. That is quite common for
> U-Boot FIT images.
>
> Extracting such data is not trivial currently. Using type 's' (string)
> will replace every 0x00 (NUL) with 0x20 (space). Using type 'x' will
> print bytes but in xxd incompatible format.
>
> This commit adds support for 'b' (binary) format. Example usage:
> fdtget -t b firmware.itb /images/foo data > image.raw
>
> Signed-off-by: Rafał Miłecki <rafal-g1n6cQUeyibVItvQsEIGlw@public.gmane.org>
> ---
> fdtget.c | 5 +++++
> util.c | 24 ++++++++++++++----------
> 2 files changed, 19 insertions(+), 10 deletions(-)
I think this is a good idea.
I'm worried about using 'b' which we already use as a modifier. Won't
that be ambiguous? Perhaps not, but it needs a doc update, at least.
Please add to fdtput also
Please add some tests too.
Regards,
SImon
next prev parent reply other threads:[~2021-12-07 15:07 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-12-06 15:49 [PATCH] Support 'b' format for printing raw bytes with fdtget Rafał Miłecki
[not found] ` <20211206154953.17089-1-zajec5-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
2021-12-07 15:07 ` Simon Glass [this message]
2021-12-08 17:00 ` [PATCH V2] " Rafał Miłecki
[not found] ` <20211208170055.13811-1-zajec5-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
2021-12-09 2:22 ` David Gibson
2021-12-09 5:30 ` [PATCH V3] Support 'r' " Rafał Miłecki
[not found] ` <20211209053041.17984-1-zajec5-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
2021-12-09 5:52 ` David Gibson
2021-12-09 6:06 ` Rafał Miłecki
[not found] ` <c59e41fd-bdfc-c419-e68f-0f6086c9b61e-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
2021-12-09 6:17 ` Rafał Miłecki
2021-12-09 6:23 ` David Gibson
2021-12-09 6:14 ` [PATCH V4] " Rafał Miłecki
[not found] ` <20211209061420.29466-1-zajec5-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
2021-12-09 6:52 ` David Gibson
2021-12-09 7:09 ` Rafał Miłecki
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=CAPnjgZ3MCjyJx5u8daJE-j7z1gg_zzWSffPcGiL9KDb3qttN+A@mail.gmail.com \
--to=sjg-f7+t8e8rja9g9huczpvpmw@public.gmane.org \
--cc=david-xT8FGy+AXnRB3Ne2BGzF6laj5H9X9Tb+@public.gmane.org \
--cc=devicetree-compiler-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
--cc=loeliger-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org \
--cc=rafal-g1n6cQUeyibVItvQsEIGlw@public.gmane.org \
--cc=zajec5-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).