RedBoot partition not @ end of flash...

Deepak Saxena dsaxena at plexity.net
Tue May 2 04:50:45 EDT 2006


I've got a board with a 32MiB flash (128K SectorSize) with the redboot table
only covering the first (32MiB - SectorSize) and the rest setup as OTP from
what I understand. What is the proper way to deal with this? What I'm doing 
right now is a heinous hack:

        ixp425_mtd->size -= ixp425_mtd->erasesize;
        /* Try to parse RedBoot partitions */
        npart = parse_mtd_partitions(ixp425_mtd, probes, &parsed_parts, 0);
        if (npart > 0) {
                res = add_mtd_partitions(ixp425_mtd, parsed_parts, npart);
        } else {
                printk("IXP425 Flash: Using static MTD partitions.\n");
                res = add_mtd_partitions(ixp425_mtd, ixp425_partitions,
                                         NB_OF(ixp425_partitions));
        }
        ixp425_mtd->size += ixp425_mtd->erasesize;

I tried setting the window size to (32MiB - SectorSize) before probing
but that failed miserably. One other thought I had was to create a
static partition map dividing the flash and then parse partitions
on the first region. Can the code handle recursive parsing?

I doubt I'm the first one to deal with this...

Tnx,
~Deepak

-- 
Deepak Saxena - dsaxena at plexity.net - http://www.plexity.net

I am not a consumer. My existence on this planet is not defined by my
relationship to a producer of goods.  I was not put on this planet to
consume goods from a company for their profit. - Michael W.




More information about the linux-mtd mailing list