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: How to use one redboot binary to support mulitple flashes and permit users runtime configure which flash will be used?


On Tue, Mar 31, 2009 at 05:48:27PM +0800, Liang, Kylie wrote:
> Hi all,
> 

> Is there any solution or way to use one binary supporting multiple
> flashes and permit users runtime configure which flash will be used?

> Currently, we could get a binary named redboot.bin which includes
> defined packages in ecos.db. In ecos.db, it seems that we are
> required to define only one type flash driver package in target each
> time. The flash.c under io folder will call flash_program,
> flash_read and other flash functions which implemented in
> corresponding flash driver.

> However, for reference platform, we may install multiple flashes on
> one platform at one time. For example, there are flash_strata and
> flash_toshiba. If we get a binary which includes flash_strata and
> flash_toshiba, how to permit users runtime configure which flash
> will be used? Does anybody meet same case?

> We thought out a way: 

> 1.	First time, boot from default flash.

> 2. Enter Redboot shell, run new command to configure which flash
>  will be used? Then write this configuration information to flash.

> 3. Reboot. Redboot read the configuration information in flash
> before flash initiation. Then boot from the flash which set in
> configuration information.

> But to implement this way, we need add a new command, save
> configuration information to flash, read configuration information
> from flash and pass parameter to flash driver. All of these seem
> riskful. And they also change the user model of redboot. Is there
> any other idea or solution?

The new flash infrastructure in eCos 3.0 allows for multiple different
flash drivers. At boot time each driver will probe to see if the flash
it is supposed to driver is actually there. If not, the driver is
inactive. If yes, it makes available the address range the flash uses.
With multiple flash chips, you see multiple flash address ranges in
RedBoot. 

Which flash is used to boot redboot is hardware defined. It is
unlikely you have any control over this. Once Redboot is booted you
then get the option to control the further boot process. Often you do
this by name. The images in flash are given names and listed in the
redboot FIS directory. Which area of which flash an image is in makes
no different. 

Hope this helps.

     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


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