Skip to contentSkip to conversation

Flash partions ...

U-Boot-Users Wolfgang Kanovsky 2 participants 2 messages Mar 12, 2004

lore
Share & tools
lore
#0 lore raw

Hi all

does any one know where i have to fill an mtd structure in uboot when i wonna have partitions on my flash ?

i patched the linux kernel ...with mtd struct ..but where can i do the same for uboot ?

/* partition_info gives details on the logical partitions that the split the
* single flash device into. If the size if zero we use up to the end of the
* device. */

static struct mtd_partition partition_info[]={
    {
        .name = "HopfSC520 boot kernel",
        .offset = 0,
        .size = 0xc0000
    },
    {
        .name = "HopfSC520",
        .offset = 0xc0000,
        .size = 0x40000
    },
    {
        .name = "HopfSC520 file system 15MB",
        .offset = 0x100000,
        .size = 0xe80000
    },
    {
        .name = "HopfSC520 U-boot 512K",
        .offset = 0xf80000,
        .size = 0x80000
    },
};

#define NUM_PARTITIONS (sizeof(partition_info)/sizeof(partition_info[0]))

best regards
Wolfgang Kanovsky

#1 lore raw

Dear Wolfgang,

Quoted 3 lines · in message <[email protected]> you wrote:

does any one know where i have to fill an mtd structure in uboot when i wonna have partitions on my flash ?

There is no MTD support in U-Boot. U-Boot handles just the low level interface, i. e. individual sectors or address ranges.

Quoted 2 lines

i patched the linux kernel ...with mtd struct ..but where can i do the same for uboot ?

You can pass a partition map to the Linux kernel as part of the boot arguments; see the manual at
http://www.denx.de/twiki/bin/view/DULG/BootTimeConfigurationOfMTDPartitions

Best regards,

Wolfgang Denk

Signature · 3 lines
Software Engineering:  Embedded and Realtime Systems,  Embedded Linux
Phone: (+49)-8142-4596-87  Fax: (+49)-8142-4596-88  Email: wd at denx.de
As of 1992, they're called European Economic Community fries.