diff options
author | Scott Rifenbark <srifenbark@gmail.com> | 2017-09-28 15:07:12 -0700 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2017-10-06 12:06:33 +0100 |
commit | 429719213d9a6d9b825165b57d0b0ce0641564b5 (patch) | |
tree | c5c73f021f2d71836cc95d7e35de56d6368c6a0a /documentation/kernel-dev/kernel-dev-advanced.xml | |
parent | 8dc04d54e00b1841e7116edfc3255528ae706ddd (diff) | |
download | poky-429719213d9a6d9b825165b57d0b0ce0641564b5.tar.gz |
kernel-dev: Updates to "Kernel Metadata Syntax" section
Scrubbed this section to bring it up to speed with more modern
BSP examples and better explanation of the types of Metadata
used.
(From yocto-docs rev: ba009de68a3786f83d9c3c9debffa8b811479786)
Signed-off-by: Scott Rifenbark <srifenbark@gmail.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'documentation/kernel-dev/kernel-dev-advanced.xml')
-rw-r--r-- | documentation/kernel-dev/kernel-dev-advanced.xml | 323 |
1 files changed, 219 insertions, 104 deletions
diff --git a/documentation/kernel-dev/kernel-dev-advanced.xml b/documentation/kernel-dev/kernel-dev-advanced.xml index 6618a7c906..380200a633 100644 --- a/documentation/kernel-dev/kernel-dev-advanced.xml +++ b/documentation/kernel-dev/kernel-dev-advanced.xml | |||
@@ -273,11 +273,13 @@ | |||
273 | 273 | ||
274 | <para> | 274 | <para> |
275 | Paths used in kernel Metadata files are relative to | 275 | Paths used in kernel Metadata files are relative to |
276 | <filename><base></filename>, which is either | 276 | <replaceable>base</replaceable>, which is either |
277 | <ulink url='&YOCTO_DOCS_REF_URL;#var-FILESEXTRAPATHS'><filename>FILESEXTRAPATHS</filename></ulink> | 277 | <ulink url='&YOCTO_DOCS_REF_URL;#var-FILESEXTRAPATHS'><filename>FILESEXTRAPATHS</filename></ulink> |
278 | if you are creating Metadata in | 278 | if you are creating Metadata in |
279 | <link linkend='recipe-space-metadata'>recipe-space</link>, | 279 | <link linkend='recipe-space-metadata'>recipe-space</link>, |
280 | or <filename>yocto-kernel-cache/cfg</filename> if you are creating | 280 | or the top level of |
281 | <ulink url='&YOCTO_GIT_URL;/cgit/cgit.cgi/yocto-kernel-cache/tree/'><filename>yocto-kernel-cache</filename></ulink> | ||
282 | if you are creating | ||
281 | <link linkend='metadata-outside-the-recipe-space'>Metadata outside of the recipe-space</link>. | 283 | <link linkend='metadata-outside-the-recipe-space'>Metadata outside of the recipe-space</link>. |
282 | </para> | 284 | </para> |
283 | 285 | ||
@@ -294,12 +296,18 @@ | |||
294 | </para> | 296 | </para> |
295 | 297 | ||
296 | <para> | 298 | <para> |
297 | The Symmetric Multi-Processing (SMP) fragment included in the | 299 | As an example, consider the Symmetric Multi-Processing (SMP) |
298 | <filename>linux-yocto-3.19</filename> Git repository | 300 | fragment used with the <filename>linux-yocto-4.12</filename> |
299 | consists of the following two files: | 301 | kernel as defined outside of the recipe space (i.e. |
302 | <filename>yocto-kernel-cache</filename>). | ||
303 | This Metadata consists of two files: <filename>smp.scc</filename> | ||
304 | and <filename>smp.cfg</filename>. | ||
305 | You can find these files in the <filename>cfg</filename> directory | ||
306 | of the <filename>yocto-4.12</filename> branch in the | ||
307 | <filename>yocto-kernel-cache</filename> Git repository: | ||
300 | <literallayout class='monospaced'> | 308 | <literallayout class='monospaced'> |
301 | cfg/smp.scc: | 309 | cfg/smp.scc: |
302 | define KFEATURE_DESCRIPTION "Enable SMP" | 310 | define KFEATURE_DESCRIPTION "Enable SMP for 32 bit builds" |
303 | define KFEATURE_COMPATIBILITY all | 311 | define KFEATURE_COMPATIBILITY all |
304 | 312 | ||
305 | kconf hardware smp.cfg | 313 | kconf hardware smp.cfg |
@@ -310,20 +318,27 @@ | |||
310 | # Increase default NR_CPUS from 8 to 64 so that platform with | 318 | # Increase default NR_CPUS from 8 to 64 so that platform with |
311 | # more than 8 processors can be all activated at boot time | 319 | # more than 8 processors can be all activated at boot time |
312 | CONFIG_NR_CPUS=64 | 320 | CONFIG_NR_CPUS=64 |
321 | # The following is nedded when setting NR_CPUS to something | ||
322 | # greater than 8 on x86 architectures, it should be automatically | ||
323 | # disregarded by Kconfig when using a different arch | ||
324 | CONFIG_X86_BIGSMP=y | ||
313 | </literallayout> | 325 | </literallayout> |
314 | You can find information on configuration fragment files in the | 326 | You can find general information on configuration fragment files in |
327 | the | ||
315 | "<link linkend='creating-config-fragments'>Creating Configuration Fragments</link>" | 328 | "<link linkend='creating-config-fragments'>Creating Configuration Fragments</link>" |
316 | section. | 329 | section. |
317 | </para> | 330 | </para> |
318 | 331 | ||
319 | <para> | 332 | <para> |
333 | Within the <filename>smp.scc</filename> file, the | ||
320 | <ulink url='&YOCTO_DOCS_REF_URL;#var-KFEATURE_DESCRIPTION'><filename>KFEATURE_DESCRIPTION</filename></ulink> | 334 | <ulink url='&YOCTO_DOCS_REF_URL;#var-KFEATURE_DESCRIPTION'><filename>KFEATURE_DESCRIPTION</filename></ulink> |
321 | provides a short description of the fragment. | 335 | statement provides a short description of the fragment. |
322 | Higher level kernel tools use this description. | 336 | Higher level kernel tools use this description. |
323 | </para> | 337 | </para> |
324 | 338 | ||
325 | <para> | 339 | <para> |
326 | The <filename>kconf</filename> command is used to include the | 340 | Also within the <filename>smp.scc</filename> file, the |
341 | <filename>kconf</filename> command includes the | ||
327 | actual configuration fragment in an <filename>.scc</filename> | 342 | actual configuration fragment in an <filename>.scc</filename> |
328 | file, and the "hardware" keyword identifies the fragment as | 343 | file, and the "hardware" keyword identifies the fragment as |
329 | being hardware enabling, as opposed to general policy, | 344 | being hardware enabling, as opposed to general policy, |
@@ -355,26 +370,71 @@ | |||
355 | Patch descriptions are very similar to configuration fragment | 370 | Patch descriptions are very similar to configuration fragment |
356 | descriptions, which are described in the previous section. | 371 | descriptions, which are described in the previous section. |
357 | However, instead of a <filename>.cfg</filename> file, these | 372 | However, instead of a <filename>.cfg</filename> file, these |
358 | descriptions work with source patches. | 373 | descriptions work with source patches (i.e. |
374 | <filename>.patch</filename> files). | ||
359 | </para> | 375 | </para> |
360 | 376 | ||
361 | <para> | 377 | <para> |
362 | A typical patch includes a description file and the patch itself: | 378 | A typical patch includes a description file and the patch itself. |
363 | <literallayout class='monospaced'> | 379 | As an example, consider the build patches used with the |
364 | patches/mypatch.scc: | 380 | <filename>linux-yocto-4.12</filename> kernel as defined outside of |
365 | patch mypatch.patch | 381 | the recipe space (i.e. <filename>yocto-kernel-cache</filename>). |
382 | This Metadata consists of several files: | ||
383 | <filename>build.scc</filename> and a set of | ||
384 | <filename>*.patch</filename> files. | ||
385 | You can find these files in the <filename>patches/build</filename> | ||
386 | directory of the <filename>yocto-4.12</filename> branch in the | ||
387 | <filename>yocto-kernel-cache</filename> Git repository. | ||
388 | </para> | ||
366 | 389 | ||
367 | patches/mypatch.patch: | 390 | <para> |
368 | <replaceable>typical-patch</replaceable> | 391 | The following listings show the <filename>build.scc</filename> |
392 | file and part of the | ||
393 | <filename>modpost-mask-trivial-warnings.patch</filename> file: | ||
394 | <literallayout class='monospaced'> | ||
395 | patches/build/build.scc: | ||
396 | patch arm-serialize-build-targets.patch | ||
397 | patch powerpc-serialize-image-targets.patch | ||
398 | patch kbuild-exclude-meta-directory-from-distclean-processi.patch | ||
399 | |||
400 | # applied by kgit | ||
401 | # patch kbuild-add-meta-files-to-the-ignore-li.patch | ||
402 | |||
403 | patch modpost-mask-trivial-warnings.patch | ||
404 | patch menuconfig-check-lxdiaglog.sh-Allow-specification-of.patch | ||
405 | |||
406 | patches/build/modpost-mask-trivial-warnings.patch: | ||
407 | From bd48931bc142bdd104668f3a062a1f22600aae61 Mon Sep 17 00:00:00 2001 | ||
408 | From: Paul Gortmaker <paul.gortmaker@windriver.com> | ||
409 | Date: Sun, 25 Jan 2009 17:58:09 -0500 | ||
410 | Subject: [PATCH] modpost: mask trivial warnings | ||
411 | |||
412 | Newer HOSTCC will complain about various stdio fcns because | ||
413 | . | ||
414 | . | ||
415 | . | ||
416 | char *dump_write = NULL, *files_source = NULL; | ||
417 | int opt; | ||
418 | -- | ||
419 | 2.10.1 | ||
420 | |||
421 | generated by cgit v0.10.2 at 2017-09-28 15:23:23 (GMT) | ||
369 | </literallayout> | 422 | </literallayout> |
370 | You can create the typical <filename>.patch</filename> | 423 | The description file can include multiple patch statements where |
371 | file using <filename>diff -Nurp</filename> or | 424 | each statement handles a single patch. |
372 | <filename>git format-patch</filename>. | 425 | In the example <filename>build.scc</filename> file, five patch |
426 | statements exist for the five patches in the directory. | ||
373 | </para> | 427 | </para> |
374 | 428 | ||
375 | <para> | 429 | <para> |
376 | The description file can include multiple patch statements, | 430 | You can create a typical <filename>.patch</filename> file using |
377 | one per patch. | 431 | <filename>diff -Nurp</filename> or |
432 | <filename>git format-patch</filename> commands. | ||
433 | For information on how to create patches, see the | ||
434 | "<link linkend='using-devtool-to-patch-the-kernel'>Using <filename>devtool</filename> to Patch the Kernel</link>" | ||
435 | and | ||
436 | "<link linkend='using-traditional-kernel-development-to-patch-the-kernel'>Using Traditional Kernel Development to Patch the Kernel</link>" | ||
437 | sections. | ||
378 | </para> | 438 | </para> |
379 | </section> | 439 | </section> |
380 | 440 | ||
@@ -383,26 +443,23 @@ | |||
383 | 443 | ||
384 | <para> | 444 | <para> |
385 | Features are complex kernel Metadata types that consist | 445 | Features are complex kernel Metadata types that consist |
386 | of configuration fragments (<filename>kconf</filename>), patches | 446 | of configuration fragments, patches, and possibly other feature |
387 | (<filename>patch</filename>), and possibly other feature | 447 | description files. |
388 | description files (<filename>include</filename>). | 448 | As an example, consider the following generic listing: |
389 | </para> | ||
390 | |||
391 | <para> | ||
392 | Here is an example that shows a feature description file: | ||
393 | <literallayout class='monospaced'> | 449 | <literallayout class='monospaced'> |
394 | features/myfeature.scc | 450 | features/<replaceable>myfeature</replaceable>.scc |
395 | define KFEATURE_DESCRIPTION "Enable myfeature" | 451 | define KFEATURE_DESCRIPTION "Enable <replaceable>myfeature</replaceable>" |
396 | 452 | ||
397 | patch 0001-myfeature-core.patch | 453 | patch 0001-<replaceable>myfeature</replaceable>-core.patch |
398 | patch 0002-myfeature-interface.patch | 454 | patch 0002-<replaceable>myfeature</replaceable>-interface.patch |
399 | 455 | ||
400 | include cfg/myfeature_dependency.scc | 456 | include cfg/<replaceable>myfeature</replaceable>_dependency.scc |
401 | kconf non-hardware myfeature.cfg | 457 | kconf non-hardware <replaceable>myfeature</replaceable>.cfg |
402 | </literallayout> | 458 | </literallayout> |
403 | This example shows how the <filename>patch</filename> and | 459 | This example shows how the <filename>patch</filename> and |
404 | <filename>kconf</filename> commands are used as well as | 460 | <filename>kconf</filename> commands are used as well as |
405 | how an additional feature description file is included. | 461 | how an additional feature description file is included with |
462 | the <filename>include</filename> command. | ||
406 | </para> | 463 | </para> |
407 | 464 | ||
408 | <para> | 465 | <para> |
@@ -422,21 +479,47 @@ | |||
422 | <para> | 479 | <para> |
423 | A kernel type defines a high-level kernel policy by | 480 | A kernel type defines a high-level kernel policy by |
424 | aggregating non-hardware configuration fragments with | 481 | aggregating non-hardware configuration fragments with |
425 | patches you want to use when building a Linux kernels of a | 482 | patches you want to use when building a Linux kernel of a |
426 | specific type. | 483 | specific type (e.g. a real-time kernel). |
427 | Syntactically, kernel types are no different than features | 484 | Syntactically, kernel types are no different than features |
428 | as described in the "<link linkend='features'>Features</link>" | 485 | as described in the "<link linkend='features'>Features</link>" |
429 | section. | 486 | section. |
430 | The <filename>LINUX_KERNEL_TYPE</filename> variable in the kernel | 487 | The |
431 | recipe selects the kernel type. | 488 | <ulink url='&YOCTO_DOCS_REF_URL;#var-LINUX_KERNEL_TYPE'><filename>LINUX_KERNEL_TYPE</filename></ulink> |
432 | See the "<link linkend='using-kernel-metadata-in-a-recipe'>Using Kernel Metadata in a Recipe</link>" | 489 | variable in the kernel recipe selects the kernel type. |
433 | section for more information. | 490 | For example, in the <filename>linux-yocto_4.12.bb</filename> |
491 | kernel recipe found in | ||
492 | <filename>poky/meta/recipes-kernel/linux</filename>, a | ||
493 | <ulink url='&YOCTO_DOCS_BB_URL;#require-inclusion'><filename>require</filename></ulink> | ||
494 | directive includes the | ||
495 | <filename>poky/meta/recipes-kernel/linux/linux-yocto.inc</filename> | ||
496 | file, which has the following statement that defines the default | ||
497 | kernel type: | ||
498 | <literallayout class='monospaced'> | ||
499 | LINUX_KERNEL_TYPE ??= "standard" | ||
500 | </literallayout> | ||
501 | </para> | ||
502 | |||
503 | <para> | ||
504 | Another example would be the real-time kernel (i.e. | ||
505 | <filename>linux-yocto-rt_4.12.bb</filename>). | ||
506 | This kernel recipe directly sets the kernel type as follows: | ||
507 | <literallayout class='monospaced'> | ||
508 | LINUX_KERNEL_TYPE = "preempt-rt" | ||
509 | </literallayout> | ||
510 | <note> | ||
511 | You can find kernel recipes in the | ||
512 | <filename>meta/recipes-kernel/linux</filename> directory of the | ||
513 | <ulink url='&YOCTO_DOCS_REF_URL;#source-directory'>Source Directory</ulink> | ||
514 | (e.g. <filename>poky/meta/recipes-kernel/linux/linux-yocto_4.12.bb</filename>). | ||
515 | See the "<link linkend='using-kernel-metadata-in-a-recipe'>Using Kernel Metadata in a Recipe</link>" | ||
516 | section for more information. | ||
517 | </note> | ||
434 | </para> | 518 | </para> |
435 | 519 | ||
436 | <para> | 520 | <para> |
437 | As an example, the <filename>linux-yocto-3.19</filename> | 521 | Three kernel types ("standard", "tiny", and "preempt-rt") are |
438 | tree defines three kernel types: "standard", | 522 | supported for Linux Yocto kernels: |
439 | "tiny", and "preempt-rt": | ||
440 | <itemizedlist> | 523 | <itemizedlist> |
441 | <listitem><para>"standard": | 524 | <listitem><para>"standard": |
442 | Includes the generic Linux kernel policy of the Yocto | 525 | Includes the generic Linux kernel policy of the Yocto |
@@ -463,29 +546,40 @@ | |||
463 | </para> | 546 | </para> |
464 | 547 | ||
465 | <para> | 548 | <para> |
466 | The "standard" kernel type is defined by | 549 | For any given kernel type, the Metadata is defined by the |
467 | <filename>standard.scc</filename>: | 550 | <filename>.scc</filename> (e.g. <filename>standard.scc</filename>). |
551 | Here is a partial listing for the <filename>standard.scc</filename> | ||
552 | file, which is found in the <filename>ktypes/standard</filename> | ||
553 | directory of the <filename>yocto-kernel-cache</filename> Git | ||
554 | repository: | ||
468 | <literallayout class='monospaced'> | 555 | <literallayout class='monospaced'> |
469 | # Include this kernel type fragment to get the standard features and | 556 | # Include this kernel type fragment to get the standard features and |
470 | # configuration values. | 557 | # configuration values. |
471 | 558 | ||
472 | # Include all standard features | 559 | # Note: if only the features are desired, but not the configuration |
473 | include standard-nocfg.scc | 560 | # then this should be included as: |
561 | # include ktypes/standard/standard.scc nocfg | ||
562 | # if no chained configuration is desired, include it as: | ||
563 | # include ktypes/standard/standard.scc nocfg inherit | ||
564 | |||
565 | |||
566 | |||
567 | include ktypes/base/base.scc | ||
568 | branch standard | ||
474 | 569 | ||
475 | kconf non-hardware standard.cfg | 570 | kconf non-hardware standard.cfg |
476 | 571 | ||
477 | # individual cfg block section | 572 | include features/kgdb/kgdb.scc |
478 | include cfg/fs/devtmpfs.scc | 573 | . |
479 | include cfg/fs/debugfs.scc | 574 | . |
480 | include cfg/fs/btrfs.scc | 575 | . |
481 | include cfg/fs/ext2.scc | ||
482 | include cfg/fs/ext3.scc | ||
483 | include cfg/fs/ext4.scc | ||
484 | 576 | ||
485 | include cfg/net/ipv6.scc | ||
486 | include cfg/net/ip_nf.scc | ||
487 | include cfg/net/ip6_nf.scc | 577 | include cfg/net/ip6_nf.scc |
488 | include cfg/net/bridge.scc | 578 | include cfg/net/bridge.scc |
579 | |||
580 | include cfg/systemd.scc | ||
581 | |||
582 | include features/rfkill/rfkill.scc | ||
489 | </literallayout> | 583 | </literallayout> |
490 | </para> | 584 | </para> |
491 | 585 | ||
@@ -531,9 +625,9 @@ | |||
531 | </para> | 625 | </para> |
532 | 626 | ||
533 | <para> | 627 | <para> |
534 | This section provides a BSP description structural overview along | 628 | This section overviews the BSP description structure, the |
535 | with aggregation concepts as well as a detailed example using | 629 | aggregation concepts, and presents a detailed example using |
536 | a BSP supported by the Yocto Project (i.e. Minnow Board). | 630 | a BSP supported by the Yocto Project (i.e. BeagleBone Board). |
537 | </para> | 631 | </para> |
538 | 632 | ||
539 | <section id='bsp-description-file-overview'> | 633 | <section id='bsp-description-file-overview'> |
@@ -541,7 +635,7 @@ | |||
541 | 635 | ||
542 | <para> | 636 | <para> |
543 | For simplicity, consider the following top-level BSP | 637 | For simplicity, consider the following top-level BSP |
544 | description file. | 638 | description files for the BeagleBone board. |
545 | Top-level BSP descriptions files employ both a structure | 639 | Top-level BSP descriptions files employ both a structure |
546 | and naming convention for consistency. | 640 | and naming convention for consistency. |
547 | The naming convention for the file is as follows: | 641 | The naming convention for the file is as follows: |
@@ -549,31 +643,30 @@ | |||
549 | <replaceable>bsp_name</replaceable>-<replaceable>kernel_type</replaceable>.scc | 643 | <replaceable>bsp_name</replaceable>-<replaceable>kernel_type</replaceable>.scc |
550 | </literallayout> | 644 | </literallayout> |
551 | Here are some example top-level BSP filenames for the | 645 | Here are some example top-level BSP filenames for the |
552 | Minnow Board BSP, which is supported by the Yocto Project: | 646 | BeagleBone Board BSP, which is supported by the Yocto Project: |
553 | <literallayout class='monospaced'> | 647 | <literallayout class='monospaced'> |
554 | minnow-standard.scc | 648 | beaglebone-standard.scc |
555 | minnow-preempt-rt.scc | 649 | beaglebone-preempt-rt.scc |
556 | minnow-tiny.scc | ||
557 | </literallayout> | 650 | </literallayout> |
558 | Each file uses the BSP name followed by the kernel type. | 651 | Each file uses the BSP name followed by the kernel type. |
559 | </para> | 652 | </para> |
560 | 653 | ||
561 | <para> | 654 | <para> |
562 | is simple BSP description file whose name has the | 655 | Examine the <filename>beaglebone-standard.scc</filename> |
563 | form | 656 | file: |
564 | <replaceable>mybsp</replaceable><filename>-standard</filename> | ||
565 | and supports the <replaceable>mybsp</replaceable> machine using | ||
566 | a standard kernel: | ||
567 | <literallayout class='monospaced'> | 657 | <literallayout class='monospaced'> |
568 | define KMACHINE <replaceable>mybsp</replaceable> | 658 | define KMACHINE beaglebone |
569 | define KTYPE standard | 659 | define KTYPE standard |
570 | define KARCH i386 | 660 | define KARCH arm |
571 | 661 | ||
572 | include ktypes/standard | 662 | include ktypes/standard/standard.scc |
663 | branch beaglebone | ||
573 | 664 | ||
574 | include <replaceable>mybsp</replaceable>.scc | 665 | include beaglebone.scc |
575 | 666 | ||
576 | kconf hardware <replaceable>mybsp</replaceable>-<replaceable>extra</replaceable>.cfg | 667 | # default policy for standard kernels |
668 | include features/latencytop/latencytop.scc | ||
669 | include features/profiling/profiling.scc | ||
577 | </literallayout> | 670 | </literallayout> |
578 | Every top-level BSP description file should define the | 671 | Every top-level BSP description file should define the |
579 | <ulink url='&YOCTO_DOCS_REF_URL;#var-KMACHINE'><filename>KMACHINE</filename></ulink>, | 672 | <ulink url='&YOCTO_DOCS_REF_URL;#var-KMACHINE'><filename>KMACHINE</filename></ulink>, |
@@ -583,19 +676,20 @@ | |||
583 | These variables allow the OpenEmbedded build system to identify | 676 | These variables allow the OpenEmbedded build system to identify |
584 | the description as meeting the criteria set by the recipe being | 677 | the description as meeting the criteria set by the recipe being |
585 | built. | 678 | built. |
586 | This simple example supports the "mybsp" machine for the "standard" | 679 | This example supports the "beaglebone" machine for the |
587 | kernel and the "i386" architecture. | 680 | "standard" kernel and the "arm" architecture. |
588 | </para> | 681 | </para> |
589 | 682 | ||
590 | <para> | 683 | <para> |
591 | Be aware that a hard link between the | 684 | Be aware that a hard link between the |
592 | <filename>KTYPE</filename> variable and a kernel type description | 685 | <filename>KTYPE</filename> variable and a kernel type |
593 | file does not exist. | 686 | description file does not exist. |
594 | Thus, if you do not have kernel types defined in your kernel | 687 | Thus, if you do not have the kernel type defined in your kernel |
595 | Metadata, you only need to ensure that the kernel recipe's | 688 | Metadata as it is here, you only need to ensure that the |
596 | <ulink url='&YOCTO_DOCS_REF_URL;#var-LINUX_KERNEL_TYPE'><filename>LINUX_KERNEL_TYPE</filename></ulink> | 689 | <ulink url='&YOCTO_DOCS_REF_URL;#var-LINUX_KERNEL_TYPE'><filename>LINUX_KERNEL_TYPE</filename></ulink> |
597 | variable and the <filename>KTYPE</filename> variable in the | 690 | variable in the kernel recipe and the |
598 | BSP description file match. | 691 | <filename>KTYPE</filename> variable in the BSP descriptionn |
692 | file match. | ||
599 | <note> | 693 | <note> |
600 | Future versions of the tooling make the specification of | 694 | Future versions of the tooling make the specification of |
601 | <filename>KTYPE</filename> in the BSP optional. | 695 | <filename>KTYPE</filename> in the BSP optional. |
@@ -608,13 +702,12 @@ | |||
608 | "standard". | 702 | "standard". |
609 | In the previous example, this is done using the following: | 703 | In the previous example, this is done using the following: |
610 | <literallayout class='monospaced'> | 704 | <literallayout class='monospaced'> |
611 | include ktypes/standard | 705 | include ktypes/standard/standard.scc |
612 | </literallayout> | 706 | </literallayout> |
613 | In the previous example, <filename>ktypes/standard.scc</filename> | 707 | This file aggregates all the configuration fragments, patches, |
614 | aggregates all the configuration fragments, patches, and | 708 | and features that make up your standard kernel policy. |
615 | features that make up your standard kernel policy. | 709 | See the "<link linkend='kernel-types'>Kernel Types</link>" |
616 | See the "<link linkend='kernel-types'>Kernel Types</link>" section | 710 | section for more information. |
617 | for more information. | ||
618 | </para> | 711 | </para> |
619 | 712 | ||
620 | <para> | 713 | <para> |
@@ -623,6 +716,10 @@ | |||
623 | <literallayout class='monospaced'> | 716 | <literallayout class='monospaced'> |
624 | include <replaceable>mybsp</replaceable>.scc | 717 | include <replaceable>mybsp</replaceable>.scc |
625 | </literallayout> | 718 | </literallayout> |
719 | You can see that in the BeagleBone example with the following: | ||
720 | <literallayout class='monospaced'> | ||
721 | include beaglebone.scc | ||
722 | </literallayout> | ||
626 | For information on how to break a complete | 723 | For information on how to break a complete |
627 | <filename>.config</filename> file into the various | 724 | <filename>.config</filename> file into the various |
628 | configuration fragments, see the | 725 | configuration fragments, see the |
@@ -637,6 +734,23 @@ | |||
637 | <literallayout class='monospaced'> | 734 | <literallayout class='monospaced'> |
638 | kconf hardware <replaceable>mybsp</replaceable>-<replaceable>extra</replaceable>.cfg | 735 | kconf hardware <replaceable>mybsp</replaceable>-<replaceable>extra</replaceable>.cfg |
639 | </literallayout> | 736 | </literallayout> |
737 | The BeagleBone example does not include these types of | ||
738 | configurations. | ||
739 | However, the Malta 32-bit board does ("mti-malta32"). | ||
740 | Here is the <filename>mti-malta32-le-standard.scc</filename> | ||
741 | file: | ||
742 | <literallayout class='monospaced'> | ||
743 | define KMACHINE mti-malta32-le | ||
744 | define KMACHINE qemumipsel | ||
745 | define KTYPE standard | ||
746 | define KARCH mips | ||
747 | |||
748 | include ktypes/standard/standard.scc | ||
749 | branch mti-malta32 | ||
750 | |||
751 | include mti-malta32.scc | ||
752 | kconf hardware mti-malta32-le.cfg | ||
753 | </literallayout> | ||
640 | </para> | 754 | </para> |
641 | </section> | 755 | </section> |
642 | 756 | ||
@@ -647,14 +761,15 @@ | |||
647 | Many real-world examples are more complex. | 761 | Many real-world examples are more complex. |
648 | Like any other <filename>.scc</filename> file, BSP | 762 | Like any other <filename>.scc</filename> file, BSP |
649 | descriptions can aggregate features. | 763 | descriptions can aggregate features. |
650 | Consider the Minnow BSP definition from the | 764 | Consider the Minnow BSP definition given the |
651 | <filename>linux-yocto-4.4</filename> in the | 765 | <filename>linux-yocto-4.4</filename> branch of the |
652 | Yocto Project | 766 | <filename>yocto-kernel-cache</filename> (i.e. |
653 | <ulink url='&YOCTO_DOCS_REF_URL;#source-repositories'>Source Repositories</ulink> | 767 | <filename>yocto-kernel-cache/bsp/minnow/minnow.scc</filename>): |
654 | (i.e. | 768 | <note> |
655 | <filename>yocto-kernel-cache/bsp/minnow</filename>): | 769 | Although the Minnow Board BSP is unused, the Metadata |
770 | remains and is being used here just as an example. | ||
771 | </note> | ||
656 | <literallayout class='monospaced'> | 772 | <literallayout class='monospaced'> |
657 | minnow.scc: | ||
658 | include cfg/x86.scc | 773 | include cfg/x86.scc |
659 | include features/eg20t/eg20t.scc | 774 | include features/eg20t/eg20t.scc |
660 | include cfg/dmaengine.scc | 775 | include cfg/dmaengine.scc |
@@ -690,9 +805,8 @@ | |||
690 | "minnow" description files for the supported kernel types | 805 | "minnow" description files for the supported kernel types |
691 | (i.e. "standard", "preempt-rt", and "tiny"). | 806 | (i.e. "standard", "preempt-rt", and "tiny"). |
692 | Consider the "minnow" description for the "standard" kernel | 807 | Consider the "minnow" description for the "standard" kernel |
693 | type: | 808 | type (i.e. <filename>minnow-standard.scc</filename>: |
694 | <literallayout class='monospaced'> | 809 | <literallayout class='monospaced'> |
695 | minnow-standard.scc: | ||
696 | define KMACHINE minnow | 810 | define KMACHINE minnow |
697 | define KTYPE standard | 811 | define KTYPE standard |
698 | define KARCH i386 | 812 | define KARCH i386 |
@@ -727,9 +841,8 @@ | |||
727 | 841 | ||
728 | <para> | 842 | <para> |
729 | Now consider the "minnow" description for the "tiny" kernel | 843 | Now consider the "minnow" description for the "tiny" kernel |
730 | type: | 844 | type (i.e. <filename>minnow-tiny.scc</filename>: |
731 | <literallayout class='monospaced'> | 845 | <literallayout class='monospaced'> |
732 | minnow-tiny.scc: | ||
733 | define KMACHINE minnow | 846 | define KMACHINE minnow |
734 | define KTYPE tiny | 847 | define KTYPE tiny |
735 | define KARCH i386 | 848 | define KARCH i386 |
@@ -749,10 +862,12 @@ | |||
749 | 862 | ||
750 | <para> | 863 | <para> |
751 | Notice again the three critical variables: | 864 | Notice again the three critical variables: |
752 | <filename>KMACHINE</filename>, <filename>KTYPE</filename>, | 865 | <ulink url='&YOCTO_DOCS_REF_URL;#var-KMACHINE'><filename>KMACHINE</filename></ulink>, |
753 | and <filename>KARCH</filename>. | 866 | <ulink url='&YOCTO_DOCS_REF_URL;#var-KTYPE'><filename>KTYPE</filename></ulink>, |
754 | Of these variables, only the <filename>KTYPE</filename> has changed. | 867 | and |
755 | It is now set to "tiny". | 868 | <ulink url='&YOCTO_DOCS_REF_URL;#var-KARCH'><filename>KARCH</filename></ulink>. |
869 | Of these variables, only <filename>KTYPE</filename> | ||
870 | has changed to specify the "tiny" kernel type. | ||
756 | </para> | 871 | </para> |
757 | </section> | 872 | </section> |
758 | </section> | 873 | </section> |