[stamp9g20] New Kernel don't load from NAND

First i have to say, that i'm very new to stamp9g20. So I read the instructions, and tried first to compile a new Kernel, which supports SPI and I²C.
Following the instructions in the manual i soon came to the point where to make the uboot-image. I did like in the manual, load the file on a sd-card, start-up the Stamp and erase and flash the nand (/dev/mtd4) with the new kernel.
But after reboot it stops at Kernel starting... . I could figure out that the problem was (maybe) the entry-point, except of 2100000 it have to be 20008000. I make a new image, load it via loadb, start it with bootm... It works! Reboot, loadb, nand write 0x22000000 0xA0000 0x200000, reboot. Failure!
NAND read: device 0 offset 0xa0000, size 0x200000
NAND read from offset a0000 failed -74
2097152 bytes read: ERROR
## Booting kernel from Legacy Image at 22000000 ...
Bad Header Checksum
ERROR: can't get kernel image!

So I tried to load it again in the NAND (successfull, it said) and then read it back -> Error as above. Than i start a kernel again with bootm and wanted to check the NAND, but cat /proc/mtd only brings: "dev: size erasesize name". no devices.

What could be the problem here? Have I to setup everything from scratch?
I communicate via serial with the stamp, and have the rootfs on sd-card. The Kernel is 2.6.29.

Thanks for your help.

Little question: Why are not all commands which are discribed in U-Boot manual are on the stamp? Is it a "special" version? I looked for iminfo and bdinfo, for example but can't find them.

Re: [stamp9g20] New Kernel don't load from NAND

Okay, I solved my problem. I had to erase the NAND first with nand erase 0xA0000 0x200000. Then again I write the kernel from RAM to NAND with "nand write 22000000 A0000 200000" and reboot. Works fine.

Re: [stamp9g20] New Kernel don't load from NAND

Yes, you have to erase the flash first. Flashing already flashed NAND won't produce any write errors, but the result will be a mixture of the already programmed image and the new image, as a zeroed bit can never get one again without the erasing process. If your images are very similar this can lead to misleading results.
The u-boot guide is for our products Portux920T and Panel-Card, so commands which aplly to NAND flash are not described and you won't find commands, which apply to NOR flash.

Syndicate content