Please note that User Registration has been temporarily disabled due to a recent increase in automated registrations. If anyone needs an account, please request one here: RequestAccount. Thanks for your patience!

JavaRecipeHowto

From Openembedded.org
Revision as of 21:04, 3 October 2008 by Kgilmer (Talk | contribs)

Jump to: navigation, search

Contents

Overview

This page describes how to create a recipe for a pre-existing Java project or library that is not currently available in OpenEmbedded or Jalimo. It assumes a basic working knowledge of OpenEmbedded and Java tools such as javac. An example library will be built from sources: Concierge, an OSGi framework.

Prerequisites

Before proceeding with this howto, you'll need to verify that your OpenEmbedded build environment is working properly. This falls into two categories, the core BitBake system and the OpenEmbedded recipes, and the Java tools that are built inside of OpenEmbedded.

General Open Embedded

After installing OpenEmbedded, go to the root of the installation and run bitbake to confirm your environment is working properly:

$ bitbake
NOTE: Handling BitBake files: \ (5485/5485) [100 %]
NOTE: Parsing finished. 5249 cached, 0 parsed, 236 skipped, 0 masked.
NOTE: Cache is clean, not saving.
Nothing to do.  Use 'bitbake world' to build everything, or run 'bitbake --help'
for usage information.

If you get a parse error or sanity check error, please consult the general OE troubleshooting page.

Java Native Tools

The next step is to build the host-side tools that will be used to compile Java libraries. While this process is somewhat complex, involving tools such as ecj, gnu classpath, and cacao, it is necessary. First, try building cacao-native. This should pull in most of the dependencies.

$ bitbake cacao-native
...
NOTE: package cacao-native-0.99.3: completed
NOTE: Tasks Summary: Attempted 265 tasks of which 248 didn't need to be rerun and 0 failed.
NOTE: build 200810031648: completed

BitBake Classes

BitBake classes are how the core bitbake program can be extended for specific tasks. The Jalimo group has added two bbclasses: java.bbclass, java-library.bbclass. These classes make it easier to write recipes that require or generate Java code.

Creating a recipe

General Items

Inheriting java-library

Pulling in your Sources

Testing it out

Examining the Result

Conclusion

Troubleshooting

Personal tools
Namespaces

Variants
Actions
Navigation
Categories
OE services
Toolbox