[ << ] [ >> ]           [Top] [Contents] [Index] [ ? ]

Adding Applications

(C) Dave Pfaltzgraff
December 24, 2001 (Revised to relfect changes in the 20011112 distribution)

This is a brief description of the steps required to add an application to those provided by the uClinux distribution. To answer the first question as to why anyone would want to do this, it's merely that we want to be able to have the application appear in the romfs and thus be independent of the NFS file system. There can be two primary reasons for this - either no network or an environment that does not provide NFS services.

All of the following steps must be performed. There is no specific order, but each will be explained in terms of it's impact on the build process. This may also provide a rudmientary understanding of the 'make' process.

In all of the discussion below, the term 'xyz' is used to refer to the package being added. The term has no other meaning than the application we added. For your specific application, substitute your name for 'xyz' or 'XYZ'. Also, all directories are relative to /uClinux-dist - the root directory for uClinux development.

First of all, create the directory ./user/xyz and insert your source files in it. You'll also need a Makefile. I copied the one from another application (ping) and edited it to reflect the xyz name. If you're migrating from an earlier distribution, be sure to note the addition of the romfs section!

Now edit the file ./user/Makefile to add the line:
    dir_$(CONFIG_USER_XYZ_XYZ)                  += xyz
This tells the make process to move into the xyz directory IF the environment parameter CONFIG_USER_XYZ_XYZ is defined. I'm not sure why, but it appears that the application name is duplicated like this for all of them. (It may have to do with preventing name conflicts with kernel options.)

Next, edit the file ./config/config.in to add the line:
    bool 'xyz'          CONFIG_USER_XYZ_XYZ
in the appropriate place. We put ours in the 'Miscellaneous Applicaitons' section after the 'date' entry. This informs the 'make config' system to prompt for a [Y/N] response for this application. If you answer [Y], then CONFIG_USER_XYZ_XYZ is defined. Of course, the system offers the [?] option which is supposed to provide the user with rudimentary help information so you'll want to add the appropriate information in the ./config/Configure.help file:
  The XYZ application

Basically, the lines following the declaration are displayed for the user. According to the documentaion, these lines should be indented by two spaces and followed by a blank line. (My example above does not really convey much useful information and thus is not a good example.)

Note that the application is included in the romfs based on an entry in the application's Makefile. This is different from ealier versions.

After changing the configuration, it is important to run the entire sequence of 'make dep', 'make romfs', 'make clean' and finally 'make'. If all goes well, your application will be there!

[ << ] [ >> ]           [Top] [Contents] [Index] [ ? ]

This document was generated by root on December, 20 2002 using texi2html