Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

FS#1145 - ar71xx/mikrotik: sysupgrade on rb-nor devices broken after 4k sectors re-enabled #6119

Closed
openwrt-bot opened this issue Nov 4, 2017 · 5 comments
Labels

Comments

@openwrt-bot
Copy link

joaochainho:

Commit b7ea141 (ar71xx: re-enable 4k sectors for the mikrotik subtargets) breaks sysupgrade on Mikrotik RB-NOR devices, such as RB951Ui-2nD (hAP lite) and RB750UPr2 (hEX PoE lite).
NAND devices seem unaffected.
Here's some kernel log from a RB951Ui-2nD device right after sysupgrade.

... [ 24.702338] jffs2: Node at 0x00005044 with length 0x00001044 would run over the end of the erase block [ 24.712033] jffs2: Perhaps the file system was created with the wrong erase size? [ 24.848051] jffs2: jffs2_scan_eraseblock(): Magic bitmask 0x1985 not found at 0x0000504c: 0xee2d instead [ 24.889528] jffs2: jffs2_scan_eraseblock(): Magic bitmask 0x1985 not found at 0x00005064: 0x59fd instead [ 25.014379] jffs2: jffs2_scan_eraseblock(): Magic bitmask 0x1985 not found at 0x00005068: 0x59fd instead [ 25.024182] jffs2: jffs2_scan_eraseblock(): Magic bitmask 0x1985 not found at 0x0000506c: 0x59fd instead [ 25.078651] jffs2: jffs2_scan_eraseblock(): Magic bitmask 0x1985 not found at 0x00005080: 0x2134 instead [ 25.177825] jffs2: jffs2_scan_eraseblock(): Magic bitmask 0x1985 not found at 0x00005084: 0x5455 instead [ 25.214600] jffs2: jffs2_scan_eraseblock(): Magic bitmask 0x1985 not found at 0x00005088: 0x1f8b instead [ 25.242184] jffs2: jffs2_scan_eraseblock(): Magic bitmask 0x1985 not found at 0x00005090: 0x0203 instead [ 25.274445] jffs2: jffs2_scan_eraseblock(): Magic bitmask 0x1985 not found at 0x00005094: 0x6b77 instead [ 25.284246] jffs2: jffs2_scan_eraseblock(): Magic bitmask 0x1985 not found at 0x00005098: 0x72f9 instead [ 25.294061] jffs2: Further such events for this erase block will not be printed ... [ 26.091293] jffs2: Node at 0x00006088 with length 0x00001044 would run over the end of the erase block [ 26.100961] jffs2: Perhaps the file system was created with the wrong erase size? [ 26.178417] jffs2: jffs2_scan_eraseblock(): Magic bitmask 0x1985 not found at 0x00007000: 0xcc1d instead [ 26.283376] jffs2: jffs2_scan_eraseblock(): Magic bitmask 0x1985 not found at 0x00007004: 0x3d2b instead ... [ 27.784339] jffs2: jffs2_scan_eraseblock(): Magic bitmask 0x1985 not found at 0x00009020: 0x2c01 instead [ 27.794148] jffs2: jffs2_scan_eraseblock(): Magic bitmask 0x1985 not found at 0x00009024: 0xe20a instead [ 27.803960] jffs2: Further such events for this erase block will not be printed [ 27.914893] jffs2_scan_eraseblock(): End of filesystem marker found at 0x15000 [ 27.923162] jffs2_build_filesystem(): unlocking the mtd device... [ 27.929414] done. [ 27.931406] jffs2_build_filesystem(): erasing all blocks after the end marker... ... I did remove the option ** CONFIG_MTD_SPI_NOR_USE_4K_SECTORS=y** and everything looks good.
@openwrt-bot
Copy link
Author

mkresin:

It should only happen if you are doing a sysupgrade with keeping your settings.

And it should only happen once, if you are doing a sysupgrade from an image without CONFIG_MTD_SPI_NOR_USE_4K_SECTORS=y to an image with CONFIG_MTD_SPI_NOR_USE_4K_SECTORS=y.

See FS#385 and more specific my comment from 16.01.2017 00:11 in that ticket.

The question I have, was your config preserved successfully?

@openwrt-bot
Copy link
Author

joaochainho:

Hi Mathias, the config was never preserved.
I tried to do sysupgrade on top of the previous one with the same firmware file, and still the config wasn't kept.
Furthermore, I tried to flash the router from scratch (tftpboot + sysupgrade) using both xxx.elf and xxx-sysupgrade.bin files from the snapshot repo, and the router went into bootloop.

@openwrt-bot
Copy link
Author

nbd:

Please test my staging tree at https://git.lede-project.org/?p=lede/nbd/staging.git;a=summary
It should disable 4K sectors for large flash chips and only use them for smaller ones.

@openwrt-bot
Copy link
Author

joaochainho:

Hi Felix, let me thank you for your work.
I already started compiling and will test it right away.

@openwrt-bot
Copy link
Author

joaochainho:

Hi Felix, I tested on a RB750UPr2 and it works fine. Unfortunately I don't have a RB951Ui-2nD at hand right now, but I think it will work fine as well.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant