[U-Boot] how to configure u-boot to tell me more about NAND flash?

a few basic questions about a board i don't have access to right this minute but did yesterday and will later today. it's an AM1808 experimenter kit lookalike except that it has (allegedly) had its NOR flash replaced with 2G of NAND flash, and i want to figure out what i can add to the current u-boot da850evm configuration to let me poke around and get all the info i can on that flash because there seems to be something strange about the current setup.
first, when i let the board boot fully into linux, "dmesg" told me this:
"NAND device: Manufacturer ID: 0x2c, Chip ID: 0xdc (Micron NAND 512MiB 3,3V 8-bit)"
that appears to tell me 512M of NAND flash, not 2G. i asked someone who was initially adamant that there was 2G but promised to check with the H/W folks to make absolutely sure. is there a possible reason why 2G would show up only as 512M in dmesg? (not really a u-boot question, just wondering.)
next, the u-boot that was on the board didn't have the "flinfo" command so i created my own board based on the da850evm version that was currently being used, defined CONFIG_CMD_FLASH, rebuilt, reflashed, came up to u-boot so first check for flash (oh, u-boot version is 2010.12, so i can do some substantial upgrading later):
rday > nand info
Device 0: nand0, sector size 128 KiB rday >
ok, that looks good, at least u-boot sees a NAND device. but now:
rday > flinfo rday >
should "flinfo" not tell me about my flash? do i need another config setting for this micron flash chip (whose identity is still a bit of a mystery)?
finally, i ran "mtdparts" to get:
rday > mtdparts mtdids not defined, no default present rday >
so i guess i'll add mtdids in later when i get my hands on the board again.
main question -- should flinfo not tell me about my flash? what might this configuration be missing? i should have access to the board in an hour or two. thanks.
rday

Hi Robert,
Le Tue, 05 Feb 2013 08:37:20 -0500, "Robert P. J. Day" rpjday@crashcourse.ca a écrit :
main question -- should flinfo not tell me about my flash? what might this configuration be missing? i should have access to the board in an hour or two. thanks.
you can read : doc/README.nand which contains quite a lot of details on how the nand flash are handled in u-boot and how to use the nand commands.
Eric

Quoting Eric Bénard eric@eukrea.com:
Hi Robert,
Le Tue, 05 Feb 2013 08:37:20 -0500, "Robert P. J. Day" rpjday@crashcourse.ca a écrit :
main question -- should flinfo not tell me about my flash? what might this configuration be missing? i should have access to the board in an hour or two. thanks.
you can read : doc/README.nand which contains quite a lot of details on how the nand flash are handled in u-boot and how to use the nand commands.
*sigh* ... i totally forgot about the doc/ directory. thanks.
rday

Dear Robert,
In message 20130205083720.16752bc01ocd9qf4@crashcourse.ca you wrote:
experimenter kit lookalike except that it has (allegedly) had its NOR flash replaced with 2G of NAND flash,...
...
rday > flinfo rday >
should "flinfo" not tell me about my flash? do i need another config setting for this micron flash chip (whose identity is still a bit of a mystery)?
flinfo tells you every detail about the (NOR) flash it finds on your board...
Sorry, flinfo is for NOR only.
Best regards,
Wolfgang Denk

Hi, experts: I have a JTAG debugger. Its manual suggested user should add "-gdwarf-2" option in the arm gcc compiler. Because it could produce debugging information.
But I searched the whole uboot source package, could not find "-gdwarf-2" option in config.mk or other files.
Why?
Best wishes,

Dear TigerLiu@viatech.com.cn,
In message FE7ADED5C2218B4786C09CD97DC4C49F74C908@exchbj02.viatech.com.bj you wrote:
I have a JTAG debugger.
Congrats.
Its manual suggested user should add "-gdwarf-2" option in the arm gcc compiler. Because it could produce debugging information.
Ah, so it is not a BDI3000... Well, good luck.
But I searched the whole uboot source package, could not find "-gdwarf-2" option in config.mk or other files.
Why?
Because what may be needed ith your tools (and tool chain?) may not be needed for everybody else?
Feel free to supply your own debug flags on the command line, i. e. try something as make DBGFLAGS="-gdwarf-2"
Best regards,
Wolfgang Denk

On 02/07/2013 02:01:05 AM, TigerLiu@viatech.com.cn wrote:
Hi, experts: I have a JTAG debugger. Its manual suggested user should add "-gdwarf-2" option in the arm gcc compiler. Because it could produce debugging information.
But I searched the whole uboot source package, could not find "-gdwarf-2" option in config.mk or other files.
Why?
I think it's already the default with most toolchains. Do you see any difference in the output when supplying that flag?
-Scott

On Mon, Feb 11, 2013 at 01:43:32PM -0600, Scott Wood wrote:
On 02/07/2013 02:01:05 AM, TigerLiu@viatech.com.cn wrote:
Hi, experts: I have a JTAG debugger. Its manual suggested user should add "-gdwarf-2" option in the arm gcc compiler. Because it could produce debugging information.
But I searched the whole uboot source package, could not find "-gdwarf-2" option in config.mk or other files.
Why?
I think it's already the default with most toolchains. Do you see any difference in the output when supplying that flag?
Indeed. For most common values of gcc versions, using -g will pick the "best" choice for debug information and this will be DWARF2 information already. There is no need to specify -gdwarf-2 (or similar).

On 02/05/2013 07:37:20 AM, Robert P. J. Day wrote:
a few basic questions about a board i don't have access to right this minute but did yesterday and will later today. it's an AM1808 experimenter kit lookalike except that it has (allegedly) had its NOR flash replaced with 2G of NAND flash, and i want to figure out what i can add to the current u-boot da850evm configuration to let me poke around and get all the info i can on that flash because there seems to be something strange about the current setup.
first, when i let the board boot fully into linux, "dmesg" told me this:
"NAND device: Manufacturer ID: 0x2c, Chip ID: 0xdc (Micron NAND 512MiB 3,3V 8-bit)"
that appears to tell me 512M of NAND flash, not 2G. i asked someone who was initially adamant that there was 2G but promised to check with the H/W folks to make absolutely sure. is there a possible reason why 2G would show up only as 512M in dmesg? (not really a u-boot question, just wondering.)
Is it possible you have 4 chips, each of which are 512 MiB?
If that's not it, probably the ID table is wrong. Maybe they're using the same ID for multiple sizes now (it's not exactly a large numberspace), and expecting you to use ONFI or other ID bytes to determine the actual size.
What does U-Boot print on boot, regarding NAND?
-Scott

Quoting Scott Wood scottwood@freescale.com:
On 02/05/2013 07:37:20 AM, Robert P. J. Day wrote:
a few basic questions about a board i don't have access to right this minute but did yesterday and will later today. it's an AM1808 experimenter kit lookalike except that it has (allegedly) had its NOR flash replaced with 2G of NAND flash, and i want to figure out what i can add to the current u-boot da850evm configuration to let me poke around and get all the info i can on that flash because there seems to be something strange about the current setup.
first, when i let the board boot fully into linux, "dmesg" told me this:
"NAND device: Manufacturer ID: 0x2c, Chip ID: 0xdc (Micron NAND 512MiB 3,3V 8-bit)"
that appears to tell me 512M of NAND flash, not 2G. i asked someone who was initially adamant that there was 2G but promised to check with the H/W folks to make absolutely sure. is there a possible reason why 2G would show up only as 512M in dmesg? (not really a u-boot question, just wondering.)
Is it possible you have 4 chips, each of which are 512 MiB?
false alarm ... i got bad initial info and the board really does have exactly 512M of NAND. whew ... wasn't looking forward to trying to debug that.
rday
participants (6)
-
Eric Bénard
-
Robert P. J. Day
-
Scott Wood
-
TigerLiu@viatech.com.cn
-
Tom Rini
-
Wolfgang Denk