README.commands 4.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106
  1. Using Poky - Poky Commands
  2. ==========================
  3. Bitbake
  4. =======
  5. Bitbake is the tool at the heart of poky and is responsible for parsing the
  6. metadata, generating a list of tasks from it and then executing them. To see a
  7. list of the options it supports look at "bitbake --help".
  8. The most common usage is "bitbake <packagename>" where <packagename> is the name
  9. of the package you wish to build. This often equates to the first part of a .bb
  10. filename so to run the matchbox-desktop_1.2.3.bb file, you might type "bitbake
  11. matchbox-desktop. Several different versions of matchbox-desktop might exist
  12. and bitbake will choose the one selected by the distribution configuration.
  13. Bitbake will also try to execute any dependent tasks first so before building
  14. matchbox-desktop it would build a cross compiler and glibc if not already built.
  15. Bitbake - Package Tasks
  16. =======================
  17. Any given package consists of a set of tasks, in most cases the series is fetch,
  18. unpack, patch, configure, compile, install, package, package_write and build.
  19. The default task is "build" and any tasks this depends on are built first hence
  20. the standard bitbake behaviour. There are some tasks such as devshell which are
  21. not part of the default build chain. If you wish to run such a task you can use
  22. the "-c" option to bitbake e.g. "bitbake matchbox-desktop -c devshell".
  23. If you wish to rerun a task you can use the force option "-f". A typical usage
  24. case might look like:
  25. % bitbake matchbox-desktop
  26. [change some source in the WORKDIR for example]
  27. % bitbake matchbox-desktop -c compile -f
  28. % bitbake matchbox-desktop
  29. which would build matchbox-desktop, then recompile it. The final command reruns
  30. all tasks after the compile (basically the packaging tasks) since bitbake will
  31. notice the the compile has been rerun and hence the other tasks also need to run
  32. again.
  33. You can view a list of tasks in a given package by running the listtasks task
  34. e.g. "bitbake matchbox-desktop -c listtasks".
  35. Bitbake - Dependency Graphs
  36. ===========================
  37. Sometimes it can be hard to see why bitbake wants to build some other packages
  38. before a given package you've specified. "bitbake matchbox-desktop -g" will
  39. create a task-depends.dot file in the current directory. This shows which
  40. packages and tasks depend on which other packages and tasks and it useful for
  41. debugging purposes.
  42. Bitbake - Advanced Usage
  43. ========================
  44. Debug output from bitbake can be seen with the "-D" option and can sometimes
  45. give more information about what bitbake is doing and/or why. Each -D options
  46. increases the logging level, the most common usage being "-DDD".
  47. If you really want to build a specific .bb file, you can use the form "bitbake
  48. -b somepath/somefile.bb". Note that this will not check the dependencies so this
  49. option should only be used when you know the dependencies already exist. You can
  50. specify fragments of the filename and bitbake will see if it can find a unique
  51. match.
  52. The -e option will dump the resulting environment for either the configuration
  53. (no package specified) or for a specific package when specified with the -b
  54. option.
  55. The -k option will cause bitbake to try and continue even if a task fails. It
  56. can be useful for world or unattended builds.
  57. The -s option lists all the versions of packages that bitbake will use.
  58. Bitbake - More Information
  59. ==========================
  60. See the bitbake user manual at: http://bitbake.berlios.de/manual/
  61. QEMU
  62. ====
  63. Running images built by poky under qemu is possible within the poky environment
  64. through the "runqemu" command. It has the form:
  65. runqemu MACHINE IMAGETYPE ZIMAGE IMAGEFILE
  66. where:
  67. MACHINE - the machine to emulate (qemux86, qemuarm, spitz, akita)
  68. IMAGETYPE - the type of image to use (nfs or ext2)
  69. ZIMAGE - location of the kernel binary to use
  70. IMAGEFILE - location of the image file to use
  71. (common options are in brackets)
  72. MACHINE is mandatory, the others are optional.
  73. This assumes a suitable qemu binary is available with support for a given
  74. machine. For further information see scripts/poky-qemu.README.
  75. Copyright (C) 2006-2007 OpenedHand Ltd.