Could not create MTD Partitions

Frank Prepelica Frank.Prepelica at ubidyne.com
Tue Feb 27 20:48:08 EST 2007


Hi all,

 

I got a problem during creating the MTD partitions. I'm using the 

ELDK 4.1 with 2.6.19.2 Kernel and the MPC8343 board with 128MB RAM

and 64MB flash memory. 

 

flinfo returns:

 

Bank # 1: CFI conformant FLASH (32 x 16)  Size: 64 MB in 256 Sectors

 Erase timeout 16384 ms, write timeout 1 ms, buffer write timeout 4096
ms, buffer size 32

  Sector Start Addresses:

    FC000000      FC040000      FC080000      FC0C0000      FC100000

    FC140000      FC180000      FC1C0000      FC200000      FC240000

    FC280000      FC2C0000      FC300000      FC340000      FC380000

    FC3C0000      FC400000      FC440000      FC480000      FC4C0000

    FC500000      FC540000      FC580000      FC5C0000      FC600000

    FC640000      FC680000      FC6C0000      FC700000      FC740000

    FC780000      FC7C0000      FC800000      FC840000      FC880000

    FC8C0000      FC900000      FC940000      FC980000      FC9C0000

    FCA00000      FCA40000      FCA80000      FCAC0000      FCB00000

    FCB40000      FCB80000      FCBC0000      FCC00000      FCC40000

    FCC80000      FCCC0000      FCD00000      FCD40000      FCD80000

    FCDC0000      FCE00000      FCE40000      FCE80000      FCEC0000

    FCF00000      FCF40000      FCF80000      FCFC0000      FD000000

    FD040000      FD080000      FD0C0000      FD100000      FD140000

    FD180000      FD1C0000      FD200000      FD240000      FD280000

    FD2C0000      FD300000      FD340000      FD380000      FD3C0000

    FD400000      FD440000      FD480000      FD4C0000      FD500000

    FD540000      FD580000      FD5C0000      FD600000      FD640000

    FD680000      FD6C0000      FD700000      FD740000      FD780000

    FD7C0000      FD800000      FD840000      FD880000      FD8C0000

    FD900000      FD940000      FD980000      FD9C0000      FDA00000

    FDA40000      FDA80000      FDAC0000      FDB00000      FDB40000

    FDB80000      FDBC0000      FDC00000      FDC40000      FDC80000

    FDCC0000      FDD00000      FDD40000      FDD80000      FDDC0000

    FDE00000      FDE40000      FDE80000      FDEC0000      FDF00000

    FDF40000      FDF80000      FDFC0000      FE000000      FE040000

    FE080000      FE0C0000      FE100000      FE140000      FE180000

    FE1C0000      FE200000      FE240000      FE280000      FE2C0000

    FE300000      FE340000      FE380000      FE3C0000      FE400000

    FE440000      FE480000      FE4C0000      FE500000      FE540000

    FE580000      FE5C0000      FE600000      FE640000      FE680000

    FE6C0000      FE700000      FE740000      FE780000      FE7C0000

    FE800000      FE840000      FE880000      FE8C0000      FE900000

    FE940000      FE980000      FE9C0000      FEA00000      FEA40000

    FEA80000      FEAC0000      FEB00000      FEB40000      FEB80000

    FEBC0000      FEC00000      FEC40000      FEC80000      FECC0000

    FED00000      FED40000      FED80000      FEDC0000      FEE00000

    FEE40000      FEE80000      FEEC0000      FEF00000      FEF40000

    FEF80000      FEFC0000      FF000000      FF040000      FF080000

    FF0C0000      FF100000      FF140000      FF180000      FF1C0000

    FF200000      FF240000      FF280000      FF2C0000      FF300000

    FF340000      FF380000      FF3C0000      FF400000      FF440000

    FF480000      FF4C0000      FF500000      FF540000      FF580000

    FF5C0000      FF600000      FF640000      FF680000      FF6C0000

    FF700000      FF740000      FF780000      FF7C0000      FF800000

    FF840000      FF880000      FF8C0000      FF900000      FF940000

    FF980000      FF9C0000      FFA00000      FFA40000      FFA80000

    FFAC0000      FFB00000      FFB40000      FFB80000      FFBC0000

    FFC00000      FFC40000      FFC80000      FFCC0000      FFD00000

    FFD40000      FFD80000      FFDC0000      FFE00000      FFE40000

    FFE80000      FFEC0000      FFF00000 (RO) FFF40000 (RO) FFF80000

    FFFC0000

 

 

That indicates me, that the flash begins at address FC00 0000 and ends 

at FFFF FFFF. I assume the sectors FFF0 0000 and FFF4 0000 contains 

the HRCW and U-Boot, because they are protected.

 

Okay, so far so good. 

 

After that, I created my own flash map as followed:

 

Unused:                       FC00 0000 - FF7F FFFF (56Mbyte)

JFFS2:                         FF80 0000 - FFCF FFFF (5MByte)

Kernel:                         FFD0 0000 - FFEF FFFF (2MByte)

HRCW + U-Boot:          FFF0 0000 - FFF7 FFFF (512kByte)

Unused:                       FFF8 0000 - FFFF FFFF (512kByte)

 

Modyfied the corresponding source file:

 

#define WINDOW_ADDR 0xFC000000  // flash start address

#define WINDOW_SIZE 0x04000000     // 64Mbyte

 

static struct mtd_partition partition_info[]={

       {

               .name           = "Unused1",

               .offset         = 0,

               .size           = 0x3800000

       },

       {

               .name           = "JFFS2",

               .offset         = 0x3800000,

               .size           = 0x500000

       },

              {

               .name           = "Kernel",

               .offset         = 0x3D00000,

               .size           = 0x200000

       },

              {

               .name           = "HRCW",

               .offset         = 0x3F00000,

               .size           = 0x80000

       },

       {

               .name           = "Unused2",

               .offset         =0x3F80000,

               .size           = 0x80000

       }

};

 

 

After that, building the kernel, cp.b into the designated address (FFD0
0000)

and booting the kernel (bootm ffd00000).

 

I'll get these output messages:

 

EP8343M flash device: 4000000 at fc000000 Partition number 5

EP8343M Flash Map Info: Found 1 x32 devices at 0x0 in 16-bit bank

 Amd/Fujitsu Extended Query Table at 0x0040

EP8343M Flash Map Info: CFI does not contain boot bank location.
Assuming top.

number of CFI chips: 1

cfi_cmdset_0002: Disabling erase-suspend-program due to code brokenness.

Creating 5 MTD partitions on "EP8343M Flash Map Info":

0x00000000-0x03800000 : "Unused1"

mtd: partition "Unused1" extends beyond the end of device "EP8343M Flash
Map Info" -- size truncated to 0x2000000

0x03800000-0x03d00000 : "JFFS2"

mtd: partition "JFFS2" is out of reach -- disabled

0x03d00000-0x03f00000 : "Kernel"

mtd: partition "Kernel" is out of reach -- disabled

0x03f00000-0x03f80000 : "HRCW"

mtd: partition "HRCW" is out of reach -- disabled

0x03f80000-0x04000000 : "Unused2"

mtd: partition "Unused2" is out of reach -- disabled

EP8343M flash device initialized

 

Could you please help me and tell me what I did wrong?

 

Thanks for help and let me know if you need further information.

 

Best regards

Frank

 

 

 

 

 

 

	
	 	 
 


Frank Prepelica
Software Design Engineer

Ubidyne GmbH
Lise-Meitner-Str.-14
89081 Ulm - Germany

Phone:             +49 731 88 00 71 58

Fax:                 +49 731 88 00 71 99
Email:              frank.prepelica at ubidyne.com
Homepage:       www.ubidyne.com <http://www.ubidyne.com/> 

 

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://ozlabs.org/pipermail/linuxppc-embedded/attachments/20070227/8cda9942/attachment.htm 
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: image/gif
Size: 83 bytes
Desc: image002.gif
Url : http://ozlabs.org/pipermail/linuxppc-embedded/attachments/20070227/8cda9942/attachment.gif 


More information about the Linuxppc-embedded mailing list