Jump to content

nand-install on mainline kernel


Don Pedro

Recommended Posts

Hello,

 

I'm running a Cubietruck with legacy kernel (3.4.113) since a long time. The use of the legacy kernel is mainly due to the fact that I'm booting from onboard NAND and this was not supported by the mainline kernel for a long time. Meanwhile Armbian's mainline kernel became Stretch in its server flavor and I'm thinking about migrating. However I'm suspicious this will still break NAND boot, despite the fact that the documentation claims

Quote

NAND, SATA, eMMC and USB install script is included (nand-sata-install)

plus "missing NAND support" is not listed under "known issues" for the Cubietruck.

  • Can anyone confirm or deny that mainline kernel meanwhile does/does not support booting from NAND on Cubietruck?
  • And if NAND is not supported (and will then likely never be) and I'll have to switch to MMC to change to Stretch: Is there a way to dist-upgrade to MMC & Stretch without the need to re-install the Cubietruck's OS?

 

THX

 

Don

Link to comment
Share on other sites

- booting modern kernel is not supported. But ... support for NAND exists in a modern kernel. I am not sure if this is true for u-boot and if things are production stable. In any case, rather get some solid SD card. Its more reliable and faster than NAND.

- transferring system from NAND to SD card is also not implemented. Manually it is possible to move the system back to SD card, but again not recommended.

 

Usually is better to start with a clean image and transfer your application+data there.

Link to comment
Share on other sites

Igor, thanks for the clarification!

 

On 6.2.2018 at 8:27 AM, Igor said:

- booting modern kernel is not supported. But ... support for NAND exists in a modern kernel. I am not sure if this is true for u-boot and if things are production stable.

Do I understand that correctly that I cannot boot from NAND, however it will be accessible after booting?

 

Don

Link to comment
Share on other sites

On 8.2.2018 at 11:03 AM, Igor said:


Exactly. The situation might be better, but not to my knowledge. Check also here http://linux-sunxi.org/IRC if someone made further.

I tried to install the stretch based distro and this is largely successful. However on the contrary to what you said my NAND became completely invisible. There's no such thing as /dev/nand or /proc/nand. In armbian-config I also enabled NAND and (as this had no success) as a test also mmc2 - whatever mmc2 shall be on the cubietruck - but still no luck. Am I missing anything here? What else is needed to make the NAND visible?

 

Don

Link to comment
Share on other sites

As said, I already switched that on before mailing:

grafik.png.02bc5f0ffe11ee66613d72aab8e0ed5d.png

BTW, what is mmc2? Only enabled it as a test as I could not see the NAND with nand enabled, but the cubie has of course no second sd card slot.

 

But still no nand in /dev or /proc:

grafik.thumb.png.ea5a098e1b4b5cbc7810dc3c90288e90.png

 

Any ideas? The NAND itself is OK, if I eject the SD card I can boot to the legacy kernel that is installed on NAND like I did before upgrading to armbian stretch. So it must be a problem of the mainline kernel or some setting there.

 

What does the toggle for "nand" in armbian-config do? I always like to make sure by directly checking a configuration file instead of relying on some GUI display, so where do I find the respective configuration file?

 

THX

 

Don

 

 

 

grafik.png

grafik.png

Link to comment
Share on other sites

That is exactly what I was asking before:

Quote

Do I understand that correctly that I cannot boot from NAND, however it will be accessible after booting?

Quote

Exactly. The situation might be better, but not to my knowledge.

 

So I relied on Igor's answer which I read as "in mainline kernel you cannot use the NAND to boot from it but after boot you will be able to see and use it". Anyway, why then should we include a hardware option "nand" in armbian-config if it was completely inoperable? So again to make the answer very clear and correct: What is the case for mainline kernel? Is NAND completely inaccessible or am I just unable to use it for booting? It's not a big deal if NAND access gets lost completely, I already ate it that booting is not available in any case and I'm using a SD card now to run Stretch. However my Cubietruck has even 16GB of NAND (not 8GB as the standard versions have) so this is not a completely useless piece of storage for such a small machine, it served me as a reliable boot mechanism for quite some time with the legacy kernel and if possible I would like to use it for storing data in Stretch as well.

 

Regards

 

Don

Link to comment
Share on other sites

49 minutes ago, Don Pedro said:

However my Cubietruck has even 16GB of NAND (not 8GB as the standard versions have)

Are you sure it is NAND exactly and not eMMC or tSD?

 

49 minutes ago, Don Pedro said:

What is the case for mainline kernel?

The case is simple: forget about NAND. There are no visible development efforts in its direction and little interest from mainline developers to do anything about it.

 

49 minutes ago, Don Pedro said:

Is NAND completely inaccessible or am I just unable to use it for booting

It is accessible with additional efforts, though it requires erasing and reformatting it in a way that is not compatible with the legacy 3.x kernel, the only way to go back is flashing a Linux image via LiveSuite/PhoenixTools. This also will erase all information regarding bad blocks, AFAIK currently there is no (at least easy) way to migrate, preserve or restore it.

"Accessible" means visible by the kernel, it doesn't mean that you can reliably store anything on it.

 

It may be possible to use it to boot to a SATA drive but currently it is not implemented in a user friendly way, as, again, there is little to no interest from developers to work with MLC NAND.

 

49 minutes ago, Don Pedro said:

if possible I would like to use it for storing data in Stretch as well.

Even though it is possible to use Stretch with the legacy 3.x kernel (where NAND is accessible) we do not support this use case because modern distributions will have a lot of issues with such an old kernel.

Link to comment
Share on other sites

Thanks for explaining more detailed!

 

  • Yes, I should have NAND on it. According to this:
    http://cubieboard.org/2017/04/07/how-to-use-cubietruck-tsd-version/, section 3
    I have Hynix chips on my machine, not Foresee, so this should be NAND. I had to learn that there seems to be more different version of Cubietruck than I knew of (which also explains the mmc2), didn't know that. They also say TSD version was launched in 2017, mine is older.
  • I don't need to preserve the content of the NAND, reformatting would be OK.
  • I surely don't intend to go Stretch with legacy kernel as the leagacy kernel does not receive security updates any longer. I could've stayed with Jessie then, such an update is useless in my eyes.

OK, then let's put this (NAND) beast to rest, I'll switch off nand and mmc2 in my hardware configuration again and call it a day!

 

THX

 

Don

 

Link to comment
Share on other sites

Guest
This topic is now closed to further replies.
×
×
  • Create New...

Important Information

Terms of Use - Privacy Policy - Guidelines