[U-Boot] Porting UBI fixes (specially fastmap's) to U-Boot

Ezequiel Garcia ezequiel at vanguardiasur.com.ar
Mon Oct 19 23:40:31 CEST 2015


On 19 October 2015 at 17:22, Richard Weinberger <richard at nod.at> wrote:
> Am 19.10.2015 um 15:47 schrieb Ezequiel Garcia:
>> After some further investigation, printing the counters as Richard suggested
>> I found it was a bug on my side :-( The Linux partition and the U-Boot partition
>> had different size (i.e. PEB count) and so Fastmap complained :-(
>>
>> We trimmed the Linux partition size, and forgot to change U-Boot's
>> (or thought it wouldn't matter).
>>
>> Sorry for the noise guys!
>
> Good to know. :)
>
> Let me find a way to detect and report this kind of user error
> better.
> The WARN_ON() is only meant for bad internal errors.
>

Sure. In case it's not clear, let me clarify what the issue was: the
MTD partition
has one size in Linux (4072 EB) and another size in U-Boot (4076 EB).

When the map was built by Linux's Fastmap, it contained a number of PEBs that
conflicted with the number of PEBs U-Boot's Fastmap code was expecting
(becase Linux EB != U-Boot EB).

Not sure how you would detect such a mismatch, but it was a very good
idea to print a noisy warning :-)

We were effectively running without fastmap so far, becasue neither U-Boot
nor Linux could find a proper fastmap and attach the UBI partition using it.

Hope it's clear.
-- 
Ezequiel García, VanguardiaSur
www.vanguardiasur.com.ar


More information about the U-Boot mailing list