Hello, On 16 January 2015 at 13:33, Lars Doelle <lars.doe...@on-line.de> wrote: > Hi Maxime, > > >> > working on the dts for an A20 device, I'm currently at the nand. >> I assume you are aware of the current state of the NAND, right? > > Not exactly, so I better be explicit. I assume, that the linux-sunxi > /dev/nand driver does not do any wear-level mapping on the first > blocks. > > Thus I'd be able to read the first MB out by both /dev/nand in > linux-sunxi and by the mtd driver in mainline with identical results.
Only the MTD driver gives access to those blocks. /dev/nand is the block device which does wear levelling and excludes this area. > > Further, I have a yet unused NAND on a Lime2 board, so I could dare > to test writing to some higher addresses. That's about the experiment > I plan to do initially. > > I'm aware, that the first sectors are precious for the boot process > and must be preserved, but they could be restored via FEX-boot in > case I break them by wrong pin settings or whatever else. You can restore them either by using the MTD driver (untested) or flashing with livesuit. > > I've not researched whether ubi would touch the boot sector, and > I will not try to install any fs before making sure, that it is preserved. > I'm booting from a SD anyway, so it is only boot0 that I have to care > for to keep the device operational. But that is all a different construction > site. The MTD driver should preserve the sectors but when MTD is used these sectors should contain a bootloader (SPL) that understands MTD. I am not aware of any such bootloader for sunxi hardware but once the sunxi nand driver is ported from Linux to u-boot it should be possible to build one. Thanks Michal -- You received this message because you are subscribed to the Google Groups "linux-sunxi" group. To unsubscribe from this group and stop receiving emails from it, send an email to linux-sunxi+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.