Difference between revisions of "BeagleBoardNAND"

From eLinux.org
Jump to: navigation, search
(Start NAND write section)
(Give xloader NAND instructions)
Line 1: Line 1:
 
[[Category: Linux]]
 
[[Category: Linux]]
 
[[Category: OMAP]]
 
[[Category: OMAP]]
This page is about using (booting) from  [http://en.wikipedia.org/wiki/Flash_Memory#NAND_flash NAND] memory on [[BeagleBoard]]. Parts of this page are inspired by [http://www.sakoman.net/omap3/flash%20procedure.txt Steve's flash procedure] document.
+
This page is about using (booting/running from) [http://en.wikipedia.org/wiki/Flash_Memory#NAND_flash NAND] memory on [[BeagleBoard]]. Parts of this page are inspired by [http://www.sakoman.net/omap3/flash%20procedure.txt Steve's flash procedure] document.
  
 
=Hardware=
 
=Hardware=
Line 34: Line 34:
 
==X-Loader==
 
==X-Loader==
  
tbd.
+
[http://code.google.com/p/beagleboard/wiki/BeagleSoftCompile Build] or download [http://code.google.com/p/beagleboard/downloads/list binary] (x-load.bin.ift_for_NAND) X-Loader. Put it at first (boot) FAT partition of MMC/SD card and boot from card. Then start boot from card and use the following to write X-Loader to NAND:
 +
 
 +
...40T.......
 +
 +
Texas Instruments X-Loader 1.41
 +
Starting on with MMC
 +
Reading boot sector
 +
 +
147424 Bytes Read from MMC
 +
Starting OS Bootloader from MMC...
 +
 +
U-Boot 1.3.3-00411-g76fe13c-dirty (Jul 12 2008 - 17:12:05)
 +
 +
OMAP3530-GP rev 2, CPU-OPP2 L3-165MHz
 +
OMAP3 Beagle Board + LPDDR/NAND
 +
DRAM:  128 MB
 +
NAND:  256 MiB
 +
In:    serial
 +
Out:  serial
 +
Err:  serial
 +
Hit any key to stop autoboot:  0
 +
 +
OMAP3 beagleboard.org # '''mmcinit'''
 +
OMAP3 beagleboard.org # '''fatload mmc 0:1 0x80000000 x-load.bin.ift_for_NAND'''
 +
reading x-load.bin.ift_for_NAND
 +
 +
9808 bytes read
 +
OMAP3 beagleboard.org # '''nand unlock'''
 +
device 0 whole chip
 +
nand_unlock: start: 00000000, length: 268435456!
 +
NAND flash successfully unlocked
 +
OMAP3 beagleboard.org # '''nand ecc hw'''
 +
OMAP3 beagleboard.org # '''nand erase 0 80000'''
 +
 +
NAND erase: device 0 offset 0x0, size 0x80000
 +
Erasing at 0x60000 -- 100% complete.
 +
OK
 +
OMAP3 beagleboard.org # '''nand write 80000000 0 80000'''
 +
 +
NAND write: device 0 offset 0x0, size 0x80000
 +
524288 bytes written: OK
 +
OMAP3 beagleboard.org #
 +
 
 +
Note: The command ''nand ecc hw'' is essential here! X-Loader is started by OMAP3 boot rom. This uses HW ECC while reading the NAND, so while writing, we have to use OMAP3 HW ECC, too. If you don't use HW ECC boot rom [[BeagleBoardRecovery|can't boot from NAND]] any more.
  
 
==U-Boot==
 
==U-Boot==

Revision as of 01:36, 13 July 2008

This page is about using (booting/running from) NAND memory on BeagleBoard. Parts of this page are inspired by Steve's flash procedure document.

Hardware

OMAP3530 has 256MB NAND flash in PoP (PoP: Package-On-Package implementation for Memory Stacking) configuration.

Software

The following software parts can be stored and booted/run from NAND:

  • X-Loader
  • U-Boot (+ environment/configuration data)
  • Linux kernel
  • Linux file system

The memory partitioning for this as used on BeagleBoard:

0x00000000-0x00080000 : "X-Loader"
0x00080000-0x00260000 : "U-Boot"
0x00260000-0x00280000 : "U-Boot Env"
0x00280000-0x00680000 : "Kernel"
0x00680000-0x10000000 : "File System"

To be able to write something to (empty) NAND, you first need to boot from an other source, e.g. MMC/SD card boot. Besides the files you need for MMC/SD card boot (MLO & U-Boot), put the files you want to flash into first FAT partition of MMC/SD card, too. Then you can read them from there and write them to NAND.

Note: If something goes wrong writing the initial X-Loader, your board might not boot any more without pressing the user button. See BeagleBoard recovery article how to fix this, then.

X-Loader

Build or download binary (x-load.bin.ift_for_NAND) X-Loader. Put it at first (boot) FAT partition of MMC/SD card and boot from card. Then start boot from card and use the following to write X-Loader to NAND:

...40T.......

Texas Instruments X-Loader 1.41
Starting on with MMC
Reading boot sector

147424 Bytes Read from MMC
Starting OS Bootloader from MMC...

U-Boot 1.3.3-00411-g76fe13c-dirty (Jul 12 2008 - 17:12:05)

OMAP3530-GP rev 2, CPU-OPP2 L3-165MHz
OMAP3 Beagle Board + LPDDR/NAND
DRAM:  128 MB
NAND:  256 MiB
In:    serial
Out:   serial
Err:   serial
Hit any key to stop autoboot:  0

OMAP3 beagleboard.org # mmcinit
OMAP3 beagleboard.org # fatload mmc 0:1 0x80000000 x-load.bin.ift_for_NAND
reading x-load.bin.ift_for_NAND

9808 bytes read
OMAP3 beagleboard.org # nand unlock
device 0 whole chip
nand_unlock: start: 00000000, length: 268435456!
NAND flash successfully unlocked
OMAP3 beagleboard.org # nand ecc hw
OMAP3 beagleboard.org # nand erase 0 80000

NAND erase: device 0 offset 0x0, size 0x80000
Erasing at 0x60000 -- 100% complete.
OK
OMAP3 beagleboard.org # nand write 80000000 0 80000

NAND write: device 0 offset 0x0, size 0x80000
524288 bytes written: OK
OMAP3 beagleboard.org #

Note: The command nand ecc hw is essential here! X-Loader is started by OMAP3 boot rom. This uses HW ECC while reading the NAND, so while writing, we have to use OMAP3 HW ECC, too. If you don't use HW ECC boot rom can't boot from NAND any more.

U-Boot

tbd.

Kernel

tbd.

File system

tbd.