Format Nand, Board not responding !!

miniarm
hello All,

I am using mini2440, I was experimenting with borad, so its switch on and
off and on..., Yesterday Borad refuse to boot, I tried to format the nand
with 'x' and 'f' command and after I apply below command to install rootfs
into nand partition.

/dnw rootfs_qtopia_qt4-20110304.tar.gz 
idVendor:0x5345  ,ipProduct:0x1234
Target usb device found!
Filename : rootfs_qtopia_qt4-20110304.tar.gz
Filesize : 44441099 bytes
Writing data ...
3%%      44441109 bytes     Done!

Writting data done 100% and again it start with 1 and stop at 3%,

Here is the result, after applying the command.
Now, Downloading [ADDRESS:30000000h,TOTAL:44441109]
Downloaded file at 0x30000000, size = 44441099 bytes
Flash params: oobsize = 64, oobblock = 2048, erasesize = 131072, partition
size = 1067974656
Erasing and programming NAND with yaffs image
 Block erasing(addr/count) --- Block bad(addr/count) --- Block
processed/All(%)
--------------------------------------------------------------------------------

     0x3ffc0000/08148            0x00000000/00000          
08148/08148=100%
Load yaffs OK:
Blocks scanned: 8148, Blocks erased: 8148, Blocks are bad: 0
RECEIVED and Writed FILE SIZE:44441109 (305KB/S, 142S)

well writting data to nand done 100%, but when i boot the borad, it gives
me following error message.
Bad eraseblock 242 at 0x000001e40000
Bad eraseblock 243 at 0x000001e60000
Bad eraseblock 244 at 0x000001e80000
Bad eraseblock 245 at 0x000001ea0000
Bad eraseblock 246 at 0x000001ec0000
Bad eraseblock 247 at 0x000001ee0000
Bad eraseblock 248 at 0x000001f00000
Bad eraseblock 249 at 0x000001f20000
Bad eraseblock 250 at 0x000001f40000
Bad eraseblock 251 at 0x000001f60000
Bad eraseblock 252 at 0x000001f80000
Bad eraseblock 253 at 0x000001fa0000
Bad eraseblock 254 at 0x000001fc0000
Bad eraseblock 255 at 0x000001fe0000
Bad eraseblock 256 at 0x000002000000
Bad eraseblock 257 at 0x000002020000
Bad eraseblock 258 at 0x000002040000
Bad eraseblock 259 at 0x000002060000
Bad eraseblock 260 at 0x000002080000
Bad eraseblock 261 at 0x0000020a0000
Bad eraseblock 262 at 0x0000020c0000
Bad eraseblock 263 at 0x0000020e0000
Bad eraseblock 264 at 0x000002100000
Bad eraseblock 265 at 0x000002120000
Bad eraseblock 266 at 0x000002140000
Bad eraseblock 267 at 0x000002160000
Bad eraseblock 268 at 0x000002180000
..
Registered protocol family 17
s3c2410-rtc s3c2410-rtc: setting system clock to 2012-06-04 15:03:24 UTC
(1338822204)
yaffs: dev is 32505859 name is "mtdblock3"
yaffs: passed flags ""
yaffs: Attempting MTD mount on 31.3, "mtdblock3"
yaffs: auto selecting yaffs2
block 2 is bad
block 3 is bad
block 4 is bad
block 5 is bad
block 6 is bad
block 7 is bad
block 8 is bad
block 9 is bad
block 10 is bad
block 11 is bad
block 12 is bad
block 13 is bad
block 14 is bad
block 15 is bad
block 16 is bad
affs_read_super: isCheckpointed 0
VFS: Mounted root (yaffs filesystem) on device 31:3.
Freeing init memory: 160K
Warning: unable to open an initial console.
Failed to execute /linuxrc.  Attempting defaults...
Kernel panic - not syncing: No init found.  Try passing init= option to
kernel.
Backtrace: 
[<c00353c0>] (dump_backtrace+0x0/0x10c) from [<c0235078>]
(dump_stack+0x18/0x1c)
 r6:00000000 r5:c001a37c r4:c02fd1b0 r3:c02e5a90
[<c0235060>] (dump_stack+0x0/0x1c) from [<c02351cc>] (panic+0x4c/0x110)
[<c0235180>] (panic+0x0/0x110) from [<c0235038>] (init_post+0xd4/0xfc)
 r3:00000000 r2:c389c400 r1:c389c500 r0:c02a7e0c
[<c0234f64>] (init_post+0x0/0xfc) from [<c0008a08>]
(kernel_init+0xe4/0x10c)
 r4:c001a37c r3:c3401080
[<c0008924>] (kernel_init+0x0/0x10c) from [<c0054b44>] (do_exit+0x0/0x640)
 r5:00000000 r4:00000000

Can someone please help me? what could be wrong over here, I flush
everything and try to install fresh kernel and root file system, but still
problem exists.


Thank you for your time in advance.

--
miniarm

Dhruv Vyas
Hi....

As per I understand there is nothing wrong with your hardware.

Try doing this things.

Step #1:

keep switch into nor and switch on.

Step #2:

It will show you menu.

Press "s"

Step #3:

Press "s"

and enter "linux_cmd_line"

Step #4:

enter below with the quotes...

"noinitrd root=/dev/mtdblock3 init=/linuxrc console=ttySAC0"

Step #5:

press w

Step #6:

Change switch to nand and reset the board.

Let me know if it works...!

davef
What happens when you do:

x, v, k, y 

Never used f and it has been a few years since I used DNW.

x - format NAND flash for Linux
f - format NAND flash for ??

miniarm
@dhruv,

Thanks for the prompt reply, I did that step, but I am getting same error
while booting kernel and kernel panic at the end.

@davef,
Vivi bootloader itself says format NAND flas, I tried the above things as
well, but I am getting the same error.

Is this a Hardware(i.e. NAND Flash) problem?

--
miniarm

Dhruv Vyas
Can you tell me which bootloader, linux image you are using ?

As per I understand, the problem is that it can not fetch your yaffs image
because of kernel parameters mismatch.

Just check if your yaffs image is in mtdblock3.

Let me know your nand partitions as well.

Dhruv Vyas
I found a solution to your problem.

You are trying to load tar file of qtopia in mini2440 which is invalid.

It should be compiled binary image.

You will get binary from this link.

http://www.friendlyarm.net/dl.php?file=linux-root_qtopia_qt4_20110305.zip
http://www.friendlyarm.net/dl.php?file=linux-root_qtopia-64M_20100108.zip
http://www.friendlyarm.net/dl.php?file=linux-root_qtopia-128M_20100108.zip

Choose either of the above, according to your board nand size.

miniarm
Hello Dhruv,

Thanks for the interest in the problem, Let me try the above image.

@dave,
here is the options available for NOR mode.

##### FriendlyARM BIOS 2.0 for 2440 #####
[x] format NAND FLASH for Linux
[v] Download vivi 
[k] Download linux kernel 
[y] Download root_yaffs image 
[a] Absolute User Application
[n] Download Nboot for WinCE 
[l] Download WinCE boot-logo
[w] Download WinCE NK.bin 
[d] Download & Run 
[z] Download zImage into RAM 
[g] Boot linux from RAM 
[f] Format the nand flash 


Thanks.

--
miniarm

davef
I now see Dhruv is trying to say.

You have to either extract the .tar.gz file or unzip the .zip file.

I know those are the options, what I don't know is the difference between
[x] and [f]

Where did you read to use the [f] option?

miniarm
@davef,

I don't know what is [f], but since things were not working, so i was
trying diff. diff. options.

Now I restore the image, but I am facing strange problem. I am able to boot
the system from NOR flash, but I am unable to boot from NAND flash.

NOR flash.

[i] Version: 1026-2K
Enter your selection: b
Copy linux kernel from 0x00060000 to 0x30008000, size = 0x00500000 ... done
zImage magic = 0x016f2818
Setup linux parameters at 0x30000100
linux command line is: "noinitrd root=/dev/mtdblock3 init=/linuxrc
console=ttySAC0,115200n8,console=tty1"
MACH_TYPE = 1999
NOW, Booting Linux......
Uncompressing
Linux...........................................................................
.........................................
done, booting the ke.
Linux version 2.6.32.2-SLTL (root@sltl-desktop) (gcc version 4.6.2
(OSELAS.Toolchain-2011.11.0) ) #309 Wed Jun 6 14:10:43 IST 2012
CPU: ARM920T [41129200] revision 0 (ARMv4T), cr=c0007177
CPU: VIVT data cache, VIVT instruction cache

NAND flash

&#65533;>
system don't boot.

In short I am able to boot the system from NOR flash but unable to boot the
system from NOR flash. what could be the problem over here...?

Please let me know.

--
miniarm

davef
Which bootloader have you put into NAND?

> Linux version 2.6.32.2-SLTL (root@sltl-desktop) (gcc version 4.6.2
> (OSELAS.Toolchain-2011.11.0)

Which PTXdist version are you using? That is that latest toolchain, so I
would expect PTXdist 2011.11.0 or later.  

You seem to be trying a completely different setup there compared with your
post at the top of the thread.

Think you had better outline what you trying to do now.

miniarm
@davef,

I am using PTXdist toolchain to compile kernel because they have updated
gcc version.

why I am not able to boot from NAND?

Dave Festing
> Which bootloader have you put into NAND?
> Which PTXdist version are you using?

Answer my questions and I'll try to answer yours :)

Dhruv Vyas
@ miniarm - 

Try is to load standard images and check if it is working.
i.e. vivi --> zImage --> root_qtopia64M.img

That will ensure that your hardware is working fine.

You can experiment step by step afterwards.

miniarm
@Dhruv,

Thank you for your time. It just works !! :)

Dhruv Vyas
Alright...now you can experiement step by step.

It will help you in debugging.

:)

Akash
@Dhruv Vyas i tried to download the .zip file posted before but it shows
"file not found\" i have the same problem also please me some link from
where i can download the image file.

jiameijiang
http://pan.baidu.com/s/1pJ6xRHT

link for 2440