Re: [U-Boot] DFU and UBIFS Volume upgrade

2019-09-04 Thread Loic Poulain
Thanks Heiko,

On Wed, 4 Sep 2019 at 07:24, Heiko Schocher  wrote:

> Hello Loic,
>
> added Lukasz as he is the DFU custodian.
>
> Am 03.09.2019 um 09:59 schrieb Loic Poulain:
> > Hi,
> >
> > AFAIU, today it's possible to update a UBI partition via DFU with a new
> UBI
> > blob using 'partubi'.
>
> Yes.
>
> > However, this causes two issues/limitations:
> > - It erases the partition, causing PEB erase counters amnesia (contrary
> to
> > Linux ubiformat)
>
> Yes, patches which fixes this are welcome :-P
>
> > - It's no possible to have a volume-grained upgrade (per UBIFS volume)
>
> I am not to deep in the DFU topic involved, but I think the problem
> is that ubi is not an interface like "nand" or "mmc" it is more something
> like a partition type ...
>
> The big problem with writting an ubi image into nand is, that you
> need to store the image first in RAM and you may have not enough ...
> so may writting volume serverally it may help out here.
>
> On the other side, it is may possible to introduce an ubi interface for
> UBI volumes. But what if your board has not setup yet UBI, nor the UBI
> Volumes? Is there an interface in DFU for setting up something like
> "partitions" ? You need to pass several parameters to create a new
> UBI Volume ...
>

That's a good point. This makes things a bit complicated.


> May Lukasz can say here more ...
>
> I prefer nowadays to boot a linux and use swupdate, which can handle
> UBI Volumes ...
>

I agree, so let's keep that out of DFU.

So, the priority is maybe to preserve erase-counters to keep optimal wear
leveling.
This should be quite simple to fix, I'll look at the UBI spec and come back
with a patch.

Regards,
Loic
___
U-Boot mailing list
U-Boot@lists.denx.de
https://lists.denx.de/listinfo/u-boot


Re: [U-Boot] DFU and UBIFS Volume upgrade

2019-09-03 Thread Heiko Schocher

Hello Loic,

added Lukasz as he is the DFU custodian.

Am 03.09.2019 um 09:59 schrieb Loic Poulain:

Hi,

AFAIU, today it's possible to update a UBI partition via DFU with a new UBI
blob using 'partubi'.


Yes.


However, this causes two issues/limitations:
- It erases the partition, causing PEB erase counters amnesia (contrary to
Linux ubiformat)


Yes, patches which fixes this are welcome :-P


- It's no possible to have a volume-grained upgrade (per UBIFS volume)


I am not to deep in the DFU topic involved, but I think the problem
is that ubi is not an interface like "nand" or "mmc" it is more something
like a partition type ...

The big problem with writting an ubi image into nand is, that you
need to store the image first in RAM and you may have not enough ...
so may writting volume serverally it may help out here.

On the other side, it is may possible to introduce an ubi interface for
UBI volumes. But what if your board has not setup yet UBI, nor the UBI
Volumes? Is there an interface in DFU for setting up something like
"partitions" ? You need to pass several parameters to create a new
UBI Volume ...

May Lukasz can say here more ...

I prefer nowadays to boot a linux and use swupdate, which can handle
UBI Volumes ...


I saw some (very) old threads on this subject but no conclusion. Did I miss
something? any recommendations?


No there is no update on this, or I do not know it.

bye,
Heiko
--
DENX Software Engineering GmbH,  Managing Director: Wolfgang Denk
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: +49-8142-66989-52   Fax: +49-8142-66989-80   Email: h...@denx.de
___
U-Boot mailing list
U-Boot@lists.denx.de
https://lists.denx.de/listinfo/u-boot