From 274095d4c21a8f617a41f85a364db78e96f7bf4d Mon Sep 17 00:00:00 2001 From: Scott Rifenbark Date: Mon, 8 Oct 2012 08:49:23 -0700 Subject: documentation: dev-manual - Updates to configuring Kernel section Eliminated the section A.2, which had an example of how to use menuconfig in the kerenl example appendix. The information is now merged into the similar section in Chapter 4 "Common Tasks." It was decided that the Appendix A examples in the manual were too detailed for a general development guide. (From yocto-docs rev: f88ec421b257657f02cc0f132ec2580c17f07cef) Signed-off-by: Scott Rifenbark Signed-off-by: Richard Purdie --- .../dev-manual/dev-manual-common-tasks.xml | 88 ++++++++++++++++++++-- 1 file changed, 81 insertions(+), 7 deletions(-) (limited to 'documentation/dev-manual/dev-manual-common-tasks.xml') diff --git a/documentation/dev-manual/dev-manual-common-tasks.xml b/documentation/dev-manual/dev-manual-common-tasks.xml index 824aac1236..918d884681 100644 --- a/documentation/dev-manual/dev-manual-common-tasks.xml +++ b/documentation/dev-manual/dev-manual-common-tasks.xml @@ -1352,6 +1352,8 @@ The easiest way to define kernel configurations is to set them through the menuconfig tool. + This tool provides an interactive method with which + to set kernel configurations. For general information on menuconfig, see . @@ -1359,6 +1361,9 @@ To use the menuconfig tool in the Yocto Project development environment, you must build the tool using BitBake. + Thus, the environment must be set up using the &OE_INIT_FILE; + script found in the + Build Directory. The following commands build and invoke menuconfig assuming the source directory top-level folder is ~/poky: @@ -1367,17 +1372,86 @@ $ bitbake linux-yocto -c menuconfig Once menuconfig comes up, its standard interface allows you to - examine and configure all the kernel configuration parameters. - Once you have made your changes, simply exit the tool and save your changes to + interactively examine and configure all the kernel configuration parameters. + After making your changes, simply exit the tool and save your changes to create an updated version of the .config configuration file. - For an example that shows how to change a specific kernel option - using menuconfig, see the - "Changing - the CONFIG_SMP Configuration Using menuconfig" - section. + Consider an example that configures the linux-yocto-3.4 + kernel. + The OpenEmbedded build system recognizes this kernel as + linux-yocto. + Thus, the following commands from the shell in which you previously sourced the + environment initialization script cleans the shared state cache and the + WORKDIR + directory and then builds and launches menuconfig: + + $ bitbake linux-yocto -c menuconfig + + + + + Once menuconfig launches, you use the interface + to navigate through the selections to find the configuration settings in + which you are interested. + For example, consider the CONFIG_SMP configuration setting. + You can find it at Processor Type and Features under + the configuration selection Symmetric Multi-processing Support. + After highlighting the selection, you can use the arrow keys to select or deselect + the setting. + When you are finished with all your selections, exit out and save them. + + + + Saving the selections updates the .config configuration file. + This is the file that the OpenEmbedded build system uses to configure the + kernel during the build. + You can find and examine this file in the build directory in + tmp/work/. + The actual .config is located in the area where the + specific kernel is built. + For example, if you were building a Linux Yocto kernel based on the + Linux 3.4 kernel and you were building a QEMU image targeted for + x86 architecture, the + .config file would be located here: + + ~/poky/build/tmp/work/qemux86-poky-linux/linux-yocto-3.4.11+git1+84f... + ...656ed30-r1/linux-qemux86-standard-build + + + The previous example directory is artificially split and many of the characters + in the actual filename are omitted in order to make it more readable. + Also, depending on the kernel you are using, the exact pathname + for linux-yocto-3.4... might differ. + + + + + Within the .config file, you can see the kernel settings. + For example, the following entry shows that symmetric multi-processor support + is not set: + + # CONFIG_SMP is not set + + + + + A good method to isolate changed configurations is to use a combination of the + menuconfig tool and simple shell commands. + Before changing configurations with menuconfig, copy the + existing .config and rename it to something else, + use menuconfig to make + as many changes an you want and save them, then compare the renamed configuration + file against the newly created file. + You can use the resulting differences as your base to create configuration fragments + to permanently save in your kernel layer. + + Be sure to make a copy of the .config and don't just + rename it. + The build system needs an existing .config + from which to work. + -- cgit v1.2.3-54-g00ecf