U-BOOT(NAND)

pavan
Hi,
  I am using mini 2440 with 128 MB of NAND. I am getting the below error.



##### 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 
[b] Boot the system 
[s] Set the boot parameters 
[u] Backup NAND Flash to HOST through USB(upload) 
[r] Restore NAND Flash from HOST through USB 
[q] Goto shell of vivi 
Enter your selection: q
Supervivi> load ram 0x31000000 239016 u
USB host is connected. Waiting a download.

Now, Downloading [ADDRESS:31000000h,TOTAL:239026]
RECEIVED FILE SIZE:  239026 (116KB/S, 2S)
Downloaded file at 0x31000000, size = 239016 bytes
Supervivi> go 0x31000000
go to 0x31000000
  argument 0 = 0x00000000
  argument 1 = 0x00000000
  argument 2 = 0x00000000
  argument 3 = 0x00000000

U-Boot 1.3.2-dirty-moko12 (Apr 16 2009 - 18:14:52)

I2C:   ready
DRAM:  64 MB
Flash:  2 MB
NAND:  Bad block table not found for chip 0
Bad block table not found for chip 0
128 MiB
*** Warning - bad CRC or NAND, using default environment

USB:   S3C2410 USB Deviced
In:    serial
 0 
MINI2440 # nand info

Device 0: NAND 128MiB 3,3V 8-bit, page size 2048, sector size 128 KiB
MINI2440 # nand scrub

NAND scrub: device 0 whole chip
Warning: scrub option will erase all factory set bad blocks!
         There is no reliable way to recover them.
         Use this command only for testing purposes if you
         are sure of what you are doing!

Really scrub this NAND flash? <y/N>
Erasing at 0x3ae0000 --  46% complete.
NAND 128MiB 3,3V 8-bit: MTD Erase failure: -5
Erasing at 0x7fe0000 -- 100% complete.
Bad block table not found for chip 0
Bad block table not found for chip 0
OK
MINI2440 # nand createbbt
Create BBT and erase everything ? <y/N>
Skipping bad block at  0x03c20000                                          
 
Skipping bad block at  0x07f80000                                          
 
Skipping bad block at  0x07fa0000                                          
 
Skipping bad block at  0x07fc0000                                          
 
Skipping bad block at  0x07fe0000                                          
 

Creating BBT. Please wait ...Bad block table not found for chip 0
Bad block table not found for chip 0
Bad block table written to 0x07fe0000, version 0x01
Bad block table written to 0x07fc0000, version 0x01

MINI2440 # mtdparts

device nand0 <mini2440-nand>, # parts = 4
 #: name                        size            offset          mask_flags
 0: u-boot              0x00040000      0x00000000      0
 1: env                 0x00020000      0x00040000      0
 2: kernel              0x00500000      0x00060000      0
 3: root                0x07aa0000      0x00560000      0

active partition: nand0,0 - (u-boot) 0x00040000 @ 0x00000000

defaults:
mtdids  : nand0=mini2440-nand
mtdparts: <NULL>
MINI2440 # nand write 0x31000000 u-boot

NAND write: device 0 offset 0x0, size 0x40000
 262144 bytes written: OK
MINI2440 # &#65533;

U-Boot 1.3.2NAND:  nand_scan(): Cannot allocate oob_buf
0 MiB

 CTRL-A Z for help |115200 8N1 | NOR | Minicom 2.3    | VT102 |     
Offline                                                                    
            




please solve my problem as soon as possible.





Regards,
Pavan.

hex
use the 128MB uboot.

search the forums, there is plenty of information on that issue

dec
http://www.friendlyarm.net/forum/topic/79

ram
Hi,

I was also facing the same problem but after changing the following lines
as suggested in one of the sites, Iam able to run the U-Boot from nand
flash.


change the following lines in mini2440.h and compile

#define USE_920T_MMU    0
#define CONFIG_USE_IRQ    0  /* Needed for USB device! */

With regards,
Ram.