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]

Re: Help with package addition


>>>>> "James" == James Hart <turquoise@hotpop.com> writes:

    James> Greetings.
    James> I am attempting to write a network driver for eCos v1.3.1.
    James> I wish to know what is the procedure for adding the driver
    James> as a package in to my ecos tree.

    James> This is what I have gathered so far (I'm not getting into
    James> details):

    James> 1. The ecos.ecc file has to contain a new cdl_package.

Not exactly, see below.

    James> 2. The relevant cdl file in the appropriate location must
    James> be populated with driver specific component details.

Yes.

    James> 3. The ecos.db must be updated with the cdl_package details.

And yes.


You appear to be confused about one point: ecos.ecc is part of the
build tree, not part of the source tree, and represents a saved eCos
configuration. If you want to add your package to a configuration,
use e.g. "ecosconfig add".

The correct process is something like the following. First you need to
create the CDL for your new package. Usually this is done by copying
an existing file and making several fairly obvious changes, but CDL is
fully documented in the Component Writers' Guide. Then you add the new
package to the ecos.db database. For a device driver package you may
also want to add the package to the appropriate target definition in
the ecos.db file, so that the package gets loaded automatically when
you create a new configuration for that target.

Now you can build a configuration which includes the new package.
Create a new build directory somewhere, and in that directory run

    ecosconfig new <your_target> net

That assumes you have the ECOS_REPOSITORY environment variable set
correctly. If not, you would need to use

    ecosconfig --srcdir=<path> new <your_target> net

If your changes to ecos.db have resulted in an invalid database then
you may get an error message at this point, hopefully giving some idea
of what is wrong with the database (although the diagnostics could be
improved). If you can create a new configuration then the database is
probably ok.

Assuming you have not yet added the package to the ecos.db your_target
definition, you now need to add the new package to the configuration.

    ecosconfig add <your_driver>

Again use --srcdir if ECOS_REPOSITORY is not set correctly. An error
at this point probably indicates a problem with the new CDL. At this
point you should have a new ecos.ecc file corresponding to this
configuration, and you can run "ecosconfig tree" to generate the
makefile etc.

Bart

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