All of lore.kernel.org
 help / color / mirror / Atom feed
* ubiupdatevol read input from stdin or similar
@ 2017-11-02 17:09 Martin Hollingsworth
  2017-11-02 17:54 ` Richard Weinberger
  0 siblings, 1 reply; 3+ messages in thread
From: Martin Hollingsworth @ 2017-11-02 17:09 UTC (permalink / raw)
  To: linux-mtd

Hello MTD Tools community,
I am searching for help on the usage of ubiupdatevol. 
I am using ubiupdatevol version 1.5.2 and would like to pass input data from stdin or similar sources.
I hope to achieve something like the following line, where dd can be replaced by various other tools:

dd if=/dev/urandom | ubiupdatevol /dev/ubi10_1

However the above example always fails with the following error:

ubiupdatevol: error!: specify UBI device name and image file name as first 2 parameters (use -h for help)

However the commit ab8c6fb93ce9db0f09401c4b819b0b277dc00340 gives me the impression, that it could be done.
http://git.infradead.org/mtd-utils.git/commit/ab8c6fb93ce9db0f09401c4b819b0b277dc00340

However I cannot figure out how to make this work. If anyone has a code example I would be very grateful for your support!

Thanks and regards,
Martin Hollingsworth

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: ubiupdatevol read input from stdin or similar
  2017-11-02 17:09 ubiupdatevol read input from stdin or similar Martin Hollingsworth
@ 2017-11-02 17:54 ` Richard Weinberger
  2017-11-06 17:51   ` AW: " Martin Hollingsworth
  0 siblings, 1 reply; 3+ messages in thread
From: Richard Weinberger @ 2017-11-02 17:54 UTC (permalink / raw)
  To: Martin Hollingsworth; +Cc: linux-mtd

Martin,

On Thu, Nov 2, 2017 at 6:09 PM, Martin Hollingsworth
<Martin.Hollingsworth@itk-engineering.de> wrote:
> Hello MTD Tools community,
> I am searching for help on the usage of ubiupdatevol.
> I am using ubiupdatevol version 1.5.2 and would like to pass input data from stdin or similar sources.
> I hope to achieve something like the following line, where dd can be replaced by various other tools:
>
> dd if=/dev/urandom | ubiupdatevol /dev/ubi10_1
>
> However the above example always fails with the following error:
>
> ubiupdatevol: error!: specify UBI device name and image file name as first 2 parameters (use -h for help)
>
> However the commit ab8c6fb93ce9db0f09401c4b819b0b277dc00340 gives me the impression, that it could be done.
> http://git.infradead.org/mtd-utils.git/commit/ab8c6fb93ce9db0f09401c4b819b0b277dc00340
>
> However I cannot figure out how to make this work. If anyone has a code example I would be very grateful for your support!

Did you try using "-" as filename?

-- 
Thanks,
//richard

^ permalink raw reply	[flat|nested] 3+ messages in thread

* AW: ubiupdatevol read input from stdin or similar
  2017-11-02 17:54 ` Richard Weinberger
@ 2017-11-06 17:51   ` Martin Hollingsworth
  0 siblings, 0 replies; 3+ messages in thread
From: Martin Hollingsworth @ 2017-11-06 17:51 UTC (permalink / raw)
  To: Richard Weinberger; +Cc: linux-mtd

> Did you try using "-" as filename?

That does the trick!

Example:
dd if=/dev/urandom | ubiupdatevol /dev/ubi11_2 - --size=65673216
Where size equals the exact size of the data you expect to come over the pipe (hence the size of the real source that dd or any other tool would read in this case).

Thanks to you Richard and regards,
Martin Hollingsworth

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2017-11-06 17:52 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-11-02 17:09 ubiupdatevol read input from stdin or similar Martin Hollingsworth
2017-11-02 17:54 ` Richard Weinberger
2017-11-06 17:51   ` AW: " Martin Hollingsworth

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.