1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
|
<!DOCTYPE chapter PUBLIC "-//OASIS//DTD DocBook XML V4.2//EN"
"http://www.oasis-open.org/docbook/xml/4.2/docbookx.dtd"
[<!ENTITY % poky SYSTEM "../poky.ent"> %poky; ] >
<article id='intro'>
<imagedata fileref="figures/yocto-project-transp.png" width="6in" depth="1in" align="right" scale="25" />
<section id='fake-title'>
<title>Yocto Project Quick Start</title>
<para>Copyright © ©RIGHT_YEAR; Linux Foundation</para>
</section>
<section id='welcome'>
<title>Welcome!</title>
<para>
Welcome to the Yocto Project!
The Yocto Project is an open-source collaboration project focused on embedded Linux
developers.
Amongst other things, the Yocto Project uses the Poky build system to
construct complete Linux images.
</para>
<para>
This short document will give you some basic information about the environment and
let you experience it in its simplest form.
After reading this document, you will have a basic understanding of what the Yocto Project is
and how to use some of its core components.
This document steps you through a simple example showing you how to build a small image
and run it using the QEMU emulator.
</para>
<para>
For more detailed information on the Yocto Project, you should check out these resources:
<itemizedlist>
<listitem><para><emphasis>Website:</emphasis> The <ulink url='&YOCTO_HOME_URL;'>Yocto Project Website</ulink>
provides the latest builds, breaking news, full development documentation, and a rich Yocto
Project Development Community into which you can tap.
</para></listitem>
<listitem><para><emphasis>FAQs:</emphasis> Lists commonly asked Yocto Project questions and answers.
You can find two FAQs: <ulink url='&YOCTO_WIKI_URL;/wiki/FAQ'>Yocto Project FAQ</ulink> on
a wiki, and the
<ulink url='&YOCTO_DOCS_REF_URL;#faq'>FAQ</ulink> appendix in the
The Yocto Project Reference Manual.
</para></listitem>
<listitem><para><emphasis>Developer Screencast:</emphasis> The
<ulink url='http://vimeo.com/36450321'>Getting Started with the Yocto Project - New
Developer Screencast Tutorial</ulink> provides a 30-minute video for the user
new to the Yocto Project but familiar with Linux build systems.</para></listitem>
</itemizedlist>
</para>
<note>
Due to production processes, there could be differences between the Yocto Project
documentation bundled in the release tarball and the
<ulink url='&YOCTO_DOCS_QS_URL;'>
Yocto Project Quick Start</ulink> on
the <ulink url='&YOCTO_HOME_URL;'>Yocto Project</ulink> website.
For the latest version of this manual, see the manual on the website.
</note>
</section>
<section id='yp-intro'>
<title>Introducing the Yocto Project Development Environment</title>
<para>
The Yocto Project through the Poky build system provides an open source development
environment targeting the ARM, MIPS, PowerPC and x86 architectures for a variety of
platforms including x86-64 and emulated ones.
You can use components from the Yocto Project to design, develop, build, debug, simulate,
and test the complete software stack using Linux, the X Window System, GNOME Mobile-based
application frameworks, and Qt frameworks.
</para>
<para></para>
<para></para>
<mediaobject>
<imageobject>
<imagedata fileref="figures/yocto-environment.png"
format="PNG" align='center' scalefit='1' width="100%"/>
</imageobject>
<caption>
<para>The Yocto Project Development Environment</para>
</caption>
</mediaobject>
<para>
Here are some highlights for the Yocto Project:
</para>
<itemizedlist>
<listitem>
<para>Provides a recent Linux kernel along with a set of system commands and libraries suitable for the embedded environment.</para>
</listitem>
<listitem>
<para>Makes available system components such as X11, Matchbox, GTK+, Pimlico, Clutter,
GuPNP and Qt (among others) so you can create a richer user interface experience on
devices that use displays or have a GUI.
For devices that don't have a GUI or display, you simply would not employ these
components.</para>
</listitem>
<listitem>
<para>Creates a focused and stable core compatible with the OpenEmbedded
project with which you can easily and reliably build and develop.</para>
</listitem>
<listitem>
<para>Fully supports a wide range of hardware and device emulation through the QEMU
Emulator.</para>
</listitem>
</itemizedlist>
<para>
The Yocto Project can generate images for many kinds of devices.
However, the standard example machines target QEMU full-system emulation for x86, x86-64, ARM, MIPS,
and PPC-based architectures as well as specific hardware such as the
<trademark class='registered'>Intel</trademark> Desktop Board DH55TC.
Because an image developed with the Yocto Project can boot inside a QEMU emulator, the
development environment works nicely as a test platform for developing embedded software.
</para>
<para>
Another important Yocto Project feature is the Sato reference User Interface.
This optional GNOME mobile-based UI, which is intended for devices with
restricted screen sizes, sits neatly on top of a device using the
GNOME Mobile Stack and provides a well-defined user experience.
Implemented in its own layer, it makes it clear to developers how they can implement
their own user interface on top of Yocto Linux.
</para>
</section>
<section id='resources'>
<title>What You Need and How You Get It</title>
<para>
You need these things to develop in the Yocto Project environment:
</para>
<itemizedlist>
<listitem>
<para>A host system running a supported Linux distribution (i.e. recent releases of
Fedora, openSUSE, Debian, and Ubuntu).
If the host system supports multiple cores and threads, you can configure the
Yocto Project build system to decrease the time needed to build images
significantly.
</para>
</listitem>
<listitem>
<para>The right packages.</para>
</listitem>
<listitem>
<para>A release of Yocto Project.</para>
</listitem>
</itemizedlist>
<section id='the-linux-distro'>
<title>The Linux Distribution</title>
<para>
The Yocto Project team is continually verifying more and more Linux
distributions with each release.
In general, if you have the current release minus one of the following
distributions you should have no problems.
<itemizedlist>
<listitem><para>Ubuntu</para></listitem>
<listitem><para>Fedora</para></listitem>
<listitem><para>openSUSE</para></listitem>
</itemizedlist>
For a list of the distributions under validation and their status, see the
<ulink url='&YOCTO_WIKI_URL;/wiki/Distribution_Support'>Distribution
Support</ulink> wiki page.
<note>
For notes about using the Yocto Project on a RHEL 4-based host, see the
<ulink url='&YOCTO_WIKI_URL;/wiki/BuildingOnRHEL4'>BuildingOnRHEL4</ulink>
wiki page.
</note>
</para>
<para>
The build system should be able to run on any modern distribution with Python 2.6 or 2.7.
Earlier releases of Python are known to not work and the system does not support Python 3 at this time.
This document assumes you are running one of the previously noted distributions on your Linux-based
host systems.
</para>
<note><para>
If you attempt to use a distribution not in the above list, you may or may not have success - you
are venturing into untested territory.
Refer to
<ulink url='&OE_HOME_URL;/index.php?title=OEandYourDistro&action=historysubmit&diff=4309&okdid=4225'>OE and Your Distro</ulink> and
<ulink url='&OE_HOME_URL;/index.php?title=Required_software&action=historysubmit&diff=4311&oldid=4251'>Required Software</ulink>
for information for other distributions used with the OpenEmbedded project, which might be
a starting point for exploration.
If you go down this path, you should expect problems.
When you do, please go to <ulink url='&YOCTO_BUGZILLA_URL;'>Yocto Project Bugzilla</ulink>
and submit a bug.
We are interested in hearing about your experience.
</para></note>
</section>
<section id='packages'>
<title>The Packages</title>
<para>
Packages and package installation vary depending on your development system.
In general, you need to have root access and then install the required packages.
The next few sections show you how to get set up with the right packages for
Ubuntu, Fedora, and openSUSE.
</para>
<section id='ubuntu'>
<title>Ubuntu</title>
<para>
The packages you need for a supported Ubuntu distribution are shown in the following command:
</para>
<literallayout class='monospaced'>
$ sudo apt-get install sed wget cvs subversion git-core coreutils \
unzip texi2html texinfo libsdl1.2-dev docbook-utils fop gawk \
python-pysqlite2 diffstat help2man make gcc build-essential xsltproc \
g++ desktop-file-utils chrpath libgl1-mesa-dev libglu1-mesa-dev \
mercurial autoconf automake groff libtool xterm libxml-parser-perl
</literallayout>
</section>
<section id='fedora'>
<title>Fedora</title>
<para>
The packages you need for a supported Fedora distribution are shown in the following
commands:
</para>
<literallayout class='monospaced'>
$ sudo yum groupinstall "development tools"
$ sudo yum install python m4 make wget curl ftp hg tar bzip2 gzip \
unzip python-psyco perl texinfo texi2html diffstat openjade \
docbook-style-dsssl sed docbook-style-xsl docbook-dtds fop xsltproc \
docbook-utils sed bc eglibc-devel ccache pcre pcre-devel quilt \
groff linuxdoc-tools patch linuxdoc-tools cmake help2man \
perl-ExtUtils-MakeMaker tcl-devel gettext chrpath ncurses apr \
SDL-devel mesa-libGL-devel mesa-libGLU-devel gnome-doc-utils \
autoconf automake libtool xterm
</literallayout>
<note><para>
If you are using a Fedora version prior to version 15, you will need to take some
extra steps to enable <filename>sudo</filename>, or you will need to run
the commands as root user.
See the <ulink url='https://fedoraproject.org/wiki/Configuring_Sudo'>Configuring Sudo</ulink>
wiki page for details.
</para></note>
</section>
<section id='opensuse'>
<title>openSUSE</title>
<para>
The packages you need for a supported openSUSE distribution are shown in the following
command:
</para>
<literallayout class='monospaced'>
$ sudo zypper install python gcc gcc-c++ libtool fop \
subversion git chrpath automake make wget help2man xsltproc \
diffstat texinfo mercurial freeglut-devel libSDL-devel
</literallayout>
</section>
</section>
<section id='releases'>
<title>Yocto Project Release</title>
<para>
You can download the latest Yocto Project release by going to the
<ulink url="&YOCTO_HOME_URL;/download">Yocto Project Download page</ulink>.
Just go to the page and click the "Yocto Downloads" link found in the "Download"
navigation pane to the right to view all available Yocto Project releases.
Then, click the "Yocto Release" link for the release you want from the list to
begin the download.
Nightly and developmental builds are also maintained at
<ulink url="&YOCTO_AB_NIGHTLY_URL;"></ulink>.
However, for this document a released version of Yocto Project is used.
</para>
<para>
You can also get the Yocto Project files by setting up a Git repository on your host
development system.
Doing so allows you to contribute back to the project.
For information on how to get set up using this method, see the
"<ulink url='&YOCTO_DOCS_DEV_URL;#local-yp-release'>Yocto
Project Release</ulink>" item in
<ulink url='&YOCTO_DOCS_DEV_URL;'>The Yocto Project
Development Manual</ulink>.
</para>
</section>
</section>
<section id='test-run'>
<title>A Quick Test Run</title>
<para>
Now that you have your system requirements in order, you can give Yocto Project a try.
This section presents some steps that let you do the following:
</para>
<itemizedlist>
<listitem>
<para>Build an image and run it in the QEMU emulator</para>
</listitem>
<listitem>
<para>Use a pre-built image and run it in the QEMU emulator</para>
</listitem>
</itemizedlist>
<section id='building-image'>
<title>Building an Image</title>
<para>
In the development environment you will need to build an image whenever you change hardware
support, add or change system libraries, or add or change services that have dependencies.
</para>
<mediaobject>
<imageobject>
<imagedata fileref="figures/building-an-image.png" format="PNG" align='center' scalefit='1'/>
</imageobject>
<caption>
<para>Building an Image</para>
</caption>
</mediaobject>
<para>
Use the following commands to build your image.
The build process creates an entire Linux distribution, including the toolchain, from source.
</para>
<note><para>
The build process using Sato currently consumes
about 50GB of disk space.
To allow for variations in the build process and for future package expansion, we
recommend having at least 100GB of free disk space.
</para></note>
<note><para>
By default, the Yocto Project searches for source code using a pre-determined order
through a set of locations.
If you encounter problems with the Yocto Project finding and downloading source code, see
the FAQ entry "How does Poky obtain source code and will it work behind my
firewall or proxy server?" in
<ulink url='&YOCTO_DOCS_REF_URL;'>
The Yocto Project Reference Manual</ulink>.
</para></note>
<para>
<literallayout class='monospaced'>
$ wget &YOCTO_POKY_DL_URL;
$ tar xjf &YOCTO_POKY;.tar.bz2
$ source &OE_INIT_PATH; edison-6.0-build
</literallayout>
</para>
<tip><para>
To help conserve disk space during builds, you can add the following statement
to your project's configuration file, which for this example
is <filename>edison-6.0-build/conf/local.conf</filename>.
Adding this statement deletes the work directory used for building a package
once the package is built.
<literallayout class='monospaced'>
INHERIT += rm_work
</literallayout>
</para></tip>
<itemizedlist>
<listitem><para>In the previous example, the first command retrieves the Yocto Project
release tarball from the source repositories using the
<filename>wget</filename> command.
Alternatively, you can go to the
<ulink url='&YOCTO_HOME_URL;/download'>Yocto Project website</ulink>
Downloads page to retrieve the tarball.</para></listitem>
<listitem><para>The second command extracts the files from the tarball and places
them into a directory named <filename>poky-edison-6.0</filename> in the current
directory.</para></listitem>
<listitem><para>The third command runs the Yocto Project environment setup script.
Running this script defines Yocto Project build environment settings needed to
complete the build.
The script also creates the Yocto Project
build directory, which is <filename>edison-6.0-build</filename> in this case.
After the script runs, your current working directory is set
to the build directory.
Later, when the build completes, the build directory contains all the files
created during the build.
</para></listitem>
</itemizedlist>
<para>
Take some time to examine your <filename>local.conf</filename> file
in your project's configuration directory.
The defaults in that file should work fine.
However, there are some variables of interest at which you might look.
</para>
<para>
By default, the target architecture for the build is <filename>qemux86</filename>,
which produces an image that can be used in the QEMU emulator and is targeted at an
<trademark class='registered'>Intel</trademark> 32-bit based architecture.
To change this default, edit the value of the <filename>MACHINE</filename> variable
in the configuration file before launching the build.
</para>
<para>
Another couple of variables of interest are the
<ulink url='&YOCTO_DOCS_REF_URL;#var-BB_NUMBER_THREADS'><filename>BB_NUMBER_THREADS</filename></ulink> and the
<ulink url='&YOCTO_DOCS_REF_URL;#var-PARALLEL_MAKE'><filename>PARALLEL_MAKE</filename></ulink> variables.
By default, these variables are commented out.
However, if you have a multi-core CPU you might want to uncomment
the lines and set both variables equal to twice the number of your
host's processor cores.
Setting these variables can significantly shorten your build time.
</para>
<para>
Another consideration before you build is the package manager used when creating
the image.
By default, the Yocto Project build system uses the RPM package manager.
You can control this configuration by using the
<filename><ulink url='&YOCTO_DOCS_REF_URL;#var-PACKAGE_CLASSES'><filename>PACKAGE_CLASSES</filename></ulink></filename> variable.
For additional package manager selection information, see
"<ulink url='&YOCTO_DOCS_REF_URL;#ref-classes-package'>Packaging - <filename>package*.bbclass</filename></ulink>" in
<ulink url='&YOCTO_DOCS_REF_URL;'>
The Yocto Project Reference Manual</ulink>.
</para>
<para>
Continue with the following command to build an OS image for the target, which is
<filename>core-image-sato</filename> in this example.
For information on the <filename>-k</filename> option use the
<filename>bitbake --help</filename> command or see the
"<ulink url='&YOCTO_DOCS_REF_URL;#usingpoky-components-bitbake'>BitBake</ulink>" section in
<ulink url='&YOCTO_DOCS_REF_URL;'>The Yocto Project Reference Manual</ulink>.
<literallayout class='monospaced'>
$ bitbake -k core-image-sato
</literallayout>
<note><para>
BitBake requires Python 2.6 or 2.7. For more information on this requirement,
see the FAQ appendix in
<ulink url='&YOCTO_DOCS_REF_URL;'>
The Yocto Project Reference Manual</ulink>.
</para></note>
The final command runs the image:
<literallayout class='monospaced'>
$ runqemu qemux86
</literallayout>
<note><para>
Depending on the number of processors and cores, the amount or RAM, the speed of your
Internet connection and other factors, the build process could take several hours the first
time you run it.
Subsequent builds run much faster since parts of the build are cached.
</para></note>
</para>
</section>
<section id='using-pre-built'>
<title>Using Pre-Built Binaries and QEMU</title>
<para>
If hardware, libraries and services are stable, you can get started by using a pre-built binary
of the filesystem image, kernel, and toolchain and run it using the QEMU emulator.
This scenario is useful for developing application software.
</para>
<mediaobject>
<imageobject>
<imagedata fileref="figures/using-a-pre-built-image.png" format="PNG" align='center' scalefit='1'/>
</imageobject>
<caption>
<para>Using a Pre-Built Image</para>
</caption>
</mediaobject>
<para>
For this scenario, you need to do several things:
</para>
<itemizedlist>
<listitem><para>Install the stand-alone Yocto toolchain tarball.</para></listitem>
<listitem><para>Download the pre-built image that will boot with QEMU.
You need to be sure to get the QEMU image that matches your target machine’s
architecture (e.g. x86, ARM, etc.).</para></listitem>
<listitem><para>Download the filesystem image for your target machine's architecture.
</para></listitem>
<listitem><para>Set up the environment to emulate the hardware and then start the QEMU emulator.
</para></listitem>
</itemizedlist>
<section id='installing-the-toolchain'>
<title>Installing the Toolchain</title>
<para>
You can download the pre-built toolchain, which includes the <filename>runqemu</filename>
script and support files, from the appropriate directory under
<ulink url='&YOCTO_TOOLCHAIN_DL_URL;'></ulink>.
Toolchains are available for 32-bit and 64-bit development systems from the
<filename>i686</filename> and <filename>x86_64</filename> directories, respectively.
Each type of development system supports five target architectures.
The tarball files are named such that a string representing the host system appears
first in the filename and then is immediately followed by a string representing
the target architecture.
</para>
<literallayout class='monospaced'>
poky-eglibc<<emphasis>host_system</emphasis>>-<<emphasis>arch</emphasis>>-toolchain-gmae-<<emphasis>release</emphasis>>.tar.bz2
Where:
<<emphasis>host_system</emphasis>> is a string representing your development system:
i686 or x86_64.
<<emphasis>arch</emphasis>> is a string representing the target architecture:
i586, x86_64, powerpc, mips, or arm.
<<emphasis>release</emphasis>> is the version of Yocto Project.
</literallayout>
<para>
For example, the following toolchain tarball is for a 64-bit development
host system and a 32-bit target architecture:
</para>
<literallayout class='monospaced'>
poky-eglibc-x86_64-i586-toolchain-gmae-&DISTRO;.tar.bz2
</literallayout>
<para>
The toolchain tarballs are self-contained and must be installed into <filename>/opt/poky</filename>.
The following commands show how you install the toolchain tarball given a 64-bit development host system
and a 32-bit target architecture.
The example assumes the toolchain tarball is located in <filename>~/toolchains/</filename>:
</para>
<para>
<literallayout class='monospaced'>
$ cd /
$ sudo tar -xvjf ~/toolchains/poky-eglibc-x86_64-i586-toolchain-gmae-&DISTRO;.tar.bz2
</literallayout>
</para>
<para>
For more information on how to install tarballs, see the
"<ulink url='&YOCTO_DOCS_ADT_URL;#using-an-existing-toolchain-tarball'>Using a Cross-Toolchain Tarball</ulink>" and
"<ulink url='&YOCTO_DOCS_ADT_URL;#using-the-toolchain-from-within-the-build-tree'>Using BitBake and the Yocto Project Build Tree</ulink>" sections in
<ulink url='&YOCTO_DOCS_ADT_URL;'>The Yocto Project
Application Development Toolkit (ADT) User's Guide</ulink>.
</para>
</section>
<section id='downloading-the-pre-built-linux-kernel'>
<title>Downloading the Pre-Built Linux Kernel</title>
<para>
You can download the pre-built Linux kernel suitable for running in the QEMU emulator from
<ulink url='&YOCTO_QEMU_DL_URL;'></ulink>.
Be sure to use the kernel that matches the architecture you want to simulate.
Download areas exist for the five supported machine architectures:
<filename>qemuarm</filename>, <filename>qemumips</filename>, <filename>qemuppc</filename>,
<filename>qemux86</filename>, and <filename>qemux86_64</filename>.
</para>
<para>
Most kernel files have one of the following forms:
<literallayout class='monospaced'>
*zImage-qemu<<emphasis>arch</emphasis>>.bin
vmlinux-qemu<<emphasis>arch</emphasis>>.bin
Where:
<<emphasis>arch</emphasis>> is a string representing the target architecture:
x86, x86-64, ppc, mips, or arm.
</literallayout>
</para>
<para>
You can learn more about downloading a Yocto Project kernel in the
"<ulink url='&YOCTO_DOCS_DEV_URL;#local-kernel-files'>Linux Yocto Kernel</ulink>" section of
<ulink url='&YOCTO_DOCS_DEV_URL;'>The
Yocto Project Development Manual</ulink>.
</para>
</section>
<section id='downloading-the-filesystem'>
<title>Downloading the Filesystem</title>
<para>
You can also download the filesystem image suitable for your target architecture from
<ulink url='&YOCTO_QEMU_DL_URL;'></ulink>.
Again, be sure to use the filesystem that matches the architecture you want
to simulate.
</para>
<para>
The filesystem image has two tarball forms: <filename>ext3</filename> and
<filename>tar</filename>.
You must use the <filename>ext3</filename> form when booting an image using the
QEMU emulator.
The <filename>tar</filename> form can be flattened out in your host development system
and used for Yocto Project build purposes.
<literallayout class='monospaced'>
core-image-<<emphasis>profile</emphasis>>-qemu<<emphasis>arch</emphasis>>.ext3
core-image-<<emphasis>profile</emphasis>>-qemu<<emphasis>arch</emphasis>>.tar.bz2
Where:
<<emphasis>profile</emphasis>> is the filesystem image's profile:
lsb, lsb-dev, lsb-sdk, lsb-qt3, minimal, minimal-dev, sato, sato-dev, or sato-sdk.
For information on these types of image profiles, see
<ulink url='&YOCTO_DOCS_REF_URL;#ref-images'>Reference: Images</ulink> in the Yocto Project Reference Manual.
<<emphasis>arch</emphasis>> is a string representing the target architecture:
x86, x86-64, ppc, mips, or arm.
</literallayout>
</para>
</section>
<section id='setting-up-the-environment-and-starting-the-qemu-emulator'>
<title>Setting Up the Environment and Starting the QEMU Emulator</title>
<para>
Before you start the QEMU emulator, you need to set up the emulation environment.
The following command form sets up the emulation environment.
<literallayout class='monospaced'>
$ source &YOCTO_ADTPATH_DIR;/environment-setup-<<emphasis>arch</emphasis>>-poky-linux-<<emphasis>if</emphasis>>
Where:
<<emphasis>arch</emphasis>> is a string representing the target architecture:
i586, x86_64, ppc603e, mips, or armv5te.
<<emphasis>if</emphasis>> is a string representing an embedded application binary interface.
Not all setup scripts include this string.
</literallayout>
</para>
<para>
Finally, this command form invokes the QEMU emulator
<literallayout class='monospaced'>
$ runqemu <<emphasis>qemuarch</emphasis>> <<emphasis>kernel-image</emphasis>> <<emphasis>filesystem-image</emphasis>>
Where:
<<emphasis>qemuarch</emphasis>> is a string representing the target architecture: qemux86, qemux86-64,
qemuppc, qemumips, or qemuarm.
<<emphasis>kernel-image</emphasis>> is the architecture-specific kernel image.
<<emphasis>filesystem-image</emphasis>> is the .ext3 filesystem image.
</literallayout>
</para>
<para>
Continuing with the example, the following two commands setup the emulation
environment and launch QEMU.
This example assumes the root filesystem tarball has been downloaded and expanded, and
that the kernel and filesystem are for a 32-bit target architecture.
<literallayout class='monospaced'>
$ source &YOCTO_ADTPATH_DIR;/environment-setup-i686-poky-linux
$ runqemu qemux86 bzImage-3.0-qemux86-&DISTRO;.bin \
core-image-sato-qemux86.ext3
</literallayout>
</para>
<para>
The environment in which QEMU launches varies depending on the filesystem image and on the
target architecture.
For example, if you source the environment for the ARM target
architecture and then boot the minimal QEMU image, the emulator comes up in a new
shell in command-line mode.
However, if you boot the SDK image, QEMU comes up with a GUI.
<note>Booting the PPC image results in QEMU launching in the same shell in
command-line mode.</note>
</para>
</section>
</section>
</section>
</article>
<!--
vim: expandtab tw=80 ts=4
-->
|