diff options
author | Saul Wold <sgw@linux.intel.com> | 2017-09-26 08:25:37 -0700 |
---|---|---|
committer | Saul Wold <sgw@linux.intel.com> | 2017-09-26 08:25:37 -0700 |
commit | a98b71ccadc1458bf3a959e328d5ae814eb7e9b3 (patch) | |
tree | b493f2ce5b78a56a70e76435658e370d44b2eab8 /README | |
download | meta-dpdk-a98b71ccadc1458bf3a959e328d5ae814eb7e9b3.tar.gz |
Initial commit from meta-intel 2f1bcac3fb3b42602f689fb4a1092aa5f4cf0c8a
Diffstat (limited to 'README')
-rw-r--r-- | README | 481 |
1 files changed, 481 insertions, 0 deletions
@@ -0,0 +1,481 @@ | |||
1 | meta-intel | ||
2 | ========== | ||
3 | |||
4 | This README file contains information on building and booting | ||
5 | meta-intel BSP layers. Please see the corresponding sections below | ||
6 | for details. | ||
7 | |||
8 | |||
9 | Yocto Project Compatible | ||
10 | ======================== | ||
11 | |||
12 | The BSPs contained in this layer are compatible with the Yocto Project | ||
13 | as per the requirements listed here: | ||
14 | |||
15 | https://www.yoctoproject.org/webform/yocto-project-compatible-registration | ||
16 | |||
17 | |||
18 | Dependencies | ||
19 | ============ | ||
20 | |||
21 | This layer depends on: | ||
22 | |||
23 | URI: git://git.openembedded.org/bitbake | ||
24 | branch: 1.34 | ||
25 | |||
26 | URI: git://git.openembedded.org/openembedded-core | ||
27 | layers: meta | ||
28 | branch: rocko | ||
29 | |||
30 | |||
31 | Table of Contents | ||
32 | ================= | ||
33 | |||
34 | I. Overview | ||
35 | II. Building and booting meta-intel BSP layers | ||
36 | a. Building the intel-common and quark BSP layers | ||
37 | b. Booting the intel-common BSP images | ||
38 | c. Booting the intel-quark BSP image on a Galileo board | ||
39 | III. Technical Miscellany | ||
40 | Benefits of using meta-intel | ||
41 | The intel-common kernel package architecture | ||
42 | Intel-specific machine features | ||
43 | IV. Tested Hardware | ||
44 | V. Guidelines for submitting patches | ||
45 | |||
46 | |||
47 | I. Overview | ||
48 | =========== | ||
49 | |||
50 | This is the location for Intel-maintained BSPs. | ||
51 | |||
52 | For details on the intel-common and intel-quark BSPs, see the | ||
53 | information below. | ||
54 | |||
55 | For all others, please see the README files contained in the | ||
56 | individual BSP layers for BSP-specific information. | ||
57 | |||
58 | If you have problems with or questions about a particular BSP, please | ||
59 | contact the maintainer listed in the MAINTAINERS file directly (cc:ing | ||
60 | the Yocto mailing list puts it in the archive and helps other people | ||
61 | who might have the same questions in the future), but please try to do | ||
62 | the following first: | ||
63 | |||
64 | - look in the Yocto Project Bugzilla | ||
65 | (http://bugzilla.yoctoproject.org/) to see if a problem has | ||
66 | already been reported | ||
67 | |||
68 | - look through recent entries of the meta-intel | ||
69 | (https://lists.yoctoproject.org/pipermail/meta-intel/) and Yocto | ||
70 | (https://lists.yoctoproject.org/pipermail/yocto/) mailing list | ||
71 | archives to see if other people have run into similar problems or | ||
72 | had similar questions answered. | ||
73 | |||
74 | If you believe you have encountered a bug, you can open a new bug and | ||
75 | enter the details in the Yocto Project Bugzilla | ||
76 | (http://bugzilla.yoctoproject.org/). If you're relatively certain | ||
77 | that it's a bug against the BSP itself, please use the 'Yocto Project | ||
78 | Components: BSPs | meta-intel' category for the bug; otherwise, please | ||
79 | submit the bug against the most likely category for the problem - if | ||
80 | you're wrong, it's not a big deal and the bug will be recategorized | ||
81 | upon triage. | ||
82 | |||
83 | |||
84 | II. Building and booting meta-intel BSP layers | ||
85 | ============================================== | ||
86 | |||
87 | The following sections contain information on building and booting the | ||
88 | BSPs contained in the meta-intel layer. | ||
89 | |||
90 | Note that these instructions specifically cover the intel-common and | ||
91 | quark BSPs, which may or may not be applicable to other BSPs contained | ||
92 | in this layer - if a given BSP contains its own README, that version | ||
93 | should be used instead, and these instructions can be ignored. | ||
94 | |||
95 | a. Building the intel-common and quark BSP layers | ||
96 | ------------------------------------------------- | ||
97 | |||
98 | In order to build an image with BSP support for a given release, you | ||
99 | need to download the corresponding BSP tarball from the 'Board Support | ||
100 | Package (BSP) Downloads' page of the Yocto Project website (or | ||
101 | equivalently, check out the appropriate branch from the meta-intel git | ||
102 | repository, see below). For the intel-common and quark BSPs, those | ||
103 | tarballs would correspond to the following choices in the BSP | ||
104 | downloads section: | ||
105 | |||
106 | - Intel-core2-32 Intel® Common Core BSP (Intel-core2-32) | ||
107 | - Intel-core2-32 Intel® Common Core BSP (Intel-quark) | ||
108 | - Intel-corei7-64 Intel® Common Core BSP (Intel-corei7-64) | ||
109 | |||
110 | The intel-* BSPs, also known as the intel-common BSPs, provide a few | ||
111 | carefully selected tune options and generic hardware support to cover | ||
112 | the majority of current Intel CPUs and devices. The naming follows the | ||
113 | convention of intel-<TUNE>-<BITS>, where TUNE is the gcc cpu-type | ||
114 | (used with mtune and march typically) and BITS is either 32 bit or 64 | ||
115 | bit. | ||
116 | |||
117 | Having done that, and assuming you extracted the BSP tarball contents | ||
118 | at the top-level of your yocto build tree, you can build a BSP image | ||
119 | by adding the location of the meta-intel layer to bblayers.conf e.g.: | ||
120 | |||
121 | yocto/meta-intel \ | ||
122 | |||
123 | To enable a particular machine, you need to add a MACHINE line naming | ||
124 | the BSP to the local.conf file: | ||
125 | |||
126 | MACHINE ?= "xxx" | ||
127 | |||
128 | where 'xxx' is replaced by one of the following BSP names: | ||
129 | |||
130 | - intel-core2-32 | ||
131 | |||
132 | This BSP is optimized for the Core2 family of CPUs as well as all | ||
133 | Atom CPUs prior to the Silvermont core. | ||
134 | |||
135 | - intel-corei7-64 | ||
136 | |||
137 | This BSP is optimized for Nehalem and later Core and Xeon CPUs as | ||
138 | well as Silvermont and later Atom CPUs, such as the Baytrail SoCs. | ||
139 | |||
140 | - intel-quark | ||
141 | |||
142 | This BSP is optimized for Quark-based systems. | ||
143 | |||
144 | You should then be able to build an image as such: | ||
145 | |||
146 | $ source oe-init-build-env | ||
147 | $ bitbake core-image-sato | ||
148 | |||
149 | At the end of a successful build, you should have an image that | ||
150 | you can boot from a USB flash drive (see instructions on how to do | ||
151 | that below, in the section 'Booting the intel-common BSP images'). | ||
152 | |||
153 | As an alternative to downloading the BSP tarball, you can also work | ||
154 | directly from the meta-intel git repository. For each BSP in the | ||
155 | 'meta-intel' repository, there are multiple branches, one | ||
156 | corresponding to each major release starting with 'laverne' (0.90), in | ||
157 | addition to the latest code which tracks the current master (note that | ||
158 | not all BSPs are present in every release). Instead of extracting | ||
159 | a BSP tarball at the top level of your yocto build tree, you can | ||
160 | equivalently check out the appropriate branch from the meta-intel | ||
161 | repository at the same location. | ||
162 | |||
163 | b. Booting the intel-common BSP images | ||
164 | -------------------------------------- | ||
165 | |||
166 | If you downloaded the BSP tarball, you will find bootable images in | ||
167 | the /binary directory. If you've built your own image, either from | ||
168 | the downloaded BSP layer or from the meta-intel git repository, you'll | ||
169 | find the bootable image in the build/tmp/deploy/images/xxx directory, | ||
170 | where again 'xxx' refers to the machine name used in the build. | ||
171 | |||
172 | The BSP /binary directory or build contains bootable live images, | ||
173 | which can be used to directly boot Yocto off of a USB flash drive. | ||
174 | |||
175 | Under Linux, insert a USB flash drive. Assuming the USB flash drive | ||
176 | takes device /dev/sdf, use dd to copy the image to it. For example: | ||
177 | |||
178 | $ dd if=core-image-sato-intel-corei7-64.wic of=/dev/sdf | ||
179 | $ sync | ||
180 | $ eject /dev/sdf | ||
181 | |||
182 | This should give you a bootable USB flash device. Insert the device | ||
183 | into a bootable USB socket on the target, and power on. This should | ||
184 | result in a system booted to the Sato graphical desktop. | ||
185 | |||
186 | If you want a terminal, use the arrows at the top of the UI to move to | ||
187 | different pages of available applications, one of which is named | ||
188 | 'Terminal'. Clicking that should give you a root terminal. | ||
189 | |||
190 | If you want to ssh into the system, you can use the root terminal to | ||
191 | ifconfig the IP address and use that to ssh in. The root password is | ||
192 | empty, so to log in type 'root' for the user name and hit 'Enter' at | ||
193 | the Password prompt: and you should be in. | ||
194 | |||
195 | If you find you're getting corrupt images on the USB (it doesn't show | ||
196 | the syslinux boot: prompt, or the boot: prompt contains strange | ||
197 | characters), try doing this first: | ||
198 | |||
199 | $ dd if=/dev/zero of=/dev/sdf bs=1M count=512 | ||
200 | |||
201 | c. Booting the intel-quark BSP image on a Galileo board | ||
202 | ------------------------------------------------------- | ||
203 | |||
204 | If you downloaded the BSP tarball, you will find bootable images in | ||
205 | the /binary directory. If you've built your own image, either from | ||
206 | the downloaded BSP layer or from the meta-intel git repository, you'll | ||
207 | find the bootable image in the build/tmp/deploy/images/xxx directory, | ||
208 | where again 'xxx' refers to the machine name used in the build. | ||
209 | |||
210 | The Galileo board can boot off of either an SD card or USB storage | ||
211 | media that has a special disk layout. The 'wic' tool can be used to | ||
212 | create directly bootable images for either of the two formats via the | ||
213 | following steps. As of meta-intel 6.0-morty-2.2 or newer, wic images are | ||
214 | created automatically during build time, and the manual use of wic is | ||
215 | not necessary. By default, the galileodisk-sd wic kickstart file is used, | ||
216 | which targets SD cards. This can be changed by setting the WKS_FILE to | ||
217 | something else in local.conf, such as the following: | ||
218 | |||
219 | WKS_FILE = “galileodisk-usb” | ||
220 | |||
221 | If your build is successful, a .wic image will be created in the usual | ||
222 | deploy directory. Write this image to an SD card: | ||
223 | |||
224 | $ sudo dd if=/path/to/image/image-name.wic of=/dev/your_sd_dev | ||
225 | $ sync | ||
226 | $ sudo eject /dev/your_sd_dev | ||
227 | |||
228 | Insert the SD card into the Galileo and power on. | ||
229 | |||
230 | The Galileo board can boot from an hddimg formatted USB drive as well, | ||
231 | but currently only live-boot, and not installation, is supported. | ||
232 | An image in hddimg format is generated when you build the quark BSP. | ||
233 | You can follow the procedure in II.b to use dd command to prepare your USB | ||
234 | drive, then press F7 key during startup to bring up the boot option menu. | ||
235 | Choose the UEFI USB boot option for the drive to boot the system. If the board | ||
236 | already passes this stage and show a grub boot menu, you can press 'c' | ||
237 | key and then type "quit" in grub shell. The board should come back to | ||
238 | the UEFI boot menu. | ||
239 | |||
240 | III. Technical Miscellany | ||
241 | ========================= | ||
242 | |||
243 | Benefits of using meta-intel | ||
244 | ---------------------------- | ||
245 | |||
246 | Using meta-intel has the following benefits over a generic BSP: | ||
247 | |||
248 | tune flags | ||
249 | ++++++++++ | ||
250 | intel-* MACHINEs each have different compilation flags appropriate for their | ||
251 | targeted hardware sets. intel-corei7-64 has tune flags appropriate for modern | ||
252 | 64-bit Intel Core i microarchitecture, and includes instruction sets up to | ||
253 | SSE4.2. intel-core2-32 has tune flags appropriate for legacy 32-bit Intel Core2 | ||
254 | microarchitecture, and includes instruction sets up to SSE3. intel-quark | ||
255 | contains a subset of the intel-core2-32 instruction set, as quark does not | ||
256 | support prefix locking instructions. | ||
257 | |||
258 | linux-intel kernel | ||
259 | ++++++++++++++++++ | ||
260 | The linux-intel kernel is an initiative to bring better Intel(R) hardware | ||
261 | support to the current LTS linux kernel. It contains a base LTS kernel with | ||
262 | additional backports from upstream Intel drivers. In addition, a default kernel | ||
263 | config containing most features found on Intel boards is supplied via the | ||
264 | yocto-kernel-cache. | ||
265 | |||
266 | graphics stack | ||
267 | ++++++++++++++ | ||
268 | Meta-intel provides the latest Intel Graphics Linux Stack drivers to support | ||
269 | Intel hardware as defined by the https://01.org/linuxgraphics. | ||
270 | |||
271 | Other software | ||
272 | ++++++++++++++ | ||
273 | * intel ucode - provides the latest microcode updates for Intel processors | ||
274 | |||
275 | * thermald - which proactively controls thermal, using P-states, T-states, and | ||
276 | the Intel power clamp driver. | ||
277 | (https://01.org/linux-thermal-daemon/documentation/introduction-thermal-daemon) | ||
278 | |||
279 | * RMC - Runtime Machine Configuration, which allows the bootload to determine | ||
280 | board and CPU information in order to set specific kernel command line | ||
281 | information at startup. | ||
282 | |||
283 | The intel-common kernel package architecture | ||
284 | -------------------------------------------- | ||
285 | |||
286 | These BSPs use what we call the intel-common Linux kernel package | ||
287 | architecture. This includes core2-32-intel-common and | ||
288 | corei7-64-intel-common. These kernel packages can also be used by any | ||
289 | of the BSPs in meta-intel that choose to include the | ||
290 | intel-common-pkgarch.inc file. | ||
291 | |||
292 | To minimize the proliferation of vendor trees, reduce the sources we | ||
293 | must support, and consolidate QA efforts, all BSP maintainers are | ||
294 | encouraged to make use of the intel-common Linux kernel package | ||
295 | architecture. | ||
296 | |||
297 | Intel-specific machine features | ||
298 | ------------------------------- | ||
299 | |||
300 | The meta-intel layer makes some additional machine features available | ||
301 | to BSPs. These machine features can be used in a BSP layer in the | ||
302 | same way that machine features are used in other layers based on | ||
303 | oe-core, via the MACHINE_FEATURES variable. | ||
304 | |||
305 | Requirements | ||
306 | ++++++++++++ | ||
307 | |||
308 | The meta-intel-specific machine features are only available to a BSP | ||
309 | when the meta-intel layer is included in the build configuration, and | ||
310 | the meta-intel.inc file is included in the machine configuration of | ||
311 | that BSP. | ||
312 | |||
313 | To make these features available for your machine, you will need to: | ||
314 | |||
315 | 1. include a configuration line such as the below in bblayers.conf | ||
316 | BBLAYERS += "<local path>/meta-intel" | ||
317 | 2. include the following line in the machine configuration file | ||
318 | require conf/machine/include/meta-intel.inc | ||
319 | |||
320 | Once the above requirements are met, the machine features provided by | ||
321 | the meta-intel layer will be available for the BSP to use. | ||
322 | |||
323 | Available machine features | ||
324 | ++++++++++++++++++++++++++ | ||
325 | |||
326 | Currently, the meta-intel layer makes the following set of | ||
327 | Intel-specific machine features available: | ||
328 | |||
329 | * intel-ucode | ||
330 | |||
331 | These machine features can be included by listing them in the | ||
332 | MACHINE_FEATURES variable in the machine configuration file. For | ||
333 | example: | ||
334 | |||
335 | MACHINE_FEATURES += "intel-ucode" | ||
336 | |||
337 | Machine feature details | ||
338 | +++++++++++++++++++++++ | ||
339 | |||
340 | * intel-ucode | ||
341 | |||
342 | This feature provides support for microcode updates to Intel | ||
343 | processors. The intel-ucode feature runs at early boot and uses | ||
344 | the microcode data file added by the feature into the BSP's | ||
345 | initrd. It also puts the userland microcode-updating tool, | ||
346 | iucode_tool, into the target images along with the microcode data | ||
347 | file. | ||
348 | |||
349 | Q. Why might a user want to enable the intel-ucode feature? | ||
350 | |||
351 | A. Intel releases microcode updates to correct processor behavior | ||
352 | as documented in the respective processor specification | ||
353 | updates. While the normal approach to getting such microcode | ||
354 | updates is via a BIOS upgrade, this can be an administrative | ||
355 | hassle and not always possible in the field. The intel-ucode | ||
356 | feature enables the microcode update capability present in the | ||
357 | Linux kernel. It provides an easy path for upgrading processor | ||
358 | microcode without the need to change the BIOS. If the feature | ||
359 | is enabled, it is also possible to update the existing target | ||
360 | images with a newer microcode update in the future. | ||
361 | |||
362 | Q. How would a user bundle only target-specific microcode in the | ||
363 | target image? | ||
364 | |||
365 | A. The Intel microcode data file released by Intel contains | ||
366 | microcode updates for multiple processors. If the BSP image is | ||
367 | meant to run on only a certain subset of processor types, a | ||
368 | processor-specific subset of microcode can be bundled into the | ||
369 | target image via the UCODE_FILTER_PARAMETERS variable. This | ||
370 | works by listing a sequence of iucode-tool parameters in the | ||
371 | UCODE_FILTER_PARAMETERS variable, which in this case will | ||
372 | select only the specific microcode relevant to the BSP. For | ||
373 | more information on the underlying parameters refer to the | ||
374 | iucode-tool manual page at http://manned.org/iucode-tool | ||
375 | |||
376 | To define a set of parameters for microcode-filtering via the | ||
377 | UCODE_FILTER_PARAMETERS variable, one needs to identify the | ||
378 | cpuid signatures of all the processors the BSP is meant to run | ||
379 | on. One way to determine the cpuid signature for a specific | ||
380 | processor is to build and run an intel-ucode-feature-enabled | ||
381 | image on the target hardware, without first assigning any value | ||
382 | to the UCODE_FILTER_PARAMETERS variable, and then once the | ||
383 | image is booted, run the "ucode_tool -S" command to have the | ||
384 | ucode tool scan the system for processor signatures. These | ||
385 | signatures can then be used in the UCODE_FILTER_PARAMETERS | ||
386 | variable in conjunction with -s parameter. For example, for | ||
387 | the fri2 BSP, the cpuid can be determined as such: | ||
388 | |||
389 | [root@fri2 ~]# iucode_tool -S | ||
390 | iucode_tool: system has processor(s) with signature 0x00020661 | ||
391 | |||
392 | Given that output, a suitable UCODE_FILTER_PARAMETERS variable | ||
393 | definition could be specified in the machine configuration as | ||
394 | such: | ||
395 | |||
396 | UCODE_FILTER_PARAMETERS = "-s 0x00020661" | ||
397 | |||
398 | Q. Are there any reasons a user might want to disable the | ||
399 | intel-ucode feature? | ||
400 | |||
401 | A. The microcode data file and associated tools occupy a small | ||
402 | amount of space (a few KB) on the target image. BSPs which are | ||
403 | highly sensitive to target image size and which are not | ||
404 | experiencing microcode-related issues might consider not | ||
405 | enabling this feature. | ||
406 | |||
407 | |||
408 | IV. Tested Hardware | ||
409 | =================== | ||
410 | |||
411 | The following undergo regular basic testing with their respective MACHINE types. | ||
412 | Note that both 64-bit and 32-bit firmware is available for the MinnowBoard | ||
413 | Turbot, so it is tested against both intel-corei7-64 and intel-core2-32. | ||
414 | |||
415 | intel-corei7-64: | ||
416 | NUC6i5SYH | ||
417 | MinnowBoard Turbot | ||
418 | Braswell RVP | ||
419 | |||
420 | intel-core2-32: | ||
421 | MinnowBoard Turbot | ||
422 | |||
423 | Intel-quark: | ||
424 | Galileo 2 | ||
425 | |||
426 | |||
427 | V. Guidelines for submitting patches | ||
428 | ==================================== | ||
429 | |||
430 | Please submit any patches against meta-intel BSPs to the meta-intel | ||
431 | mailing list (meta-intel@yoctoproject.org). Also, if your patches are | ||
432 | available via a public git repository, please also include a URL to | ||
433 | the repo and branch containing your patches as that makes it easier | ||
434 | for maintainers to grab and test your patches. | ||
435 | |||
436 | There are patch submission scripts available that will, among other | ||
437 | things, automatically include the repo URL and branch as mentioned. | ||
438 | Please see the Yocto Project Development Manual sections entitled | ||
439 | 'Using Scripts to Push a Change Upstream and Request a Pull' and | ||
440 | 'Using Email to Submit a Patch' for details. | ||
441 | |||
442 | Regardless of how you submit a patch or patchset, the patches should | ||
443 | at minimum follow the suggestions outlined in the 'Submitting a Change | ||
444 | to the Yocto Project' section in the Yocto Project Development Manual. | ||
445 | Specifically, they should: | ||
446 | |||
447 | - Include a 'Signed-off-by:' line. A commit can't legally be pulled | ||
448 | in without this. | ||
449 | |||
450 | - Provide a single-line, short summary of the change. This short | ||
451 | description should be prefixed by the BSP or recipe name, as | ||
452 | appropriate, followed by a colon. Capitalize the first character | ||
453 | of the summary (following the colon). | ||
454 | |||
455 | - For the body of the commit message, provide detailed information | ||
456 | that describes what you changed, why you made the change, and the | ||
457 | approach you used. | ||
458 | |||
459 | - If the change addresses a specific bug or issue that is associated | ||
460 | with a bug-tracking ID, include a reference to that ID in your | ||
461 | detailed description in the following format: [YOCTO #<bug-id>]. | ||
462 | |||
463 | - Pay attention to line length - please don't allow any particular | ||
464 | line in the commit message to stretch past 72 characters. | ||
465 | |||
466 | - For any non-trivial patch, provide information about how you | ||
467 | tested the patch, and for any non-trivial or non-obvious testing | ||
468 | setup, provide details of that setup. | ||
469 | |||
470 | Doing a quick 'git log' in meta-intel will provide you with many | ||
471 | examples of good example commits if you have questions about any | ||
472 | aspect of the preferred format. | ||
473 | |||
474 | The meta-intel maintainers will do their best to review and/or pull in | ||
475 | a patch or patchset within 24 hours of the time it was posted. For | ||
476 | larger and/or more involved patches and patchsets, the review process | ||
477 | may take longer. | ||
478 | |||
479 | Please see the meta-intel/MAINTAINERS file for the list of maintainers | ||
480 | and their specific areas; it's also a good idea to cc: the specific | ||
481 | maintainer, if applicable. | ||