This guide briefly describes one way to modify packages contained within [http://www.openembedded.org/ OpenEmbedded] (OE) for the the [[BeagleBoard]].

+

This guide briefly describes one way to modify packages contained within [http://www.openembedded.org/ OpenEmbedded] (OE) for the [[BeagleBoard]].

=== Prerequisites ===

=== Prerequisites ===

Line 7:

Line 7:

=== Local Overlay Setup ===

=== Local Overlay Setup ===

−

Many of us have installed OpenEmbedded to allow us to make BeagleBoard specific modifications to the official packages that are already in OpenEmbedded. One way to accomplish this is to use a local overlay tree that contains a copy of that the openembedded.dev tree that was created in the [[BeagleBoardAndOpenEmbeddedGit]] guide. The local overlay packages will override the packages contained in the openembedded.dev tree, with the recipes in the local copy of the package being preferred over the recipes in the openembedded.dev tree. You could even have a full copy of the openembedded.dev/packages tree under the local directory, and each package will override the one in the openembedded.dev/package tree.

+

Many of us have installed OpenEmbedded to allow us to make BeagleBoard specific modifications to the official packages that are already in OpenEmbedded. One way to accomplish this is to use a local overlay tree that contains a copy of the openembedded.dev tree that was created in the [[BeagleBoardAndOpenEmbeddedGit]] guide. The local overlay packages will override the packages contained in the openembedded.dev tree, with the recipes in the local copy of the package being preferred over the recipes in the openembedded.dev tree. You could even have a full copy of the openembedded.dev/packages tree under the local directory, and each package will override the one in the openembedded.dev/package tree.

This guide assumes that the openembedded.dev tree was created under $HOME/oe/openembedded, or /home/you/oe/openembedded and the local overlay tree you will be using will be under /home/you/oe/local. It also assumes that the package you are modifying is the u-boot package. Change the path names and the name of the package as appropriate for your installation and package.

This guide assumes that the openembedded.dev tree was created under $HOME/oe/openembedded, or /home/you/oe/openembedded and the local overlay tree you will be using will be under /home/you/oe/local. It also assumes that the package you are modifying is the u-boot package. Change the path names and the name of the package as appropriate for your installation and package.

For some reason, using the symbolic names ${OE_TOP} and ${USERBRANCH} did not work in BBFILES so I just used the full paths in my site.conf file. The priority for the _user has to be higher than the priority for _oe to make bitbake prefer the user packages over the openembedded packages.

+

The priority for the _user has to be higher than the priority for _oe to make bitbake prefer the user packages over the openembedded packages.

The final directory structure would look something like:

The final directory structure would look something like:

Line 53:

Line 57:

oe

oe

|-- beagleboard

|-- beagleboard

−

| `-- beagleboard

+

| |-- beagleboard

| |-- profile.sh

| |-- profile.sh

−

| `-- conf

+

| |-- conf

| |-- auto.conf

| |-- auto.conf

| |-- local.conf

| |-- local.conf

| |-- site.conf

| |-- site.conf

|-- local

|-- local

−

| `-- packages

+

| |-- recipes

−

| `-- u-boot

+

| | `-- u-boot

−

| |-- u-boot_git.bb

+

| | |-- u-boot_git.bb (local copy of the recipe)

−

. .-- ...

+

. | .-- ...

−

.

+

. .

−

.

+

. .

−

| `-- sources

+

| |-- sources

| `-- u-boot

| `-- u-boot

−

| |-- ... local copy sources for u-boot

+

| |-- ... local copy of the sources for u-boot

.

.

.

.

.

.

| -- openembedded

| -- openembedded

−

| `-- packages

+

| `-- recipes

| `-- u-boot

| `-- u-boot

−

| | -- u-boot_git.bb

+

| | -- u-boot_git.bb (official recipe)

. . -- ...

. . -- ...

. .

. .

Line 84:

Line 88:

S = "${WORKDIR}/git"

S = "${WORKDIR}/git"

−

or whatever S is set in the recipe, to point to your local directory that contains your copy of the sources like:

+

or whatever S is set to in the recipe, to point to your local directory that contains your copy of the sources like:

S = "/home/you/oe/local/sources/u-boot"

S = "/home/you/oe/local/sources/u-boot"

−

Overriding S will still download the repository specified in SRC_URI, but will then build using the sources specified in S. Now, you will be sourcing the profile.sh file to set up your build environment before you start your build:

+

Overriding S will still download the repository specified in SRC_URI, but you can change that to point to a local file://dummy.txt file you create in the files folder of the local copy of your package files. Then, a build will use the sources specified in S without going through the step of downloading the

+

files specified in SRC_URI in the original recipe. Now, you will be sourcing the profile.sh file to set up your build environment before you start your build:

source /home/oe/beagleboard/beaglboard/profile.sh

source /home/oe/beagleboard/beaglboard/profile.sh

Line 96:

Line 101:

bitbake u-boot

bitbake u-boot

−

it will actually use the /home/you/oe/local/packages/u-boot/u-boot_git.bb recipe instead of the one in the openembedded tree (u-boot_git.bb is the recipe for the u-boot package).

+

it will use the /home/you/oe/local/packages/u-boot/u-boot_git.bb recipe instead of the one in the openembedded tree (u-boot_git.bb is the recipe for the u-boot package).

+

+

If you modified S = to point to your own local copy of the sources, and modified SRC_URI such that it points to a dummy file in the files directory in your local copy of the package, you could call:

+

+

bitbake -c compile -f u-boot

+

+

to force a compilation using your local source files while skipping the download step.

Latest revision as of 12:02, 22 March 2009

Prerequisites

You should set up the OpenEmbedded environment for the BeagleBoard by following the BeagleBoardAndOpenEmbeddedGit guide first before using this guide.

Local Overlay Setup

Many of us have installed OpenEmbedded to allow us to make BeagleBoard specific modifications to the official packages that are already in OpenEmbedded. One way to accomplish this is to use a local overlay tree that contains a copy of the openembedded.dev tree that was created in the BeagleBoardAndOpenEmbeddedGit guide. The local overlay packages will override the packages contained in the openembedded.dev tree, with the recipes in the local copy of the package being preferred over the recipes in the openembedded.dev tree. You could even have a full copy of the openembedded.dev/packages tree under the local directory, and each package will override the one in the openembedded.dev/package tree.

This guide assumes that the openembedded.dev tree was created under $HOME/oe/openembedded, or /home/you/oe/openembedded and the local overlay tree you will be using will be under /home/you/oe/local. It also assumes that the package you are modifying is the u-boot package. Change the path names and the name of the package as appropriate for your installation and package.

Edit the profile.sh file that was created in the BeagleBoardAndOpenEmbeddedGit guide under the /home/you/oe/beagleboard/beagleboard directory to look like:

In my case, the files under /home/you/oe/local/packages/u-boot are the same as those in /home/you/oe/openemedded/packages/u-boot, with the u-boot-git.bb recipe changed to use the local sources or some other git repository than the one specified in the official upstream u-boot_git.bb that is present in the openembedded/packages/u-boot directory. If you want to specify another public repository in the .bb file, you can change the SRC_URI in the local package's version to point to it. If you just want to use a local copy of the sources, without using a public repository, you can change the S variable in the .bb file from:

S = "${WORKDIR}/git"

or whatever S is set to in the recipe, to point to your local directory that contains your copy of the sources like:

S = "/home/you/oe/local/sources/u-boot"

Overriding S will still download the repository specified in SRC_URI, but you can change that to point to a local file://dummy.txt file you create in the files folder of the local copy of your package files. Then, a build will use the sources specified in S without going through the step of downloading the
files specified in SRC_URI in the original recipe. Now, you will be sourcing the profile.sh file to set up your build environment before you start your build:

source /home/oe/beagleboard/beaglboard/profile.sh

Now when you call:

bitbake u-boot

it will use the /home/you/oe/local/packages/u-boot/u-boot_git.bb recipe instead of the one in the openembedded tree (u-boot_git.bb is the recipe for the u-boot package).

If you modified S = to point to your own local copy of the sources, and modified SRC_URI such that it points to a dummy file in the files directory in your local copy of the package, you could call:

bitbake -c compile -f u-boot

to force a compilation using your local source files while skipping the download step.