new BeagleBoard: reading from FLASH fails (?)

Hi all,

I`ve just powered up a new BeagleBoard and got the following ERROR
message in the end of boot sequence:

-----------------------------------------------------------------------------
NAND read: device 0 offset 0x280000, size 0x400000
NAND read from offset 280000 failed -74
4194304 bytes read: ERROR
-----------------------------------------------------------------------------

According to HW Manual the message should be:

-----------------------------------------------------------------------------
NAND read: device 0 offset 0x280000, size 0x400000
4194304 bytes read: OK
-----------------------------------------------------------------------------

Does it indicate a problem with FLASH or is it just because the FLASH
is empty?
Can it be an issue with environment variables?

Full power up sequence printout:

-----------------------------------------------------------------------------

U-Boot 2009.01-dirty (Feb 19 2009 - 12:22:31)

I2C: ready
OMAP3530-GP rev 2, CPU-OPP2 L3-165MHz
OMAP3 Beagle board + LPDDR/NAND
DRAM: 256 MB
NAND: 256 MiB
*** Warning - bad CRC or NAND, using default environment

MUSB: using high speed
In: serial usbtty
Out: serial usbtty
Err: serial usbtty
Board revision C
Serial #1be2000300000000040323090b01d014
Hit any key to stop autoboot: 0
No MMC card found
Booting from nand ...

NAND read: device 0 offset 0x280000, size 0x400000
NAND read from offset 280000 failed -74
4194304 bytes read: ERROR
Wrong Image Format for bootm command
ERROR: can't get kernel image!

Hi,

u donot have kernel uImage flashed to nand partition.

The code in the NAND is designed to you use a boot script file to direct the boot process. This file is on the SD card. If the file is not found, you will get the CRC error because the boot environment space in NAND is empty. You can reflash the NAND with the factory data by following the instructions on the validation page. http://code.google.com/p/beagleboard/wiki/BeagleboardRevCValidation if you think that there may be another issue. The other solution is to make sure you have a properly formated SD card plugg4ed into the SD slot. Information on setting it up can also be found on the validation page.

Gerald

Thanks for the info!

What I do not understand is why reading FLASH returns error. Bad
uImage CRC would be OK. But FLASH read error? Does not look good to
me.

The system boots normally from SD-Card. I tried to flash uImage.bin
manually to the NAND using instructions from this page:
Google Code Archive - Long-term storage for Google Code Project Hosting. (see
comment from dpander...@yahoo.com, May 21, 2009). The nand erase
command returns an ERROR for the address 0x3c0000:

OMAP3 beagleboard.org # mmcinit
OMAP3 beagleboard.org # fatload mmc 0 0x80300000 uImage.bin
OMAP3 beagleboard.org # nandecc sw
OMAP3 beagleboard.org # nand erase 280000 400000

       NAND erase: device 0 offset 0x280000, size 0x400000
       Erasing at 0x3c0000 -- 34% complete.
       NAND 256MiB 1,8V 16-bit: MTD Erase failure: -5
       Erasing at 0x660000 -- 100% complete.
       OK

I can still flash the uImage.bin to the NAND (at least it seems so):

OMAP3 beagleboard.org # nand write.i 0x80300000 280000 400000

       NAND write: device 0 offset 0x280000, size 0x400000
       4194304 bytes written: OK

But the board does not boot from NAND afterwards anyway (full powerup
log without SD card). It is the FLASH read ERROR again:

UBoot expects to see the environment variables in NAND. They are not there. So, it gets a CRC error because the data has not been written there. It is empty so the CRC calculations don’t add up. You can put them there yourself, or it will default to running the script on the SD card which sets up the boot process. This is the way it works. If you look at the SRM, this is documented as the normal printout from the board when it starts up. It is normal.

Gerald

Gerald,

I think I failed to communicate my concern correctly.

I currently cannot erase the FLASH without errors. If I am at the u-
boot prompt, I should be able to earse any NAND location with the
"nand erase" command, right? Well, it does not work. Here is the log
(see error at the address 0x3c0000):

Glad to see a better explanation of the issue. I suggest you request an RMA and get the board looked at.

Gerald

OK!

Next question. :slight_smile:

If I want to use BBoard completely without SD-card, what exactly would
I need to flash to NAND? I assume I need (at least) following images:
1. x-loader
2. u-boot
3. uImage
4. anything else?

Here is the flashing sequence (board booted from SD card till the u-
boot prompt, kernel is not loaded):

OMAP3 beagleboard.org # mmcinit
OMAP3 beagleboard.org # fatload mmc 0 0x80200000 x-load.bin.ift
OMAP3 beagleboard.org # nandecc hw
OMAP3 beagleboard.org # nand erase 0 80000
OMAP3 beagleboard.org # nand write.i 0x80200000 0 80000
OMAP3 beagleboard.org # fatload mmc 0 0x80200000 u-uboot-f.bin
OMAP3 beagleboard.org # nandecc sw
OMAP3 beagleboard.org # nand erase 80000 160000
OMAP3 beagleboard.org # nand write.i 0x80200000 80000 160000
OMAP3 beagleboard.org # fatload mmc 0 0x80300000 uImage.bin
OMAP3 beagleboard.org # nandecc sw
OMAP3 beagleboard.org # nand erase 280000 400000
OMAP3 beagleboard.org # nand write.i 0x80300000 280000 400000

Is that enough to boot and load the kernel from NAND completely
without SD card?

You would need everything that is required from the SD card. There are several discsuion on doing this. I suggest you do a search and get more detail.

Gerald

OK, have just booted from NAND. But had to use a none-default address
for uImage.

1. flashed x-loader and u-boot to default adresses manually, flashed
uImage to 0x400000 and ramdisk.gz to 0x900000.
2. booted from NAND to u-boot prompt.
3. nand read 0x80200000 0x400000 0x400000
4. nand read 0x81600000 0x900000 0x840000
5. setenv bootargs 'root=/dev/ram0 rw ramdisk_size=32768
initrd=0x81600000,32M'
6. bootm 0x80200000
7. kernel started OK