introduction.xml 14 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352
  1. <!DOCTYPE chapter PUBLIC "-//OASIS//DTD DocBook XML V4.2//EN"
  2. "http://www.oasis-open.org/docbook/xml/4.2/docbookx.dtd">
  3. <chapter id='intro'>
  4. <title>Introduction</title>
  5. <section id='intro-what-is'>
  6. <title>What is Poky?</title>
  7. <para>
  8. Poky is an open source platform build tool. It is a complete
  9. software development environment for the creation of Linux
  10. devices. It aids the design, development, building, debugging,
  11. simulation and testing of complete modern software stacks
  12. using Linux, the X Window System and GNOME Mobile
  13. based application frameworks. It is based on <ulink
  14. url='http://openembedded.org/'>OpenEmbedded</ulink> but has
  15. been customised with a particular focus.
  16. </para>
  17. <para> Poky was setup to:</para>
  18. <itemizedlist>
  19. <listitem>
  20. <para>Provide an open source Linux, X11, Matchbox, GTK+, Pimlico, Clutter, and other <ulink url='http://gnome.org/mobile'>GNOME Mobile</ulink> technologies based full platform build and development tool.</para>
  21. </listitem>
  22. <listitem>
  23. <para>Create a focused, stable, subset of OpenEmbedded that can be easily and reliably built and developed upon.</para>
  24. </listitem>
  25. <listitem>
  26. <para>Fully support a wide range of x86, ARM, MIPS, PowerPC hardware and device virtulisation</para>
  27. </listitem>
  28. </itemizedlist>
  29. <para>
  30. Poky is primarily a platform builder which generates filesystem images
  31. based on open source software such as the Kdrive X server, the Matchbox
  32. window manager, the GTK+ toolkit and the D-Bus message bus system. Images
  33. for many kinds of devices can be generated, however the standard example
  34. machines target QEMU full system emulation(x86, ARM, MIPS and PowerPC) and the ARM based
  35. Sharp Zaurus series of devices. Poky's ability to boot inside a QEMU
  36. emulator makes it particularly suitable as a test platform for development
  37. of embedded software.
  38. </para>
  39. <para>
  40. An important component integrated within Poky is Sato, a GNOME Mobile
  41. based user interface environment.
  42. It is designed to work well with screens at very high DPI and restricted
  43. size, such as those often found on smartphones and PDAs. It is coded with
  44. focus on efficiency and speed so that it works smoothly on hand-held and
  45. other embedded hardware. It will sit neatly on top of any device
  46. using the GNOME Mobile stack, providing a well defined user experience.
  47. </para>
  48. <screenshot>
  49. <mediaobject>
  50. <imageobject>
  51. <imagedata fileref="screenshots/ss-sato.png" format="PNG" align='center' scalefit='1' width="100%" contentdepth="100%"/>
  52. </imageobject>
  53. <caption>
  54. <para>The Sato Desktop - A screenshot from a machine running a Poky built image</para>
  55. </caption>
  56. </mediaobject>
  57. </screenshot>
  58. <para>
  59. Poky has a growing open source community and is also backed up by commercial organisations including <ulink url="http://www.intel.com/">Intel Corporation</ulink>.
  60. </para>
  61. </section>
  62. <section id='intro-manualoverview'>
  63. <title>Documentation Overview</title>
  64. <para>
  65. The handbook is split into sections covering different aspects of Poky.
  66. The <link linkend='usingpoky'>'Using Poky' section</link> gives an overview
  67. of the components that make up Poky followed by information about using and
  68. debugging the Poky build system. The <link linkend='extendpoky'>'Extending Poky' section</link>
  69. gives information about how to extend and customise Poky along with advice
  70. on how to manage these changes.
  71. The <link linkend='bsp'>'Board Support Packages (BSP) - Developers Guide' section</link>
  72. gives information about how to develop BSP such as the common layout, the
  73. software hardware configuration options etc.
  74. The <link linkend='platdev'>'Platform Development with Poky'
  75. section</link> gives information about interaction between Poky and target
  76. hardware for common platform development tasks such as software development,
  77. debugging and profiling. The rest of the manual
  78. consists of several reference sections each giving details on a specific
  79. section of Poky functionality.
  80. </para>
  81. <para>
  82. This manual applies to Poky Release 3.3 (Green).
  83. </para>
  84. </section>
  85. <section id='intro-requirements'>
  86. <title>System Requirements</title>
  87. <para>
  88. We recommend Debian-based distributions, in particular a recent Ubuntu
  89. release (10.04 or newer), as the host system for Poky. Nothing in Poky is
  90. distribution specific and
  91. other distributions will most likely work as long as the appropriate
  92. prerequisites are installed - we know of Poky being used successfully on Redhat,
  93. SUSE, Gentoo and Slackware host systems.
  94. </para>
  95. <para>On a Debian-based system, you need the following packages installed:</para>
  96. <itemizedlist>
  97. <listitem>
  98. <para>build-essential</para>
  99. </listitem>
  100. <listitem>
  101. <para>python (version 2.6 or later)</para>
  102. </listitem>
  103. <listitem>
  104. <para>diffstat</para>
  105. </listitem>
  106. <listitem>
  107. <para>texinfo</para>
  108. </listitem>
  109. <listitem>
  110. <para>texi2html</para>
  111. </listitem>
  112. <listitem>
  113. <para>cvs</para>
  114. </listitem>
  115. <listitem>
  116. <para>subversion</para>
  117. </listitem>
  118. <listitem>
  119. <para>wget</para>
  120. </listitem>
  121. <listitem>
  122. <para>gawk</para>
  123. </listitem>
  124. <listitem>
  125. <para>help2man</para>
  126. </listitem>
  127. <listitem>
  128. <para>chrpath</para>
  129. </listitem>
  130. <listitem>
  131. <para>mercurial</para>
  132. </listitem>
  133. </itemizedlist>
  134. <para>Furthermore if you wish to run an emulated Poky image using <ulink url='http://qemu.org'>QEMU</ulink> (as in the quickstart below) you will need the following packages installed:</para>
  135. <itemizedlist>
  136. <listitem>
  137. <para>libgl1-mesa-dev</para>
  138. </listitem>
  139. <listitem>
  140. <para>libglu1-mesa-dev</para>
  141. </listitem>
  142. <listitem>
  143. <para>libsdl1.2-dev</para>
  144. </listitem>
  145. <listitem>
  146. <para>bochsbios (only to run qemux86 images)</para>
  147. </listitem>
  148. </itemizedlist>
  149. <para>
  150. Debian users can add debian.o-hand.com to their APT sources (See
  151. <ulink url='http://debian.o-hand.com'/>
  152. for instructions on doing this) and then run <command>
  153. "apt-get install qemu poky-depends poky-scripts"</command> which will
  154. automatically install all these dependencies. Virtualisation images with
  155. Poky and all dependencies can also easily be built if required.
  156. </para>
  157. <para>
  158. Poky can use a system provided QEMU or build its own depending on how it's
  159. configured. See the options in <filename>local.conf</filename> for more details.
  160. </para>
  161. </section>
  162. <section id='intro-quickstart'>
  163. <title>Quick Start</title>
  164. <section id='intro-quickstart-build'>
  165. <title>Building and Running an Image</title>
  166. <para>
  167. If you want to try Poky, you can do so in a few commands. The example below
  168. checks out the Poky source code, sets up a build environment, builds an
  169. image and then runs that image under the QEMU emulator in x86 system emulation mode:
  170. </para>
  171. <para>
  172. <literallayout class='monospaced'>
  173. $ wget http://pokylinux.org/releases/poky-green-3.3.tar.bz2
  174. $ tar xjvf poky-green-3.3.tar.bz2
  175. $ cd green-3.3/
  176. $ source poky-init-build-env
  177. $ bitbake poky-image-sato
  178. $ bitbake qemu-native
  179. $ runqemu qemux86
  180. </literallayout>
  181. </para>
  182. <note>
  183. <para>
  184. This process will need Internet access, about 20 GB of disk space
  185. available, and you should expect the build to take about 4 - 5 hours since
  186. it is building an entire Linux system from source including the toolchain!
  187. </para>
  188. </note>
  189. <para>
  190. To build for other machines see the <glossterm><link
  191. linkend='var-MACHINE'>MACHINE</link></glossterm> variable in build/conf/local.conf.
  192. This file contains other useful configuration information and the default version
  193. has examples of common setup needs and is worth
  194. reading. To take advantage of multiple processor cores to speed up builds for example, set the
  195. <glossterm><link linkend='var-BB_NUMBER_THREADS'>BB_NUMBER_THREADS</link></glossterm>
  196. and <glossterm><link linkend='var-PARALLEL_MAKE'>PARALLEL_MAKE</link></glossterm> variables.
  197. The images/kernels built by Poky are placed in the <filename class="directory">tmp/deploy/images</filename>
  198. directory.
  199. </para>
  200. <para>
  201. You could also run <command>"poky-qemu zImage-qemuarm.bin poky-image-sato-qemuarm.ext2"
  202. </command> within the images directory if you have the poky-scripts Debian package
  203. installed from debian.o-hand.com. This allows the QEMU images to be used standalone
  204. outside the Poky build environment.
  205. </para>
  206. <para>
  207. To setup networking within QEMU see the <link linkend='usingpoky-install-qemu-networking'>
  208. QEMU/USB networking with IP masquerading</link> section.
  209. </para>
  210. </section>
  211. <section id='intro-quickstart-qemu'>
  212. <title>Downloading and Using Prebuilt Images</title>
  213. <para>
  214. Prebuilt images from Poky are also available if you just want to run the system
  215. under QEMU. To use these you need to:
  216. </para>
  217. <itemizedlist>
  218. <listitem>
  219. <para>
  220. Add debian.o-hand.com to your APT sources (See
  221. <ulink url='http://debian.o-hand.com'/> for instructions on doing this)
  222. </para>
  223. </listitem>
  224. <listitem>
  225. <para>Install patched QEMU and poky-scripts:</para>
  226. <para>
  227. <literallayout class='monospaced'>
  228. $ apt-get install qemu poky-scripts
  229. </literallayout>
  230. </para>
  231. </listitem>
  232. <listitem>
  233. <para>
  234. Download a Poky QEMU release kernel (*zImage*qemu*.bin) and compressed
  235. filesystem image (poky-image-*-qemu*.ext2.bz2) which
  236. you'll need to decompress with 'bzip2 -d'. These are available from the
  237. <ulink url='http://pokylinux.org/releases/green-3.3/'>last release</ulink>
  238. or from the <ulink url='http://autobuilder.pokylinux.org/'>autobuilder</ulink>.
  239. </para>
  240. </listitem>
  241. <listitem>
  242. <para>Start the image:</para>
  243. <para>
  244. <literallayout class='monospaced'>
  245. $ poky-qemu &lt;kernel&gt; &lt;image&gt;
  246. </literallayout>
  247. </para>
  248. </listitem>
  249. </itemizedlist>
  250. <note><para>
  251. A patched version of QEMU is required at present. A suitable version is available from
  252. <ulink url='http://debian.o-hand.com'/>, it can be built
  253. by poky (bitbake qemu-native) or can be downloaded/built as part of the toolchain/SDK tarballs.
  254. </para></note>
  255. </section>
  256. </section>
  257. <section id='intro-getit'>
  258. <title>Obtaining Poky</title>
  259. <section id='intro-getit-releases'>
  260. <title>Releases</title>
  261. <para>Periodically, we make releases of Poky and these are available
  262. at <ulink url='http://pokylinux.org/releases/'/>.
  263. These are more stable and tested than the nightly development images.</para>
  264. </section>
  265. <section id='intro-getit-nightly'>
  266. <title>Nightly Builds</title>
  267. <para>
  268. We make nightly builds of Poky for testing purposes and to make the
  269. latest developments available. The output from these builds is available
  270. at <ulink url='http://autobuilder.pokylinux.org/'/>
  271. where the numbers increase for each subsequent build and can be used to reference it.
  272. </para>
  273. <para>
  274. Automated builds are available for "standard" Poky and for Poky SDKs and toolchains as well
  275. as any testing versions we might have such as poky-bleeding. The toolchains can
  276. be used either as external standalone toolchains or can be combined with Poky as a
  277. prebuilt toolchain to reduce build time. Using the external toolchains is simply a
  278. case of untarring the tarball into the root of your system (it only creates files in
  279. <filename class="directory">/opt/poky</filename>) and then enabling the option
  280. in <filename>local.conf</filename>.
  281. </para>
  282. </section>
  283. <section id='intro-getit-dev'>
  284. <title>Development Checkouts</title>
  285. <para>
  286. Poky is available from our GIT repository located at
  287. git://git.pokylinux.org/poky.git; a web interface to the repository
  288. can be accessed at <ulink url='http://git.pokylinux.org/'/>.
  289. </para>
  290. <para>
  291. The 'master' is where the deveopment work takes place and you should use this if you're
  292. after to work with the latest cutting edge developments. It is possible trunk
  293. can suffer temporary periods of instability while new features are developed and
  294. if this is undesireable we recommend using one of the release branches.
  295. </para>
  296. </section>
  297. </section>
  298. </chapter>
  299. <!--
  300. vim: expandtab tw=80 ts=4
  301. -->