Sorry, a typing error. The specified length is 0x200000 or 2MB. 64MB wouldn't work very well at all! Thanks for noting the typo.
To clarify, my intent is not to boot off NAND flash but to store the image there, have u-boot decompress it into RAM and then fire-up linux from RAM. -Martin -----Original Message----- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Claude Sent: Sunday, July 27, 2008 11:56 AM To: uclinux-dev@uclinux.org Subject: [uClinux-dev] Re:5373EVB: Writing image to NAND flash Hi Martin, As I can see you have a 16MB device. However you are attempting to write 0x2000000 bytes (i.e 32 MB). Try to use the size reported by the tftp command at the end of its execution. If you have built the image according to NAND's metrics (i.e page size, erase block size), then the reported image' size will be successfully page-aligned and there won't be problems when writing the image to flash. I cannot help you with the unlock issue. However, ignore it so far and try to write a correct amount of data to NAND flash. I guess you are probably using JFFS2 and mkfs.jffs2 tool to build the image: it's crucial to specify the target NAND's metrics in the command line, in order to build a correctly page-aligned image (check the mkfs.jffs2 man pages). Also remember to indicate to mkfs.jffs2 that your target machine is big endian. Hope this helps, Claude >>I am having trouble writing to NAND flash from u-boot >>-> nand info >>Device 0: NAND 16MiB 3.3V 8-bit, sector size 16KiB >>-> nand device >>Device 0: NAND 16MiB 3.3V 8-bit >>I then moved the uClinux image to RAM: >>-> tftp 0x40800000 uImage >>Verified that the image is there: >>-> md 0x40800000 >>Attemped to erase NAND flash: >>-> nand erase >>...it seemed to work >>Attempted to write the image and this is what I got: >>-> nand write 0x40800000 0x0 0x2000000 >>NAND write: device 0 offset 0x0, size 0x200000 0 bytes written: ERROR >>I tried to see if the device happened to be locked and this is what I saw: >>-> nand unlock device 0 whole chip >>nand_unlock: start: 00000000, length: 16777216! >>nand_unlock: Device is write protected! >>Error unlocking NAND flash, write and erase will probably fail >>It says that the device is write-protected. >>I checked the schematics and verified that the write_protect pin is >>pulled-up, which would make it writable. Not sure how it is that it is >>coming-up write protected or how I can change that. I'd appreciate a shove >>in the right direction. >>Thanks, >>-Martin _______________________________________________ uClinux-dev mailing list uClinux-dev@uclinux.org http://mailman.uclinux.org/mailman/listinfo/uclinux-dev This message was resent by uclinux-dev@uclinux.org To unsubscribe see: http://mailman.uclinux.org/mailman/options/uclinux-dev _______________________________________________ uClinux-dev mailing list uClinux-dev@uclinux.org http://mailman.uclinux.org/mailman/listinfo/uclinux-dev This message was resent by uclinux-dev@uclinux.org To unsubscribe see: http://mailman.uclinux.org/mailman/options/uclinux-dev