[ELDK] mtd query
novice 123
mailinglistscontact at gmail.com
Tue Aug 26 11:46:46 CEST 2008
Hi All,
I am using a incaip board. I have partitioned the flash into 7 sections .
The information about 7 partitions is clearly shown during the phone boot
process as follows
Creating 7 MTD partitions on "INCA-IP Bank 0":
0x00000000-0x00030000 : "U-Boot"
0x00030000-0x00040000 : "Environment"
0x00040000-0x00110000 : "Linux"
0x00110000-0x00120000 : "new software1"
0x00120000-0x00410000 : "rootfs"
0x00410000-0x007e0000 : "Linux 2"
0x007e0000-0x007f0000 : "new software2"
However, when I execute
cat /proc/mtd
the following is displayed
# cat /proc/mtd
dev: size erasesize name
mtd0: 00030000 00010000 "U-Boot"
mtd1: 00010000 00010000 "Environment"
mtd2: 000d0000 00010000 "Linux"
mtd3: 00010000 00010000 "new software1"
mtd4: 002f0000 00010000 "rootfs"
mtd5: 003d0000 00010000 "Linux 2"
Because of non-availability of the 6 th partition information, I am not able
to erase and write any data
on to it.Whenever I had to make any modifications , I had modified the
incaip file in drivers/mtd/maps/
The following is the structure into which I add or delete partition related
information.
static struct mtd_partition incaip_partitions[] = {
{
name: "U-Boot", /* U-Boot firmware */
offset: 0x00000000,
size: 0x00030000, /* 192KB */
/* mask_flags: MTD_WRITEABLE, force read-only */
},
{
name: "Environment", /* default environment var. */
offset: 0x00030000,
size: 0x00010000, /* 64 kb */
/* mask_flags: MTD_WRITEABLE, force read-only */
},
{
name: "Linux", /* default kernel image */
offset: 0x00040000, /* uImage */
size: 0x000D0000, /* 64 * 14 = 896kb */
/* mask_flags: MTD_WRITEABLE, force read-only */
},
{
name: "new software1",/*new software1 */
offset: 0x00110000, /* */
size: 0x00010000, /* 64 * 1 = 1kb */
/* mask_flags: MTD_WRITEABLE, force read-only */
},
{
name: "rootfs", /* factory filesystem */
offset: 0x00120000, /* 64 * 47 = 3008 */
size: 0x002F0000, /* rootfs-factory.inca.img*/
/* mask_flags: MTD_WRITEABLE, force read-only */
},
{
name: "Linux 2", /* Kernel + Root Filesystem */
offset: 0x00410000, /* rootfs.inca.img */
size: 0x003D0000, /* 64 * 61 = 3904 kb */
},
{
name: "new software2", /* new software2 */
offset: 0x007E0000, /* 64 * 1 = 64 kb */
size: 0x00010000,
},
};
If any one has come across this situation ,
please let me know the where I have to further investigate and make
modifications.
( so that I can read and write data into the last partition also )
Note: The o/p's of
#ls /dev/mtd
0 0ro 1 1ro 2 2ro 3 3ro 4 4ro 5 5ro
#ls /dev/mtdblock
0 1 2 3 4 5
Thanks In advance,
EL Novice
More information about the eldk
mailing list