This is the mail archive of the ecos-discuss@sources.redhat.com 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]

Variants and subvariants


Hi folks!

The current design of the eCos HAL moves from Architecture, to Variant, to
Platform.  The OMAP device from Texas Instrumentshas an ARM9 core, a pile o'
peripherals (UARTS, USB client & host, camera interface, keyboard interface,
etc...) and a DSP core all in one device.  When I created the HAL for the
Innovator board, I simply created it as a platform that used the ARM9
variant of the ARM Architecture.

Now that Mike Beymer has ported eCos to the Minno board and I am starting to
port it to a custom board, I want to minimize the amount of code that simply
gets cut and pasted from one platform to the next.  Right now, I can think
of two options and I am seeking opinions and guidance on what is the best
solution:

1) Create an OMAP variant of the ARM.  Basically, cut and paste the current
ARM9 variant as an OMAP variant and modify the Innovator and Minno ports to
use that variant instead of the ARM9 variant.  Then as we go forward, we can
migrate all of the common code into the variant tree and leave the platform
trees very sparse in what they need to customize.  This fits in with the way
other ports have been done, but it requires that I do something that I hate
-- cut and paste code.  (I don't mind copying and modifying code, but simply
copying from one place to another simply doubles the amount of work that
needs to be done when maintaining the code).

2) Create an OMAP subvariant of the ARM9.  Since the concept of subvariants
doesn't exist, this would require more up front work.  Probably I would
create it as if it were a platform, and have it include "omap_plf*.h" files
that define 'OMAP_PLF' type macros.

Ultimately, I would like to be able to build a very generic RedBoot that was
guaranteed to run on any board that had an OMAP on it (by virtue of using
only the internal RAM on the OMAP, and talking to the outside world via
internal UART) that would simplify initial "bring-up" of an OMAP based
board.  The more code I can place in the OMAP HAL, the less I have to place
in the platform HAL, provided that there are enough hooks to allow the
platform HAL to override the (sub)variant.

It seems to me that the PowerPC devices based on the 603 core could benefit
from a subvariant strategy as well.

What are folks opinions?

--wpd

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


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