John Tobias wrote:
I've used the following commands and didn't get any success.
1. nanddump -n -f /ubl.bin /dev/mtd5
Block size 16384, page size 512, OOB size 16
Dumping data starting at 0x00000000 and ending at 0x00004000
2. flash_erase /dev/mtd1
3. nandwrite -n -o /dev/mtd1 /ubl.bin
4. flash_erase /dev/mtd5
Any more idea?
Did you actually create your Linux MTD partitions as individual NAND
blocks for the ubl? For example...
/* TI UBL and spare */
{
.name = "UBL",
.offset = MTDPART_OFS_APPEND,
.size = SZ_128K + SZ_512K,
.mask_flags = 0,
},
... is my NAND layout for ubl (Your NAND block size may differ). All of
the ubl blocks are on Linux mtd1.
nanddump -n /dev/mtd1 >img
nandwrite -n -o /dev/mtd1 img
Those commands work for me from Linux to produce a working system. I
can't say it's entirely reliable reading and writing without ECC
though. You may want to spend the time to add a routine in the Linux
davinci NAND driver to write those blocks using rbl's ECC layout and
save yourself some potential headaches.
If you have a single Linux mtd partition you can use the -s and -l
options to write an individual block. Since you are using a 16K page
NAND part, your Linux partitions (for ubl) would look something like.
{
.name = "Environment",
.offset = 0,
.size = SZ_16K,
.mask_flags = 0,
},
{
.name = "UBL1",
.offset = MTDPART_OFS_APPEND,
.size = SZ_16K,
.mask_flags = 0,
},
{
.name = "UBL2",
.offset = MTDPART_OFS_APPEND,
.size = SZ_16K,
.mask_flags = 0,
},
{
.name = "UBL3",
.offset = MTDPART_OFS_APPEND,
.size = SZ_16K,
.mask_flags = 0,
},
{
.name = "UBL4",
.offset = MTDPART_OFS_APPEND,
.size = SZ_16K,
.mask_flags = 0,
},
{
.name = "UBL5",
.offset = MTDPART_OFS_APPEND,
.size = SZ_16K,
.mask_flags = 0,
},
{
.name = "U-boot",
.offset = MTDPART_OFS_APPEND,
.size = SZ_256K, /* or whatever size you want for uboot. you can
place copies in up to 50 blocks though uboot will always consume > 1
block for you */
.mask_flags = 0,
}
With that you could access individual ubl copies without offsetting
start address and specifying length in nanddump/nandwrite.
_______________________________________________
Davinci-linux-open-source mailing list
[email protected]
http://linux.davincidsp.com/mailman/listinfo/davinci-linux-open-source