[LEDE-DEV] Mikrotik RB411AH sysupgrade issues
ryazanov.s.a at gmail.com
Fri Feb 24 07:45:44 PST 2017
On Wed, Feb 22, 2017 at 1:36 PM, Felix Fietkau <nbd at nbd.name> wrote:
> On 2017-02-21 23:10, Sergey Ryazanov wrote:
>> I tried to install latest LEDE to RB411AH board. Sysupgrade worked
>> fine, but device now do not boot at all. Bootloader claims that it
>> could not find kernel :(
>> I tracked down the situation and found that the kernel partition image
>> generated with assumption that any 64Mb NAND flash IC consists of
>> pages, the size of which is 512 bytes with an 8-byte spare area. But
>> my board equipped with Toshiba NAND flash, which consists of pages,
>> the size of which is 2048 bytes with an 64-byte spare area.
>> Even worse, after such reflashing with the corruption of the page
>> structure, kernel starts thinking that pages are bad and they could
>> not be used anymore. So I had to install vendor's firmware back with
>> help of vendor utility to recover pages structure.
>> To fix this I see several solutions:
>> 1. Generate more images, one for each combination of flash and page
>> sizes (e.g. xxx-64m-512-sysupgrade.bin, xxxx-64m-2048-sysupgrade.bin)
>> Pros: quick realization, no sysupgrade code modification
>> Cons: exponential growth of number of images, unusable due to endless
>> mess with this set of images.
> By the way, the 64m image is only named as such, because I didn't know
> that there were any devices with 64M nand and 2048 byte page size.
> You should be able to flash the nand-large image on your device just fine.
I had flashed "large" image to my RB411AH board and it works like a
charm. Great work!
I am sorry that I missed that this images differ only in the page size
and I did not try this image before. Thank you for your support!
BTW, in previous mail I forgot to specify that the flash chip model is
> To prevent flashing errors like the one you had, maybe it would be a
> good first step to add metadata to the image and make sysupgrade set the
> board type to nand-64m or nand-large depending on the flash parameters.
Looks like boards with the same name could be equipped by different
flash models. Could we just add new optional metadata field
'flash-page-size' to avoid growth of number of board types? And
entitle images like 'mikrotik-nand-pg512', 'mirkotik-nand-pg2048'?
More information about the Lede-dev