routerbootpart: hard_config partition can be larger than a single block on MikroTik devices
Thibaut
hacks at slashdirt.org
Sat May 1 10:27:59 BST 2021
> Le 1 mai 2021 à 10:49, Baptiste Jonglez <baptiste at bitsofnetworks.org> a écrit :
>
> On 01-05-21, Thibaut wrote:
>>> Do you see a clean way to support this without breaking support for other
>>> boards? Do you think we can determine this size from somewhere else in
>>> the flash, or should I just set "size = <0x2000>" in the DTS and hope that
>>> it's valid for all hap-ac2 boards?
>>
>> No, please don't. I can already tell you that this is not the case.
>>
>> My hap-ac2 has a 4K hard_config, and from my understanding so do the ones that were tested in PR#3037, like every other mikrotik boards known at the time the driver was last updated. Of course it was only a matter of time before Mikrotik pulled that rug under our feet.
>
> Ok, the bootlog from https://openwrt.org/toh/mikrotik/mikrotik_hap_ac2#openwrt_bootlog
> also has enough space for a 8K hard_config partition, so it may be more
> common than previously thought (at least for this specific device).
Yes, but only the first 4K is used. What’s needed is to check whether or not the rb_hardconfig driver will successfully process a 4K-only block from an 8K partition. I *think* it should, but haven’t looked back at the code or tested that yet.
If that’s the case then adapting routerbootpart is relatively trivial.
> Note that the device for which I have the issue is an "old" one from 2019,
> it's still using a single tag for the ERD data (LZO + RLE).
>
> I'll send a RFC patch to give an idea of the change I have in mind (there
> are a few more changes needed than just setting the size in the DTS).
>
>> Can you provide me with a dump of the Routerboot partition?
>>
>> I’ll take a look at what can be « sanely » done.
>
> Sure, here it is.
Thanks, I’ll take a look soon.
Thibaut
More information about the openwrt-devel
mailing list