public inbox for ecos-discuss@sourceware.org
 help / color / mirror / Atom feed
* [ECOS] RedBoot FIS directory and flash config data location
@ 2008-04-16 17:47 hartleys
  2008-04-16 18:18 ` Gary Thomas
  0 siblings, 1 reply; 7+ messages in thread
From: hartleys @ 2008-04-16 17:47 UTC (permalink / raw)
  To: ecos-discuss

Hello all.

Are there any patches for RedBoot to correctly place the FIS directory
and config data so that they are properly aligned on an erase block?

My system uses an Intel P33 top parameter block StrataFlash. This device
has the upper 128K block divided into 4 32K parameter blocks. I would
like the FIS directory to occupied the first 3 parameter blocks and the
config data to occupy the last 32K block. If this is possible I think
the Linux MTD drivers could be modified to allow these two blocks to be
writeable.

Currently on my system 4 MTD partitions are found when Linux boots
(using a 16MB
device):

Creating 4 MTD partitions on "physmap-flash":
0x00000000-0x00040000 : "RedBoot"
0x00040000-0x00fe0000 : "unallocated"
0x00fe0000-0x00fff000 : "FIS directory"
mtd: partition "FIS directory" doesn't end on an erase block -- force
read-only 0x00fff000-0x01000000 : "RedBoot config"
mtd: partition "RedBoot config" doesn't start on an erase block boundary
-- force read-only

Good - Blocks 0 and 1 contain the RedBoot code itself.
Good - Blocks 2 thru 126 (the last 128K block) are unallocated.
Bad  - Blocks 127, 128, 129 and 28K of block 130 contain the FIS
directory.
Bad  - The last 4K of block 130 contains the RedBoot config.

What I would like is for the last two entries to be:

Good - Blocks 127, 128 and 129 contain the FIS directory.
Good - Block 130 contains the RedBoot config.

I realize this decreases the FID directory by 28K but it appears each
entry is only 256 bytes so there is still space for 384 entries in the
96K region (112 entries are lost by not using the extra 28K). This
should be plenty for most applications. You end up with a lot of wasted
space in the RedBoot config region but I think the trade off is worth
it.

I'm willing to tackle the problem myself but wanted to make sure it
hasn't already been looked at.

Thanks,
Hartley

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

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [ECOS] RedBoot FIS directory and flash config data location
  2008-04-16 17:47 [ECOS] RedBoot FIS directory and flash config data location hartleys
@ 2008-04-16 18:18 ` Gary Thomas
  2008-04-16 18:20   ` hartleys
  0 siblings, 1 reply; 7+ messages in thread
From: Gary Thomas @ 2008-04-16 18:18 UTC (permalink / raw)
  To: hartleys; +Cc: ecos-discuss

hartleys wrote:
> Hello all.
> 
> Are there any patches for RedBoot to correctly place the FIS directory
> and config data so that they are properly aligned on an erase block?
> 
> My system uses an Intel P33 top parameter block StrataFlash. This device
> has the upper 128K block divided into 4 32K parameter blocks. I would
> like the FIS directory to occupied the first 3 parameter blocks and the
> config data to occupy the last 32K block. If this is possible I think
> the Linux MTD drivers could be modified to allow these two blocks to be
> writeable.
> 
> Currently on my system 4 MTD partitions are found when Linux boots
> (using a 16MB
> device):
> 
> Creating 4 MTD partitions on "physmap-flash":
> 0x00000000-0x00040000 : "RedBoot"
> 0x00040000-0x00fe0000 : "unallocated"
> 0x00fe0000-0x00fff000 : "FIS directory"
> mtd: partition "FIS directory" doesn't end on an erase block -- force
> read-only 0x00fff000-0x01000000 : "RedBoot config"
> mtd: partition "RedBoot config" doesn't start on an erase block boundary
> -- force read-only
> 
> Good - Blocks 0 and 1 contain the RedBoot code itself.
> Good - Blocks 2 thru 126 (the last 128K block) are unallocated.
> Bad  - Blocks 127, 128, 129 and 28K of block 130 contain the FIS
> directory.
> Bad  - The last 4K of block 130 contains the RedBoot config.
> 
> What I would like is for the last two entries to be:
> 
> Good - Blocks 127, 128 and 129 contain the FIS directory.
> Good - Block 130 contains the RedBoot config.
> 
> I realize this decreases the FID directory by 28K but it appears each
> entry is only 256 bytes so there is still space for 384 entries in the
> 96K region (112 entries are lost by not using the extra 28K). This
> should be plenty for most applications. You end up with a lot of wasted
> space in the RedBoot config region but I think the trade off is worth
> it.
> 
> I'm willing to tackle the problem myself but wanted to make sure it
> hasn't already been looked at.

Isn't it sufficient to just configure the 'fconfig' size to be 32KB?

-- 
------------------------------------------------------------
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

^ permalink raw reply	[flat|nested] 7+ messages in thread

* RE: [ECOS] RedBoot FIS directory and flash config data location
  2008-04-16 18:18 ` Gary Thomas
@ 2008-04-16 18:20   ` hartleys
  2008-04-16 18:31     ` Andrew Lunn
  0 siblings, 1 reply; 7+ messages in thread
From: hartleys @ 2008-04-16 18:20 UTC (permalink / raw)
  To: Gary Thomas; +Cc: ecos-discuss

Gary Thomas wrote:
> Isn't it sufficient to just configure the 'fconfig' size to be 32KB?

That's probably it.

I found the cdl_option CYGNUM_REDBOOT_FLASH_CONFIG_SIZE option in
./packages/redboot/current/cdl/redboot.cdl but, forgive me, how to I
change the configuration?

Thanks,
Hartley

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

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [ECOS] RedBoot FIS directory and flash config data location
  2008-04-16 18:20   ` hartleys
@ 2008-04-16 18:31     ` Andrew Lunn
  2008-04-16 18:33       ` hartleys
  2008-04-16 19:56       ` hartleys
  0 siblings, 2 replies; 7+ messages in thread
From: Andrew Lunn @ 2008-04-16 18:31 UTC (permalink / raw)
  To: hartleys; +Cc: Gary Thomas, ecos-discuss

On Wed, Apr 16, 2008 at 02:17:40PM -0400, hartleys wrote:
> Gary Thomas wrote:
> > Isn't it sufficient to just configure the 'fconfig' size to be 32KB?
> 
> That's probably it.
> 
> I found the cdl_option CYGNUM_REDBOOT_FLASH_CONFIG_SIZE option in
> ./packages/redboot/current/cdl/redboot.cdl but, forgive me, how to I
> change the configuration?

emacs ecos.ecc

uncomment the user value, and set it.

ecosconfig tree
make

        Andrew

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

^ permalink raw reply	[flat|nested] 7+ messages in thread

* RE: [ECOS] RedBoot FIS directory and flash config data location
  2008-04-16 18:31     ` Andrew Lunn
@ 2008-04-16 18:33       ` hartleys
  2008-04-16 19:18         ` Andrew Lunn
  2008-04-16 19:56       ` hartleys
  1 sibling, 1 reply; 7+ messages in thread
From: hartleys @ 2008-04-16 18:33 UTC (permalink / raw)
  To: Andrew Lunn; +Cc: Gary Thomas, ecos-discuss

On Wednesday, April 16, 2008 11:20 AM Andrew Lunn wrote:
> emacs ecos.ecc
>
> uncomment the user value, and set it.
> 
> ecosconfig tree
> make

Thanks. Trying it now.

BTW, is there something similar to 'make menuconfig' to configure ecos?

Hartley

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

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [ECOS] RedBoot FIS directory and flash config data location
  2008-04-16 18:33       ` hartleys
@ 2008-04-16 19:18         ` Andrew Lunn
  0 siblings, 0 replies; 7+ messages in thread
From: Andrew Lunn @ 2008-04-16 19:18 UTC (permalink / raw)
  To: hartleys; +Cc: Andrew Lunn, Gary Thomas, ecos-discuss

> BTW, is there something similar to 'make menuconfig' to configure ecos?

Nope.

Besides, emacs is much more powerful in terms of searching what you are
looking for.

        Andrew

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

^ permalink raw reply	[flat|nested] 7+ messages in thread

* RE: [ECOS] RedBoot FIS directory and flash config data location
  2008-04-16 18:31     ` Andrew Lunn
  2008-04-16 18:33       ` hartleys
@ 2008-04-16 19:56       ` hartleys
  1 sibling, 0 replies; 7+ messages in thread
From: hartleys @ 2008-04-16 19:56 UTC (permalink / raw)
  To: Andrew Lunn; +Cc: Gary Thomas, ecos-discuss

On Wednesday, April 16, 2008 11:20 AM Andrew Lunn wrote:
> > Gary Thomas wrote:
> > > Isn't it sufficient to just configure the 'fconfig' size to be
32KB?
> > 
> > That's probably it.
> > 
> > I found the cdl_option CYGNUM_REDBOOT_FLASH_CONFIG_SIZE option in 
> > ./packages/redboot/current/cdl/redboot.cdl but, forgive me, how to I

> > change the configuration?
>
> emacs ecos.ecc
>
> uncomment the user value, and set it.
>
> ecosconfig tree
> make

Sweet! That did it!

Thanks,
Hartley

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

^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2008-04-16 19:18 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2008-04-16 17:47 [ECOS] RedBoot FIS directory and flash config data location hartleys
2008-04-16 18:18 ` Gary Thomas
2008-04-16 18:20   ` hartleys
2008-04-16 18:31     ` Andrew Lunn
2008-04-16 18:33       ` hartleys
2008-04-16 19:18         ` Andrew Lunn
2008-04-16 19:56       ` hartleys

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).