This is the mail archive of the ecos-discuss@sourceware.org mailing list for the eCos project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: AW: cat zImage >/dev/mtd1 does not work


Gary,

I'm at the point to flash the modified partition back but can't erase the
FIS partition /dev/mtd4

   # cat /proc/mtd
   dev:    size   erasesize  name
   mtd0: 00080000 00020000 "RedBoot"
   mtd1: 00100000 00020000 "kernel"
   mtd2: 00200000 00020000 "ramdisk"
   mtd3: 00020000 00020000 "kiyon_config"
   mtd4: 0001f000 00020000 "FIS directory"
   mtd5: 00001000 00020000 "RedBoot config"
   # eraseall /dev/mtd4
   eraseall: /dev/mtd4: Permission denied

I realized that I may need to "unlock" it but both my attempts to do that
in RedBoot and Linux failed. In the former, "fis unlock" worked fine in 
Redboot but after Linux boots up I still get the same "Permission denied"
error. In linux, my unlock resulted in 
        # unlock /dev/mtd4
        Could not open mtd device: /dev/mtd4
        # unlock /dev/mtd5
        Could not open mtd device: /dev/mtd5

Any ideas on how shall I proceed?

Thanks very much again!
Wei


--- Gary Thomas <gary@mlbassoc.com> wrote:

> Weiguang Shi wrote:
> > That's even better and was the solution that I was looking for.
> > The question is how, from the OS, can I update the FIS. Obviously
> > I need to know the structure of the "FIS directory" partition and
> > find the offset of that checksum and insert a '0' there by 
> >    - reading the whole partition into ram, 
> >    - changing the bit, erasing the partition on the flash, 
> >    - and finally flashing the modified partition in the ram back.
> > 
> > Any suggestions as to where to start?
> 
> <redboot/fis.h>
> 
> Also, drivers/mtd has some RedBoot FIS parsing code in it.  You could
> look at it for pointers.
> 
> > --- Gary Thomas <gary@mlbassoc.com> wrote:
> > 
> >> Note: you don't really need to change RedBoot.  Just update the
> >> FIS [directory] entry for the image you are changing, either with
> >> the corrected checksum, or the value 0.  RedBoot ignores the checksum
> >> when the stored value is 0.
> >>
> 
> -- 
> ------------------------------------------------------------
> Gary Thomas                 |  Consulting for the
> MLB Associates              |    Embedded world
> ------------------------------------------------------------
> 
> -- 
> Before posting, please read the FAQ: http://ecos.sourceware.org/fom/ecos
> and search the list archive: http://ecos.sourceware.org/ml/ecos-discuss
> 
> 



 
____________________________________________________________________________________
The fish are biting. 
Get more visitors on your site using Yahoo! Search Marketing.
http://searchmarketing.yahoo.com/arp/sponsoredsearch_v2.php

-- 
Before posting, please read the FAQ: http://ecos.sourceware.org/fom/ecos
and search the list archive: http://ecos.sourceware.org/ml/ecos-discuss


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]