Embedding Custom Packages: Difference between revisions

From
Jump to navigation Jump to search
No edit summary
 
m (Embed Custom Packages moved to Embedding Custom Packages)
 
(2 intermediate revisions by the same user not shown)
Line 1: Line 1:
[[Category:Openmoko]][[Eigene Pakete einbinden|German version]]

The easiest and cleanest way to embed custom packages into an OpenMoko image build is to basically create a custom distribution on top of OpenMoko (just like OpenMoko is built on top of OpenEmbedded). In order to do this we create a new directory tree <code>openmoko-sar</code> next to <code>oe</code> and <code>openembedded</code>:
The easiest and cleanest way to embed custom packages into an OpenMoko image build is to basically create a custom distribution on top of OpenMoko (just like OpenMoko is built on top of OpenEmbedded). In order to do this we create a new directory tree <code>openmoko-sar</code> next to <code>oe</code> and <code>openembedded</code>:
$OPENMOKODIR
$OPENMOKODIR
Line 25: Line 27:


For a first test we will put our own image recipes into this tree, and create the new recipes based on the image recipes from <code>$OPENMOKODIR/oe/packages/images/</code>. Simply copy the existing recipes, change their name, modify the <code>require</code> statement in (the now new) <code>openmoko-sar-devel-image.bb</code>. At a later time we plan to put this structure into a version control system.
For a first test we will put our own image recipes into this tree, and create the new recipes based on the image recipes from <code>$OPENMOKODIR/oe/packages/images/</code>. Simply copy the existing recipes, change their name, modify the <code>require</code> statement in (the now new) <code>openmoko-sar-devel-image.bb</code>. At a later time we plan to put this structure into a version control system.

To actually use this structure the following changes are necessary. In <code>setup-env</code> change:
export BBPATH="${OMDIR}/build:${OMDIR}/oe:${OMDIR}/openembedded:"
to
export BBPATH="${OMDIR}/build:${OMDIR}/oe:${OMDIR}/openembedded:${OMDIR}/openmoko-sar"
and in <code>build/conf/local.conf</code> append:
BBFILES := "${BBFILES} ${OMDIR}/openmoko-sar/packages/*/*.bb"

(And maybe, for convenience, append to <code>Makefile</code>:
.PHONY: %-image
%-image:
( source ./setup-env ; cd build ; bitbake -c build $*-image )
)

Now you should be able to build the new image with <code>make openmoko-sar-devel-image</code>. Bonus point: since the image name starts with <code>openmoko-</code> it will automatically be picked up by <code>make flash-qemu-local</code>.

Latest revision as of 03:12, 12 July 2007

German version

The easiest and cleanest way to embed custom packages into an OpenMoko image build is to basically create a custom distribution on top of OpenMoko (just like OpenMoko is built on top of OpenEmbedded). In order to do this we create a new directory tree openmoko-sar next to oe and openembedded:

$OPENMOKODIR
|
|-> oe
|    |
|    |-> classes
|    |   |
|    |   |-> ...
|    |-> packages
|    |   |
|    |   |-> images
|    |   |-> ...
|    |->...
|-> openembedded
|    |
|    |->...
|-> openmoko-sar
|    |
|    |-> packages
|    |   |
|    |   |-> images
|    |   |   |
|    |   |   |-> openmoko-sar-devel-image.bb
|    |   |   |-> openmoko-sar-image.bb

For a first test we will put our own image recipes into this tree, and create the new recipes based on the image recipes from $OPENMOKODIR/oe/packages/images/. Simply copy the existing recipes, change their name, modify the require statement in (the now new) openmoko-sar-devel-image.bb. At a later time we plan to put this structure into a version control system.

To actually use this structure the following changes are necessary. In setup-env change:

export BBPATH="${OMDIR}/build:${OMDIR}/oe:${OMDIR}/openembedded:"

to

export BBPATH="${OMDIR}/build:${OMDIR}/oe:${OMDIR}/openembedded:${OMDIR}/openmoko-sar"

and in build/conf/local.conf append:

BBFILES := "${BBFILES} ${OMDIR}/openmoko-sar/packages/*/*.bb"

(And maybe, for convenience, append to Makefile:

.PHONY: %-image
%-image:
	( source ./setup-env ; cd build ; bitbake -c build $*-image )

)

Now you should be able to build the new image with make openmoko-sar-devel-image. Bonus point: since the image name starts with openmoko- it will automatically be picked up by make flash-qemu-local.