Upgrading PMECC from 2 to 4 within the Linux system

This forum is for users of Microchip MPUs and who are interested in using Linux OS.

Moderator: nferre

gudjon
Posts: 18
Joined: Thu Nov 07, 2013 10:59 am

Upgrading PMECC from 2 to 4 within the Linux system

Fri Jan 12, 2018 1:33 pm

Hi list

I have been searching for a solution to the following problem without success.

I need some program that can make a full remote update preferably without
having the user to press the NAND-disable button.

The program must as well change the PMECC bits from 2 to 4 for all parts of the system.
at91bootstrap
u-boot
Device tree
Linux-kernel

Is there any way to make nandwrite running on a system with 2 bit PMECC write these
files with 4 bit PMECC and then reboot?

Regards
Gudjon
blue_z
Location: USA
Posts: 1564
Joined: Thu Apr 19, 2007 10:15 pm

Re: Upgrading PMECC from 2 to 4 within the Linux system

Sat Jan 13, 2018 2:46 am

gudjon wrote:Is there any way to make nandwrite running on a system with 2 bit PMECC write these
files with 4 bit PMECC and then reboot?
That can be done with either U-Boot or Linux. The remote requirement adds the need to use scripts, which then favors the use of Linux.

Changing the NFC configuration on the fly simply means that NAND flash cannot be in use at that time.
Since U-Boot is single tasking that is trivial to ensure.
For a Linux system that means that no filesystem based in NAND flash can be actively mounted. Booting Linux with an initramfs (like a LiveCD of a distro, but booting from a SDcard or the network) would be the simplest means of having no mounted filesystems based in NAND.

The booted version of U-Boot or Linux kernel could have its NAND driver built with the revised PMECC parameters. There should be no reason to have to add a "change PMECC parameters" capability. The sacrifice is that these versions cannot read the existing contents of NAND flash, but must erase and update NAND flash before reading any previously-written blocks.

gudjon wrote:The program must as well change the PMECC bits from 2 to 4 for all parts of the system.
at91bootstrap
u-boot
Device tree
Linux-kernel
Isn't this list incomplete (i.e. what about a root filesystem)?

Regards

Return to “Linux”

Who is online

Users browsing this forum: No registered users and 2 guests