User Tools

Site Tools


blackfin:uclinux_bf537setup_nand

Hardware Setting

On BF537 EZkits board Switch 5:

1 OFF
2 OFF
3 OFF
4 ON

For Switch 6:

1 ON
2 ON
3 OFF
4 OFF

For more details please see this link:http://docs.blackfin.uclinux.org/doku.php?id=compactflash_ide_ata_nand_flash_-_interface_card

Enable NAND Support In U-Boot

Add the following line into the board config head file u-boot/u-boot-1.1.6/include/configs/bf537-stamp.h

#define CONFIG_BF537_NAND

Then make the new u-boot file

bash$>make mrproper
bash$>make bf537-stamp_config
bash$>make

Copy the new u-boot.bin to replace the old one in tftpboot folder.

cp u-boot.bin ~/bf537/tftpboot/u-boot.bypass.bin

After that we flash the new bin file into memory as we already did when we first set up u-boot.

bf537> version
 
U-Boot-1.1.3-ADI-R06R2 (Sep 21 2006 - 15:10:36)
 
bf537> setenv ethaddr 192.168.0.15
bf537> tftp 0x1000000 u-boot.bypass.bin
Using MAC Address 92:68:00:15:00:00
TFTP from server 192.168.0.2; our IP address is 192.168.0.15
Filename 'u-boot.bypass.bin'.
Load address: 0x1000000
Loading: ########################
done
Bytes transferred = 118912 (1f4dc hex)(---size of the file)
bf537> go 0x1000000
## Starting application at 0x01000000 ...
U-Boot 1.1.6-svn614 (ADI-2007R1-pre) (Mar  4 2007 - 16:57:11)
 
CPU:   ADSP BF537 Rev.: 0.2
Board: ADI BF537 stamp board
       Support: http://blackfin.uclinux.org/
Clock: VCO: 500 MHz, Core: 500 MHz, System: 100 MHz
SDRAM: 64 MB
FLASH:   4 MB
In:    serial
Out:   serial
Err:   serial
Net:    BF537 ETHERNET
I2C:   ready
Hit any key to stop autoboot:  0
bf537> version
 
U-Boot 1.1.6-svn614 (ADI-2007R1-pre) (Mar  4 2007 - 16:57:11)
 
bf537> protect off all
Un-Protect Flash Bank # 1
bf537> erase all
Erase Flash Bank # 1
Erasing Flash locations, Please Wait
.......................................................................
bf537> cp.b 0x1000000 0x20000000 0x1f4dc
(0x1d080 is the size of file u-boot.bypass.bin, yours may be different, you can find it)
Copy to Flash... .done
bf537> cmp.b 0x1000000 0x20000000 0x1f4dc
Total of 118912 bytes were the same

You should able to see the NAND information in the next reboot message.

CPU:   ADSP BF537 Rev.: 0.2
Board: ADI BF537 stamp board
       Support: http://blackfin.uclinux.org/
Clock: VCO: 500 MHz, Core: 500 MHz, System: 100 MHz
SDRAM: 64 MB
FLASH:   4 MB
In:    serial
Out:   serial
Err:   serial
NAND:  128 MB
Net:    ADI BF537 EMAC
I2C:   ready
Hit any key to stop autoboot:  0

Kernel Configuration

Enabling MTD driver:

  == Select Memory Technology Devices (MTD) ==
           Enable - Memory Technology Device (MTD) support
           Enable - MTD partitioning support
           Enable - Direct char device access to MTD device
           Enable - Caching block device access to MTD device

Enabling NAND flash driver:

==  Select NAND Flash Device Drivers ==
           Enable - NAND Device Support
           Enable - NAND Flash device for BF537 STAMP board

Enabling needed file System:

== Select File Systems ==
     Select - Miscellaneous filesystems
          Enable – YAFFS2 file system support

After you build the kernel, copy the new image file to tftpboot directory; on the BF537 board set up some env variables:

bf537> setenv tftpboot 'tftp 0x1000000 uImage;bootm 0x1000000'
bf537> setenv bootcmd 'run tftpboot'
bf537> saveenv

Reset the board you should see this in your boot message:

cScanning device for bad blocks
Creating 2 MTD partitions on "NAND 128MiB 3,3V 8-bit":
0x00000000-0x00400000 : "linux kernel"
0x00400000-0x08000000 : "file system

Loading Linux From NAND

blackfin/uclinux_bf537setup_nand.txt · Last modified: 2009/10/07 17:57 (external edit)