fundamentals about OE

Cliff Brake cliff.brake at gmail.com
Tue Mar 11 16:26:34 UTC 2008


On Tue, Mar 11, 2008 at 11:09 AM, Javi Roman <javiroman at kernel-labs.org> wrote:
> Hi all,
>
>  I don't manage to understand the philosophy behind OE.
>  I'm trying to create a custom distribution over OE, by means of a local overlay.
>
>  This is my knowledge:
>
>  1. I have created customs distro and machine files:
>
>  OE/
>  |-- build
>  |   `-- conf
>  |         |-- local.conf
>  |         `-- site.conf ===> (bitbake collection pointing out to my
>  local overlay)
>  |-- openembedded
>  `-- overlay

Looks good!  You may want to make the overlay/conf for consistency.

>      |--- distro
>      |   `--  mydistro.conf =====> (based on generic.conf distro)
>      `-- machine
>           `-- mymachine.conf ===>  (based on epia.conf machine)
>
>  2. Also I have created a rootfs image file:
>
>  |-- openembedded
>  `-- overlay
>     |       |
>     |       `-- packages
>     |           |-- images
>     |           |   `-- my-image.bb
>     |           |-- java-sun
>     |           |   `-- j2re_1.4.2-15.bb
>
>
>  3. To add a new package I add it to my-image.bb:
>
>  ---- my-image.bb ------
>  require packages/images/bootstrap-image.bb
>
>  export IMAGE_INSTALL += "j2re \
>                 grub \
>                 "
>  inherit image
>
>  export IMAGE_BASENAME = "my-image"
>  ----------------------------
>
>  My questions are the following:
>
>  1. The above image file, my-image.bb, is it the correct way to add new packages?

Looks correct to me.

>  2. If I'm using my custom machine and distro files, do I need define a
>  task-base.bb file?

Only if the default one in OE is not working for you.  Typically, this
is not necessary.

>  3. Can anybody explain me the relation between the files: distro,
>  machine, image and task-base?

*.conf files (distro/machine) simply set up global variables and are
read in the order defined by conf/bitbake.conf:

##################################################################
# Include the rest of the config files.
##################################################################

include conf/site.conf
include conf/auto.conf
include conf/local.conf
# USERDISTRO should always contain original DISTRO value as set by user
# If a distro config overrides DISTRO for whatever reason (e.g. to get
# overrides like it wants), USERDISTRO must be reassigned with := first
USERDISTRO = "${DISTRO}"
include conf/build/${BUILD_SYS}.conf
include conf/target/${TARGET_SYS}.conf
include conf/machine/${MACHINE}.conf
include conf/distro/${DISTRO}.conf
include conf/documentation.conf
require conf/sanity.conf

So, variables defined in later files will take precedence.

The global variables defined by the conf files are then used by the
recipes (*.bb files) and bitbake.  The output of task-base is a ipk
file with dependencies.  A image recipe takes a bunch of ipk files to
create an image, and the dependencies defined in task-base define much
of what goes in the image.

Cliff

-- 
=======================
Cliff Brake
http://bec-systems.com




More information about the Openembedded-users mailing list