ubiupdatevol read input from stdin or similar
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
Martin,
Quoted 7 lines · Martin Hollingsworth
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
Quoted 8 lines
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
ab8c6fb93ce9db0f09401c4b819b0b277dc00340gives me the impression, that it could be done.
http://git.infradead.org/mtd-utils.git/commit/ab8c6fb93ce9db0f09401c4b819b0b277dc00340However 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?
Signature · 2 lines
Thanks, //richard
Quoted 1 line
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