|
|
|
Re: Can I change 'RedBoot Config' using MTD driver. ? | |
| [Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
|
|
Hi Gregory
Thanks for the Reply.
I have modified the code(MTD layer)
'mtdpart.c".(linux-2.6.x/drivers/mtd)
if ((slave->mtd.flags & MTD_WRITEABLE) &&
(slave->mtd.size % slave->mtd.erasesize)) {
// slave->mtd.flags &= ~MTD_WRITEABLE;
slave->mtd.flags &=MTD_WRITEABLE;
printk ("mtd: partition \"%s\" doesn't end on
an erase block -- force read-only---Hacked ;-)\n",
parts[i].name);
}
Now,I am able to read/write "RedBoot config" partition. ;-)
Best Regards
Amitesh Singh
http://www.amitesh.info
On 9/5/06, Gregory CLEMENT <gclement00@xxxxxxxxx> wrote:
> Hi all Hi, > My Task is to set "Boot script" (RedBoot config) value via a linux > command. > > As on RedBoot prompt,we set configurations using 'fconfig',is there any > Linux tool which does the same ? I don't know any, I think you have to make it. > i tried to do it in my way. > > # cat /proc/mtd > dev: size erasesize name > mtd0: 00040000 00020000 "RedBoot" > mtd1: 00f80000 00020000 "unallocated" > mtd2: 00001000 00020000 "RedBoot config" > mtd3: 00020000 00020000 "FIS directory" > > > First , i copied 'mtd2' using 'dd' and then changed the binary using > 'hexedit' (just changed Boot script). > Before booting,I unlocked RedBoot partitions. > ++++++++++++++++++++++++++++++ +++++++++++++++++++++++++ > RedBoot> fis list > Name FLASH addr Mem addr Length Entry point > RedBoot 0x50000000 0x50000000 0x00040000 0x00000000 > RedBoot config 0x50FC0000 0x50FC0000 0x00001000 0x00000000 > FIS directory 0x50FE0000 0x50FE0000 0x00020000 0x00000000 > RedBoot> fis unlock RedBoot > ... Unlock from 0x50000000-0x50040000: .. > RedBoot> fis unlock "RedBoot config" > ... Unlock from 0x50fc0000-0x50fc1000: . > RedBoot> fis unlock "FIS directory" > ... Unlock from 0x50fe0000-0x51000000: . > ++++++++++++++++++++++++++++++ +++++++++++++++++++++++++++++++++++ > > I am able to read/write other partitions (including FIS directory (have n't > checked for RedBoot :P) ) except "RedBoot config". > Any suggestions ??? In your log you have: > Uncompressing > Linux..................................................................... > done, booting the kernel. > Linux version 2.6.12-uc0 (root@buildsys.***********.com) (gcc version 3.3.2) [...] > 0x00fc0000-0x00fc1000 : "RedBoot config" > mtd: partition "RedBoot config" doesn't end on an erase block -- force > read-only It tells you that the "redboot config" don't fit an erase block, so mtd will refuse to erase it because it will erase more than this partition. You have to make your "RedBoot config" partition bigger for fitting your block erase size. If you can build RedBoot it is easy to fix it. If you can't, then you have to find a way to tell mtd that "redboot config" partition have the size of the space beetewen "RedBoot" partition and "FIS directory" partition. -- Gregory CLEMENT Adeneo
------------------------------------------------------------------- List admin: http://lists.arm.linux.org.uk/mailman/listinfo/linux-arm FAQ: http://www.arm.linux.org.uk/mailinglists/faq.php Etiquette: http://www.arm.linux.org.uk/mailinglists/etiquette.php
[Linux ARM] [Linux ARM MSM] [Linux ARM Kernel] [Fedora ARM] [IETF Annouce] [Security] [Bugtraq] [Linux] [Linux OMAP] [Linux MIPS] [ECOS] [Asterisk Internet PBX] [Linux API]
![]() |
![]() |