Cannot write to ubi volume
Artem Bityutskiy
dedekind at infradead.org
Thu Jun 5 01:08:04 EDT 2008
Hi,
On Wed, 2008-06-04 at 17:49 +0200, iw3gtf at tiscali.it wrote:
> according to the ubi documentation it should be possible to 'write' in
> a, say, /dev/ubi1_0 (dynamic) volume device.
Could you please point where exactly you have read this - these docs.
should be fixed.
Direct writes like you tried are prohibited and you have to use volume
update operation, or ubiupdatevol utility instead of dd:
ubiupdatevol /dev/ubi1_0 /usr/local/tftp_root/k
> Am I completely wrong trying to write with a 'dd' ?
Yes.
> How should I proceed to write something into the volume ?
ubiupdatevol
> Is it possible to write something 'directly' in an ubi volume without
> explicitly formatting an image file (with 'ubinize' for example) ?
ubinize is needed if you want to pre-create a _raw_ flash image and
write it to _raw_ flash (e.g., /dev/mtd0). If you already have UBI
running and want to put arbitrary contents from file 'x' to the volume,
then you use 'ubiupdatevol <UBI volume device> x'. Or you may use thr
corresponding ioctl from your programs.
Direct writes with dd and the like are prohibited by design, mostly to
protect UBI from dumb users (and dumb users from themselves). Indeed,
direct writes are tricky and the user has to be very careful. However,
if you show the reasons why you have to have direct writes and cannot
live with volume update, we may allow them.
> Excuse me if my questions are a bit silly or naive and thank you for
> your explanations.
No problem.
--
Best regards,
Artem Bityutskiy (Битюцкий Артём)
More information about the linux-mtd
mailing list