Hi, Michael,
В Сбт, 24/09/2011 в 00:42 +, Michael Sokolov пишет:
Hello again,
As I was browsing through the Om community documentation, I saw a note
somewhere (I think it was somewhere in the wiki, but I have a hard time
finding it again) saying that the native NAND flash on the GTA02 should
not be used for anything but the bootloader, and that the OS/distro
should live on the micro-SD card instead. No explanation was given as
to why. I wonder, would anyone here happen to know the rationale for
that recommendation? And does the Om community actually follow that
recommendation? Where do most GTA02 users keep their OS/distro: NAND
or micro-SD?
Community is set of independent people, they may have opposite opinions
on some questions, and someone may write his opinion onto wiki. Others
may ignore it or even just do not want to contradict person who wrote
it. This way you may get anything on wiki. Personally I prefer to add
exploration :)
Personally I were using mixed NAND/sd environment - just /usr and /home
moved to sd. NAND is 100% reliable and much faster (especially with
UBI), so it is worth using it.
Unless I'm missing an elephant somewhere, my common sense suggests that
JFFS2 on the native NAND ought to be much more convenient: SD is a
serial bus, and it hangs off the Glamo on the GTA02, whereas the native
NAND is, well, native, it's right there inside the MCU. It also seems
to me that the native NAND ought to be an outright win in terms of power
management: NAND is powered from the IO_1V8 rail which is fed from a
switching converter in the PMIC, whereas SD is powered via an HCLDO at
3.3 V. The IO_1V8 supply has to stay on all the time anyway as it keeps
the SDRAM in self-refresh, so whatever tiny idle current the NAND draws
is going to be the same whether one uses it to store a file system or
not. But for the SD one needs 3.3 instead of 1.8 V, the linear regulator
is inherently more wasteful than a switcher, and what happens when the
battery voltage falls below 3.3 V? If I've read the PMIC datasheet
correctly, one ought to be able to keep running a GTA02 on battery until
it goes down to almost 2.8 V: I reason it ought to be doable with NAND,
but not with SD.
Interesting point. I noticed that all my last GSM failures with GTA were
related to simple fact that CPU itself were working, but GSM do not
because simple battery discharge.
May be it is possible to get similar problems with glamo? May be all
glamo problems related to power supply? We have very strange glamo init
procedure on boot.
The only truly valid reason I've been able to come up with for using SD
instead of NAND is flash wear concerns. As all good embedded system
engineers know, NAND flash is finicky: you've got read disturb, program
disturb, and a limited number of erase cycles in each block. Of course
the actual physics of NAND flash is exactly the same whether you use it
directly or if it's hidden from you behind an interface like SD. The
actual magic smoke in those SD cards, USB sticks etc is the exact same
NAND which people dislike using directly; the only difference is that
with native NAND you as a Linux developer get to implement the necessary
algorithms yourself (JFFS2 et al) in a fully visible, free / open source
manner, whereas with SD cards etc someone else has done that work, in
the form of a closed source circuit which you have no visibility into.
I tend to agree with Linux MTD maintainer dwmw2's preference of doing it
all yourself with JFFS2 et al.
Of course the underlying problem of flash wear exhaustion remains there:
no matter how good your flash management algorithms are, eventually the
available number of erase/program cycles will be exhausted for more
blocks than the maximum number of bad blocks one can tolerate. What do
we do then? This concern is the ONLY area where I can see an advantage
with SD: once the micro-SD card's flash wear cycles have been exhausted
(forgetting for the moment that you can't actually depend on the card
reporting this condition to you), you simply throw that card in the
trash and get a fresh one. OTOH, if you exhaust the available erase/
program cycles for the NAND flash inside that oddball Samsung chip on
the GTA02, getting a replacement chip and getting it swapped out on the
board would be problematic.
Right, problem is not in layers, but in the fact that internal one is
not interchangeable.
Hence my question to the community: is the flash wear-out concern I've
just outlined the primary reason for the recommendation of using SD
instead of NAND to hold the OS/distro, or was that recommendation driven
by some other, completely unrelated concerns? Has anyone here actually
exhaused the available number of flash erase/program cycles, on any HW
platform, ever? (I personally haven't, in my ~10 y of doing embedded
Linux work on various systems: I know from the physics and from device
datasheets that the