diff options
author | Scott Rifenbark <scott.m.rifenbark@intel.com> | 2012-05-04 17:17:28 -0600 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2012-05-31 21:16:53 +0100 |
commit | 3a062dde67b0f91e7f2d4a3f55d4108514b7659d (patch) | |
tree | 951c9dc673028ec63f1cdaf731e3ac1bab1a7d42 /documentation/dev-manual/dev-manual-kernel-appendix.xml | |
parent | 0957740660ddc1efa1546d0f2e213ea82f24300b (diff) | |
download | poky-3a062dde67b0f91e7f2d4a3f55d4108514b7659d.tar.gz |
documentation/dev-manual/dev-manual-kernel-appendix.xml: Kernel example fixed
Due to a bug (2256) the example that changes the kernel configuration
through menuconfig did not work. I have re-written the section
to now start with the default behavior of CONFIG_SMP=y and then
have the user change the configuration to where it is not set.
The changes include the reversing of the flow and the work-around
needed due to bug 2256.
(From yocto-docs rev: 6fa9eee12ed83f81470beb9792fb4fc1c5104f69)
Signed-off-by: Scott Rifenbark <scott.m.rifenbark@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'documentation/dev-manual/dev-manual-kernel-appendix.xml')
-rw-r--r-- | documentation/dev-manual/dev-manual-kernel-appendix.xml | 78 |
1 files changed, 57 insertions, 21 deletions
diff --git a/documentation/dev-manual/dev-manual-kernel-appendix.xml b/documentation/dev-manual/dev-manual-kernel-appendix.xml index 7ee0e706be..db6629da2f 100644 --- a/documentation/dev-manual/dev-manual-kernel-appendix.xml +++ b/documentation/dev-manual/dev-manual-kernel-appendix.xml | |||
@@ -509,8 +509,8 @@ | |||
509 | <title>Changing the Kernel Configuration</title> | 509 | <title>Changing the Kernel Configuration</title> |
510 | 510 | ||
511 | <para> | 511 | <para> |
512 | This example changes the default behavior, which is "off", of the Symmetric | 512 | This example changes the default behavior, which is "on", of the Symmetric |
513 | Multi-processing Support (<filename>CONFIG_SMP</filename>) to "on". | 513 | Multi-processing Support (<filename>CONFIG_SMP</filename>) to "off". |
514 | It is a simple example that demonstrates how to reconfigure the kernel. | 514 | It is a simple example that demonstrates how to reconfigure the kernel. |
515 | </para> | 515 | </para> |
516 | 516 | ||
@@ -533,7 +533,7 @@ | |||
533 | you can get them through tarball extraction or by | 533 | you can get them through tarball extraction or by |
534 | cloning the <filename>poky</filename> Git repository. | 534 | cloning the <filename>poky</filename> Git repository. |
535 | This example uses <filename>poky</filename> as the root directory of the | 535 | This example uses <filename>poky</filename> as the root directory of the |
536 | local Yocto Project files Git repository. | 536 | local <link linkend='yocto-project-files'>Yocto Project Files</link> Git repository. |
537 | See the bulleted item | 537 | See the bulleted item |
538 | "<link linkend='local-yp-release'>Yocto Project Release</link>" | 538 | "<link linkend='local-yp-release'>Yocto Project Release</link>" |
539 | for information on how to get these files. | 539 | for information on how to get these files. |
@@ -616,11 +616,11 @@ | |||
616 | <title>Examining the Default <filename>CONFIG_SMP</filename> Behavior</title> | 616 | <title>Examining the Default <filename>CONFIG_SMP</filename> Behavior</title> |
617 | 617 | ||
618 | <para> | 618 | <para> |
619 | By default, <filename>CONFIG_SMP</filename> supports single processor machines. | 619 | By default, <filename>CONFIG_SMP</filename> supports multiple processor machines. |
620 | To see this default setting from within the QEMU emulator, boot your image using | 620 | To see this default setting from within the QEMU emulator, boot your image using |
621 | the emulator as follows: | 621 | the emulator as follows: |
622 | <literallayout class='monospaced'> | 622 | <literallayout class='monospaced'> |
623 | $ runqemu qemux86 qemuparams="-smp 2" | 623 | $ runqemu qemux86 qemuparams="-smp 4" |
624 | </literallayout> | 624 | </literallayout> |
625 | </para> | 625 | </para> |
626 | 626 | ||
@@ -628,12 +628,26 @@ | |||
628 | Login to the machine using <filename>root</filename> with no password. | 628 | Login to the machine using <filename>root</filename> with no password. |
629 | After logging in, enter the following command to see how many processors are | 629 | After logging in, enter the following command to see how many processors are |
630 | being supported in the emulator. | 630 | being supported in the emulator. |
631 | The emulator reports support for a single processor: | 631 | The emulator reports support for the number of processors you specified using |
632 | the <filename>-smp</filename> option, four in this case: | ||
632 | <literallayout class='monospaced'> | 633 | <literallayout class='monospaced'> |
633 | # cat /proc/cpuinfo | grep processor | 634 | # cat /proc/cpuinfo | grep processor |
634 | processor : 0 | 635 | processor : 0 |
636 | processor : 1 | ||
637 | processor : 2 | ||
638 | processor : 3 | ||
635 | # | 639 | # |
636 | </literallayout> | 640 | </literallayout> |
641 | To check the setting for <filename>CONFIG_SMP</filename>, you can use the | ||
642 | following command: | ||
643 | <literallayout class='monospaced'> | ||
644 | zcat /proc/config.gz | grep CONFIG_SMP | ||
645 | </literallayout> | ||
646 | The console returns the following showing that multi-processor machine support | ||
647 | is set: | ||
648 | <literallayout class='monospaced'> | ||
649 | CONFIG_SMP=y | ||
650 | </literallayout> | ||
637 | Logout of the emulator using the <filename>exit</filename> command and | 651 | Logout of the emulator using the <filename>exit</filename> command and |
638 | then close it down. | 652 | then close it down. |
639 | </para> | 653 | </para> |
@@ -662,11 +676,21 @@ | |||
662 | kernel. | 676 | kernel. |
663 | The Yocto Project build environment recognizes this kernel as | 677 | The Yocto Project build environment recognizes this kernel as |
664 | <filename>linux-yocto</filename>. | 678 | <filename>linux-yocto</filename>. |
665 | Thus, the following command from the shell in which you previously sourced the | 679 | Thus, the following commands from the shell in which you previously sourced the |
666 | environment initialization script launches <filename>menuconfig</filename>: | 680 | environment initialization script cleans the shared state memory and the |
681 | <ulink url='&YOCTO_DOCS_REF_URL;#var-WORKDIR'><filename>WORKDIR</filename></ulink> | ||
682 | directory and then builds and launches <filename>menuconfig</filename>: | ||
667 | <literallayout class='monospaced'> | 683 | <literallayout class='monospaced'> |
684 | $ bitbake linux-yocto -c cleansstate | ||
668 | $ bitbake linux-yocto -c menuconfig | 685 | $ bitbake linux-yocto -c menuconfig |
669 | </literallayout> | 686 | </literallayout> |
687 | <note> | ||
688 | Due to a bug in the release, it is necessary to clean the shared state memory | ||
689 | in order for configurations made using <filename>menuconfig</filename> to take | ||
690 | effect. | ||
691 | For information on the bug, see | ||
692 | <ulink url='https://bugzilla.yoctoproject.org/show_bug.cgi?id=2256'></ulink> | ||
693 | </note> | ||
670 | </para> | 694 | </para> |
671 | 695 | ||
672 | <para> | 696 | <para> |
@@ -675,7 +699,7 @@ | |||
675 | You can find it at <filename>Processor Type and Features</filename>. | 699 | You can find it at <filename>Processor Type and Features</filename>. |
676 | The configuration selection is | 700 | The configuration selection is |
677 | <filename>Symmetric Multi-processing Support</filename>. | 701 | <filename>Symmetric Multi-processing Support</filename>. |
678 | After using the arrow keys to highlight this selection, press "y" to select it. | 702 | After using the arrow keys to highlight this selection, press "n" to turn it off. |
679 | Then, exit out and save your selections. | 703 | Then, exit out and save your selections. |
680 | </para> | 704 | </para> |
681 | 705 | ||
@@ -684,22 +708,25 @@ | |||
684 | is updated. | 708 | is updated. |
685 | This is the file that the build system uses to configure the Linux Yocto kernel | 709 | This is the file that the build system uses to configure the Linux Yocto kernel |
686 | when it is built. | 710 | when it is built. |
687 | You can find and examine this file in the Yocto Project files Git repository in | 711 | You can find and examine this file in the Yocto Project Files Git repository in |
688 | the build directory. | 712 | the build directory. |
689 | This example uses the following. | 713 | This example uses the following: |
690 | Note that this example directory is artificially split and many of the characters | ||
691 | in the actually filename are omitted in order to make it more | ||
692 | readable: | ||
693 | <literallayout class='monospaced'> | 714 | <literallayout class='monospaced'> |
694 | ~/poky/build/tmp/work/qemux86-poky-linux/linux-yocto-2.6.37+git1+84f... | 715 | ~/poky/build/tmp/work/qemux86-poky-linux/linux-yocto-3.2.11+git1+84f... |
695 | ...r20/linux-qemux86-standard-build | 716 | ...656ed30-r1/linux-qemux86-standard-build |
696 | </literallayout> | 717 | </literallayout> |
718 | <note> | ||
719 | The previous example directory is artificially split and many of the characters | ||
720 | in the actual filename are omitted in order to make it more readable. | ||
721 | Also, depending on the kernel you are using, the exact pathname might differ | ||
722 | slightly. | ||
723 | </note> | ||
697 | </para> | 724 | </para> |
698 | 725 | ||
699 | <para> | 726 | <para> |
700 | Within the <filename>.config</filename> file, you can see the following setting: | 727 | Within the <filename>.config</filename> file, you can see the following setting: |
701 | <literallayout class='monospaced'> | 728 | <literallayout class='monospaced'> |
702 | CONFIG_SMP=y | 729 | # CONFIG_SMP is not set |
703 | </literallayout> | 730 | </literallayout> |
704 | </para> | 731 | </para> |
705 | 732 | ||
@@ -735,9 +762,9 @@ | |||
735 | </para> | 762 | </para> |
736 | 763 | ||
737 | <para> | 764 | <para> |
738 | Now run the QEMU emulator: | 765 | Now run the QEMU emulator and pass it the same multi-processor option as before: |
739 | <literallayout class='monospaced'> | 766 | <literallayout class='monospaced'> |
740 | $ runqemu qemux86 qemuparams="-smp 2" | 767 | $ runqemu qemux86 qemuparams="-smp 4" |
741 | </literallayout> | 768 | </literallayout> |
742 | </para> | 769 | </para> |
743 | 770 | ||
@@ -747,13 +774,22 @@ | |||
747 | <literallayout class='monospaced'> | 774 | <literallayout class='monospaced'> |
748 | # cat /proc/cpuinfo | grep processor | 775 | # cat /proc/cpuinfo | grep processor |
749 | processor : 0 | 776 | processor : 0 |
750 | processor : 1 | ||
751 | # | 777 | # |
752 | </literallayout> | 778 | </literallayout> |
753 | </para> | 779 | </para> |
754 | 780 | ||
755 | <para> | 781 | <para> |
756 | From the output, you can see that you have successfully reconfigured the kernel. | 782 | From the output, you can see that the kernel no longer supports multi-processor systems. |
783 | The output indicates support for a single processor. You can verify the | ||
784 | <filename>CONFIG_SMP</filename> setting by using this command: | ||
785 | <literallayout class='monospaced'> | ||
786 | zcat /proc/config.gz | grep CONFIG_SMP | ||
787 | </literallayout> | ||
788 | The console returns the following output: | ||
789 | <literallayout class='monospaced'> | ||
790 | # CONFIG_SMP is not set | ||
791 | </literallayout> | ||
792 | You have successfully reconfigured the kernel. | ||
757 | </para> | 793 | </para> |
758 | </section> | 794 | </section> |
759 | </section> | 795 | </section> |