-
Notifications
You must be signed in to change notification settings - Fork 8
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
NAND sub-pages: using size 512 instead of 2048 bytes #13
Comments
At the time I tried it (4.9 kernel), it was not possible to create and use a valid ubi image. Also I never used the UBI partition in uboot. |
Guess it is ok that I close this issue. |
In the meantime we converted to subpage usage for NAND. This is the continuation of a problem report from Qauge who tried using sub-pages. First the theory: this linux-mtd thread discusses that Samsung's "E-die" NAND chips don't support subpages. And yes, according to their data sheet section 2.8, they support only 1 "partial program cycle". Now subpages work for me, and Kovz also did not tell of any problems. BTW, the chip id reported by Qauge is Manf ID: 0xec, Chip ID: 0xdc which is the same I see with my eb904. Now the reality: it might well be the case that sub-pages do not work reliable or that Samsung's chips with same id are actually different. Quallenauge, before striking the colors and reverting to the old non-sub-page handling, could you run these tests hoping we can find a better explanation? |
Short info: I followed your proposed tests, and indeed the tests fail when using the 512 (=default) subpages. (Logs will be appended here later - I have to polish the logs. Update Logs extracted from ther serial console logfile: https://paste.ee/p/d0sJi).
So I think this is the way to go. |
Hi Qauge, |
Hi @arnysch. Thanks for your feedback! The uboot crash is really annoying - Here the DDR patch comes into the game (in another issue we can discuss how I can save and restore ddr settings). |
Hi Qauge, tried out your changes. Looks very good. Wondering if this "chip->ecc_step_ds = 512" and "chip->ecc_strength_ds = 1" (yes I know, this is in kernel 4.19) in nand_samsung.c is really necessary. Same with "nand-ecc-strength = <3>" and "nand-ecc-step-size = <256>" in the dts file. Removed all of that, built and tested: seems it does not make a difference. But I did not try to understand the nand driver code; this would take more time. Maybe you could give me your orig U-Boot from mtd0? Would like to know if it is different from mine. |
Latest image is booting correctly and can mount the overlay! Thanks a lot for the good job everyone. |
Hi everybody, hi Qauge,
There is this commit "Sysupgrade: Deactivate subpages on nand". It contains this comment:
"Currently, subpages aren't working on the easybox 904 xdsl nand flash.
Allthough, The nand driver seems to report it is supported, which isn't".
I am wondering if this is really the case. Maybe UBI sub-page problems were caused by mixing old and new stuff?
For example for ages we use this kernel command line parameter "ubi.mtd=12,2048". And trying to access an existing 'old' UBI partition (which did not use sub-pages) with the current UBI driver results in errors, unless a VID header offset of 2048 is explicitly specified in the ubiattach command.
On the eb904, I played around with sub-page size of 512 bytes.
And I ran the "nandsubpagetest" program from the mtd-utils software.
To me it looks like 512 byte sub-page size works ok on the eb904.
I have documented my tests here.
I would like to hear opinions from OpenWrt-eb904 developers,
If you think it is a good idea, I would gladly provide a pull request to change the sub-page size back to 512.
BTW: my tests with U-Boot (Arcadian's version from 2010) show that UBI as part of U-Boot does not work at all. Neither with VID header offset 512 nor with 2048. U-Boot does not recognize an existing UBI partition and always reformats the partition when trying to access it with UBI commands.
The text was updated successfully, but these errors were encountered: