Download OpenEmbedded User Manual
Transcript
Chapter 7. Using bitbake and OpenEmbedded 7.3.1. work directory (tmp/work) The work directory is where all source code is unpacked into, where source is configured, compiled and packaged. In other words this is where all the action happens. Each bitbake recipe will produce a corresponding subdirectory in the work directory. The subdirectory name will contain the recipe name, version and the release number (as defined by the PR variable within the recipe). Here’s an example of a few of the subdirectories under the work directory: $ find tmp/work -maxdepth 1 -type d | head -4 tmp/work tmp/work/busybox-1.2.1-r13 tmp/work/libice-1_1.0.3-r0 tmp/work/arpwatch-2.1a15-r2 You can see the first three (of several hundred) recipes here and they are for release 13 of busybox 1.2.1, release 0 of libice 1.1.0.3 and release 2 of arpwatch 2.1a15. It’s also possible that you may just have a sub directory for your targets architecture and operating system in which case these directories will be in that additional subdirectory, as shown here: $ find tmp/work -maxdepth 2 -type d | head -4 tmp/work tmp/work/sh4-linux tmp/work/sh4-linux/busybox-1.2.1-r13 tmp/work/sh4-linux/libice-1_1.0.3-r0 tmp/work/sh4-linux/arpwatch-2.1a15-r2 The sh4-linux directory in the above example is a combination of the target architecture (sh4) and operating system (linux). This subdirectory has been added by the use of one of OpenEmbedded’s many features. In this case it’s the multimachine feature which is used to allow builds for multiple targets within the one work directory and can be enabled on a per distribution basis. This feature enables the sharing of native and architecture neutral packages and building for multiple targets that support the same architecture but require different linux kernels (for example). We’ll assume multimachine isn’t being used for the rest of this chapter, just remember to add the extra directory if your distribution is using it. Using lzo 1.08 as an example we’ll examine the contents of the working directory for a typical recipe: $ find tmp/work/lzo-1.08-r14 -maxdepth 1 tmp/work/lzo-1.08-r14 tmp/work/lzo-1.08-r14/temp tmp/work/lzo-1.08-r14/lzo-1.08 tmp/work/lzo-1.08-r14/install tmp/work/lzo-1.08-r14/image 27