Is UBI volume update broken?

Ezequiel Garcia ezequiel at vanguardiasur.com.ar
Fri Jun 24 08:36:05 PDT 2016


Anatolij.

On 24 June 2016 at 10:33, Anatolij Gustschin <agust at denx.de> wrote:
[..]
>
> # ubiupdatevol /dev/ubi0_0 data.ubi
> # echo $?
> 0
>

It seems you are you writing a UBI *volume*, with an image
prepared for a UBI *device*.

> # mount -t ubifs ubi0:data /mnt
> mount: mounting ubi0:data on /mnt failed: Invalid argument
>
> I think that the data.ubi image is okay because after formatting the
> MTD partition with this very image mounting works:
>
> # ubiformat /dev/mtd4 -f data.ubi
> ubiformat: mtd4 (nor), size 16121856 bytes (15.4 MiB), 246 eraseblocks of 65536 bytes (64.0 KiB), min. I/O size 1 bytes
> libscan: scanning eraseblock 245 -- 100 % complete
> ubiformat: 246 eraseblocks have valid erase counter, mean value is 5
> ubiformat: flashing eraseblock 14 -- 100 % complete
> ubiformat: formatting eraseblock 245 -- 100 % complete
>

If you wrote down your exact steps, then it's clear this
is wrong:

ubiformat /dev/mtd4 -f data.ubi
ubiupdatevol /dev/ubi0_0 data.ubi

You probably want "ubiupdatevol /dev/ubi0_0 data.img".
-- 
Ezequiel García, VanguardiaSur
www.vanguardiasur.com.ar



More information about the linux-mtd mailing list