NAND flash and bootloader confusion

Hi,

I have some questions about the NAND flash and various issues related to it.

First, the ECC increase from 1 to 4 bits:

1. are the bootstrap and second-stage bootloader supplied on all nanos cards 'correct' for the type of NAND used, or are there instances of 4-bit ECC boards having been shipped with 1-bit ECC bootstrap and bootloaders?
2. can a 4-bit ECC bootloader be used on a board with a 1-bit ECC NAND flash device?
3. is there a way to programmatically identify which type of NAND a board has?

Second, mechanisms for flashing boot loaders to NAND flash. Messages in this forum seem to imply that SAM-BA is required to flash the bootstrap and boot loader, however the instructions for the ECC patch use utilities like 'flash_eraseall' and 'nandwrite' on the target device. Can the bootstrap and boot loader actually be updated from a running system like this?

Lastly, the ECC patch says 'If your board contains a DataFlash, it is recommended to copy the AT91Bootstrap image to the DataFlash, too. Please use SAM-BA to do that'. What is DataFlash? Does the nanosg20 have one?

Thanks,
Chris

Re: NAND flash and bootloader confusion

Hello,

regarding your questions:

1.) Since the time of the NanosG20-BCH-upgrade (Juni 2013) all NanosG20 have been manufactured with that firmware. There are faulty combinations from before that date. If you are in doubt, you can check the very early boot messages using the DBGU on X11 (needs level shifters when being connected to standard RS232) for "BCH ECC". If there aren't any messages stating "BCH" or "4bit ECC" you should upgrade.

2.) Yes this works well. But the other parts of the firmware have to be upgraded, too.

3.) NAND has a self description (ONFI parameters) that is checked (and printed) by the kernel.

Regarding SAM-BA vs. running system:

SAM-BA is the way that always works. However, it is more comfortable to use Linux for that. But be aware that the kernel used for the upgrade has to support 4bit BCH already! You can simply put the kernel from the upgrade package onto a SD card (/boot directory), rename or delete the old one (on that SD card) and then boot from that card to be sure 4bit BCH is used.

Regarding the DataFlash:

DataFlash is a NOR flash chip that is mounted on all NanosG20 hardware revision 2. You can check the PCB printing on the back of your NanosG20. If it states "17.127.02" just before "NanosG20" then you have revision 2. Revision 1 is quite old and being not produced since 2013. Use SAM-BA or the 2nd stage Bootloader (holding S1 during power-up until console shows up on male DSUB [115200 8N1]).

Re: NAND flash and bootloader confusion

Hi,

Thanks for you responses. What I'm hoping to do is produce a bootable SD image which will update any NanosG20 board to the latest, correct bootstrap and bootloader, and from what you have said above it seems that this is possible.

Is the DataFlash NOR chip the 8-pin SOIC, mounted next to the RTC battery? It is the only real difference I can see visually on the top surface of the two boards.

Does the NanosG20 require a different bootstrap for each 64MB/128MB RAM and 128MB/512MB NAND Flash combination?

Can you post links to the latest bootstrap binaries and bootloader source/binaries? I can see many files available to download from legato.de, but there are no file dates or ordering and it is difficult to know which files are current or out of date.

Is there a publicly accessible version control for the Nanos sources?

Thanks, and sorry for all the questions!

Regards,
Chris

Re: NAND flash and bootloader confusion

Sorry for the delay, but I seem to have forgotten to submit the post I've written on Friday.

> Is the DataFlash NOR chip the 8-pin SOIC, mounted next to the RTC battery? It is the only real difference I can see visually on the top surface of the two boards.

Yes, that is the serial flash.

> Does the NanosG20 require a different bootstrap for each 64MB/128MB RAM and 128MB/512MB NAND Flash combination?

The NAND flash is autodetected, but the SD-RAM configuration is hard coded into the binary, so there are two bootstrap binaries.

> Can you post links to the latest bootstrap binaries and bootloader source/binaries? I can see many files available to download from legato.de, but there are no file dates or ordering and it is difficult to know which files are current or out of date.

The downloads are ordered by upload date, newest first. The following link contains everything you need:
https://www.ledato.de/download/NanosG20-BCH-upgrade.tar.bz2

> Is there a publicly accessible version control for the Nanos sources?

No, there is no public version control for NanosG20 sources.

Syndicate content