From: Wolfgang Denk <wd@denx.de>
To: u-boot@lists.denx.de
Subject: [U-Boot] [PATCH] tools: mkimage can read input on /dev/stdin
Date: Sun, 28 Sep 2014 08:49:21 +0200 [thread overview]
Message-ID: <20140928064921.5AE4B382278@gemini.denx.de> (raw)
In-Reply-To: <CADF714btdiJT=ccVRBuJk7xUJCgapA-ued=E1J1C0v-Bxa2h=A@mail.gmail.com>
Dear Julien,
In message <CADF714btdiJT=ccVRBuJk7xUJCgapA-ued=E1J1C0v-Bxa2h=A@mail.gmail.com> you wrote:
>
> Without the patch, with mmap:
Thanks for the numbers. So these indeed make no real difference.
> I understand the use case, in its globality, is pretty exotic.
> However, I don't really get why giving /dev/stdin as input is.
The case where mkimage is taking a single input file is quickly
becoming a rare corner case.
The recommended way to build U-Boot images is (and has been for years,
even though marketing for this has been poor) to build FIT images. In
this case you typically have several inout files, which are not even
listed on the mkimage command line, but referenced in the fit-image.its
file you use. OK, in this case you could feed the fit-image.its
through stdin. But there are other file arguments - like when using
signed images.
Even if you use the (deprecated) legacy image format, the case of using
a single input file is not the generic one. mkimage syntax is:
mkimage ... -d data_file[:data_file...] ...
and allows to provide several input files - pretty often you need the
kernel image and the DT blob. It is also not uncommon to have a
ramdisk image included.
So if we add support to read from stdin instead from a file where we
pass the file name as an argument, we should probably do this in a
consistent way. It would be a frustrating experience to the end user
to learn that he can use stdin here but not there - so we would
probably have to rework all these use cases? And how should we
implement this - would a file name "-" mean stdin (1), or should we
simply pass "/dev/stdin" as file argument (2)?
With (1), we need to change more code, while (2) could probably be
pretty transparent.
You see, even such a simple change like your suggestion needs some
deeper thought if you want to keep the design consistent. This is why
I am asking about your use case, and how it would fit into other
situations.
Best regards,
Wolfgang Denk
--
DENX Software Engineering GmbH, MD: Wolfgang Denk & Detlev Zundel
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: wd at denx.de
There is is no reason for any individual to have a computer in their
home. -- Ken Olsen (President of Digital Equipment Corporation),
Convention of the World Future Society, in Boston, 1977
next prev parent reply other threads:[~2014-09-28 6:49 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-09-26 19:33 [U-Boot] [PATCH] tools: mkimage can read input on /dev/stdin Julien Castets
2014-09-27 12:54 ` Wolfgang Denk
2014-09-27 13:11 ` Julien Castets
2014-09-27 13:25 ` Wolfgang Denk
2014-09-27 17:28 ` Julien Castets
2014-09-27 18:24 ` Wolfgang Denk
2014-09-27 19:06 ` Julien Castets
2014-09-27 21:56 ` Wolfgang Denk
2014-09-27 22:01 ` Marek Vasut
2014-09-27 22:21 ` Wolfgang Denk
2014-09-28 0:16 ` Julien Castets
2014-09-28 6:49 ` Wolfgang Denk [this message]
2014-09-28 10:49 ` Julien Castets
2014-09-28 17:48 ` Wolfgang Denk
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=20140928064921.5AE4B382278@gemini.denx.de \
--to=wd@denx.de \
--cc=u-boot@lists.denx.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