diff options
author | Richard Purdie <richard@openedhand.com> | 2007-04-11 11:21:34 +0000 |
---|---|---|
committer | Richard Purdie <richard@openedhand.com> | 2007-04-11 11:21:34 +0000 |
commit | 185a34e8e2fb68e83efe4547629af066d257d99a (patch) | |
tree | 47594055ae3c36605dbc8f9d532db6c4e1633772 /README.commands | |
parent | c917bf85ab4229246c87aef2cbd4669adb36fd92 (diff) | |
download | poky-185a34e8e2fb68e83efe4547629af066d257d99a.tar.gz |
Add README.commands
git-svn-id: https://svn.o-hand.com/repos/poky/trunk@1479 311d38ba-8fff-0310-9ca6-ca027cbcb966
Diffstat (limited to 'README.commands')
-rw-r--r-- | README.commands | 100 |
1 files changed, 100 insertions, 0 deletions
diff --git a/README.commands b/README.commands new file mode 100644 index 0000000000..2909061046 --- /dev/null +++ b/README.commands | |||
@@ -0,0 +1,100 @@ | |||
1 | Using Poky - Poky Commands | ||
2 | ========================== | ||
3 | |||
4 | Bitbake | ||
5 | ======= | ||
6 | |||
7 | Bitbake is the tool at the heart of poky and is responsible for parsing the | ||
8 | metadata, generating a list of tasks from it and then executing them. To see a | ||
9 | list of the options it supports look at "bitbake --help". | ||
10 | |||
11 | The most common usage is "bitbake <packagename>" where <packagename> is the name | ||
12 | of the package you wish to build. This often equates to the first part of a .bb | ||
13 | filename so to run the matchbox-desktop_1.2.3.bb file, you might type "bitbake | ||
14 | matchbox-desktop. Several different versions of matchbox-desktop might exist | ||
15 | and bitbake will choose the one selected by the distribution configuration. | ||
16 | Bitbake will also try to execute any dependent tasks first so before building | ||
17 | matchbox-desktop it would build a cross compiler and glibc if not already built. | ||
18 | |||
19 | |||
20 | Bitbake - Package Tasks | ||
21 | ======================= | ||
22 | |||
23 | Any given package consists of a set of tasks, in most cases the series is fetch, | ||
24 | unpack, patch, configure, compile, install, package, package_write and build. | ||
25 | The default task is "build" and any tasks this depends on are built first hence | ||
26 | the standard bitbake behaviour. There are some tasks such as devshell which are | ||
27 | not part of the default build chain. If you wish to run such a task you can use | ||
28 | the "-c" option to bitbake e.g. "bitbake matchbox-desktop -c devshell". | ||
29 | |||
30 | If you wish to rerun a task you can use the force option "-f". A typical usage | ||
31 | case might look like: | ||
32 | |||
33 | % bitbake matchbox-desktop | ||
34 | [change some source in the WORKDIR for example] | ||
35 | % bitbake matchbox-desktop -c compile -f | ||
36 | % bitbake matchbox-desktop | ||
37 | |||
38 | which would build matchbox-desktop, then recompile it. The final command reruns | ||
39 | all tasks after the compile (basically the packaging tasks) since bitbake will | ||
40 | notice the the compile has been rerun and hence the other tasks also need to run | ||
41 | again. | ||
42 | |||
43 | You can view a list of tasks in a given package by running the listtasks task | ||
44 | e.g. "bitbake matchbox-desktop -c listtasks". | ||
45 | |||
46 | |||
47 | Bitbake - Dependency Graphs | ||
48 | =========================== | ||
49 | |||
50 | Sometimes it can be hard to see why bitbake wants to build some other packages | ||
51 | before a given package you've specified. "bitbake matchbox-desktop -g" will | ||
52 | create a task-depends.dot file in the current directory. This shows which | ||
53 | packages and tasks depend on which other packages and tasks and it useful for | ||
54 | debugging purposes. | ||
55 | |||
56 | |||
57 | Bitbake - Advanced Usage | ||
58 | ======================== | ||
59 | |||
60 | Debug output from bitbake can be seen with the "-D" option and can sometimes | ||
61 | give more information about what bitbake is doing and/or why. Each -D options | ||
62 | increases the logging level, the most common usage being "-DDD". | ||
63 | |||
64 | If you really want to build a specific .bb file, you can use the form "bitbake | ||
65 | -b somepath/somefile.bb". Note that this will not check the dependencies so this | ||
66 | option should only be used when you know the dependencies already exist. You can | ||
67 | specify fragments of the filename and bitbake will see if it can find a unique | ||
68 | match. | ||
69 | |||
70 | The -e option will dump the resulting environment for either the configuration | ||
71 | (no package specified) or for a specific package when specified with the -b | ||
72 | option. | ||
73 | |||
74 | The -k option will cause bitbake to try and continue even if a task fails. It | ||
75 | can be useful for world or unattended builds. | ||
76 | |||
77 | The -s option lists all the versions of packages that bitbake will use. | ||
78 | |||
79 | |||
80 | QEMU | ||
81 | ==== | ||
82 | |||
83 | Running images built by poky under qemu is possible within the poky environment | ||
84 | through the "runqemu" command. It has the form: | ||
85 | |||
86 | runqemu MACHINE IMAGETYPE ZIMAGE IMAGEFILE | ||
87 | |||
88 | where: | ||
89 | |||
90 | MACHINE - the machine to emulate (qemux86, qemuarm, spitz, akita) | ||
91 | IMAGETYPE - the type of image to use (nfs or ext2) | ||
92 | ZIMAGE - location of the kernel binary to use | ||
93 | IMAGEFILE - location of the image file to use | ||
94 | (common options are in brackets) | ||
95 | |||
96 | MACHINE is mandatory, the others are optional. | ||
97 | |||
98 | This assumes a suitable qemu binary is available with support for a given | ||
99 | machine. For further information see scripts/poky-qemu.README. | ||
100 | |||