Hi,
 
What happens if after the flash_eraseall, you mount the empty partition 
(/dev/mtdblock2) as JFFS2 into the current system. You can then load a root 
filesystem using a .tgz file of the file system - remember to unmount the 
partition before rebooting though.
 
This method works fine on my DM355.
 
Regards
 
Phil Q
 
Phil Quiney, Senior Software Engineer
Trinity Convergence
Cambridge Business Park
Cowley Road
Cambridge CB4 0WZ, UK
T: +44(0)1223-435536
F: +44(0)1223-435560
www.trinityconvergence.com <http://www.trinityconvergence.com/> 

 

________________________________

From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of [EMAIL PROTECTED]
Sent: 24 July 2008 10:20
To: [email protected]
Subject: DaVinci EVM Nand Bad eraseblock,Thanks!



Hi all: 

I got a problem with the Nand driver in MV linux on DaVinci EVM, 
I want the MV linux to mount root filesystem on Nand Flash, rootfstype is 
jffs2, 
What I did is : 

1 modify linux/drivers/mtd/nand/nand_davinci.c ,create Nand partitions:
Creating 4 MTD partitions on "nand_davinci.0": 
0x00000000-0x00044000 : "Bootloaders" 
0x00044000-0x00404000 : "Kernel" 
0x00404000-0x02000000 : "RootFS" 
0x02000000-0x04000000 : "Reserve" 

2 boot linux kernel with ramdisk. 

3 use flash_eraseall and nandwrite mtd utils: 
#flash_eraseall -j /dev/mtd2 
#nandwrite -p -j /dev/mtd2 nandrootfs.jffs2 
where nandrootfs.jffs2 is an jffs2 filesystem image. 

4 boot an new kernel with bootargs: 
...root=/dev/mtdblock2 rw rootfstype=jffs2 noinitrd ... 

5 it outpus: 
........... 
NAND device: Manufacturer ID: 0xec, Chip ID: 0x36 (Samsung NAND 64MiB 1,8V 
8-bit) 
Scanning device for bad blocks 
Bad eraseblock 257 at 0x00404000 
Bad eraseblock 258 at 0x00408000 
Bad eraseblock 259 at 0x0040c000 
Bad eraseblock 260 at 0x00410000 
Bad eraseblock 261 at 0x00414000
........................ 
(about 50 bad eraseblocks)
.............................. 
Creating 4 MTD partitions on "nand_davinci.0": 
0x00000000-0x00044000 : "Bootloaders" 
0x00044000-0x00404000 : "Kernel" 
0x00404000-0x02000000 : "RootFS" 
0x02000000-0x04000000 : "Reserve" 
..................................... 
jffs2_scan_eraseblock(): Magic bitmask 0x1985 not found at 0x0008400c: 0xffff 
instead 
VFS: Mounted root (jffs2 filesystem). 
Freeing init memory: 116K 

OR : 
Inode #6 was a directory with children - removing those too... 
Inode #7 was a directory with children - removing those too... 
VFS: Mounted root (jffs2 filesystem). 

OR : 
Inode #6 was a directory with children - removing those too... 
Inode #7 was a directory with children - removing those too... 
VFS: Mounted root (jffs2 filesystem). 
Freeing init memory: 116K 
--- Process rcS --- 
--- Mount fstab --- 
...Done 
--- Mount devpts --- 
...Done 
--- Starting mdev --- 
...Done 
jffs2_get_inode_nodes(): Data CRC failed on node at 0x0038b2a0: Read 
0xcc68f7c0, calculated 0x5d1e445d 
--- Configure IP --- 
...Done 

Note that The output changes!! (same kernel) 

Can somebody help me? Thanks in advance! 

I guess linux/drivers/mtd/nand/nand_davinci.c contain some small bugs. 


best regards! 

yu.huanhuan 



--------------------------------------------------------
ZTE Information Security Notice: The information contained in this mail is 
solely property of the sender's organization. This mail communication is 
confidential. Recipients named above are obligated to maintain secrecy and are 
not permitted to disclose the contents of this communication to others.
This email and any files transmitted with it are confidential and intended 
solely for the use of the individual or entity to whom they are addressed. If 
you have received this email in error please notify the originator of the 
message. Any views expressed in this message are those of the individual sender.
This message has been scanned for viruses and Spam by ZTE Anti-Spam system.
_______________________________________________
Davinci-linux-open-source mailing list
[email protected]
http://linux.davincidsp.com/mailman/listinfo/davinci-linux-open-source

Reply via email to