diff options
Diffstat (limited to 'documentation/kernel-dev')
| -rw-r--r-- | documentation/kernel-dev/kernel-dev-intro.xml | 443 |
1 files changed, 80 insertions, 363 deletions
diff --git a/documentation/kernel-dev/kernel-dev-intro.xml b/documentation/kernel-dev/kernel-dev-intro.xml index 17ff5c7877..2490087b7a 100644 --- a/documentation/kernel-dev/kernel-dev-intro.xml +++ b/documentation/kernel-dev/kernel-dev-intro.xml | |||
| @@ -89,270 +89,50 @@ | |||
| 89 | recipes, an alternative exists by which you can use the Yocto | 89 | recipes, an alternative exists by which you can use the Yocto |
| 90 | Project Linux kernel tools with your own kernel sources. | 90 | Project Linux kernel tools with your own kernel sources. |
| 91 | </para> | 91 | </para> |
| 92 | </section> | ||
| 93 | |||
| 94 | <section id='preparing-the-build-host-to-work-on-the-kernel'> | ||
| 95 | <title>Preparing the Build Host to Work on the Kernel</title> | ||
| 96 | 92 | ||
| 97 | <para> | 93 | <para> |
| 98 | Before you can do any kernel development, you need to be | 94 | The remainder of this manual provides instructions for completing |
| 99 | sure your build host is set up to use the Yocto Project. | 95 | specific Linux kernel development tasks. |
| 100 | For information on how to get set up, see the | 96 | These instructions assume you are comfortable working with |
| 101 | "<ulink url='&YOCTO_DOCS_DEV_URL;#setting-up-the-development-host-to-use-the-yocto-project'>Setting Up to Use the Yocto Project</ulink>" | 97 | <ulink url='http://openembedded.org/wiki/Bitbake'>BitBake</ulink> |
| 102 | section in the Yocto Project Development Manual. | 98 | recipes and basic open-source development tools. |
| 103 | Part of preparing the system is creating a local Git | 99 | Understanding these concepts will facilitate the process of working |
| 104 | repository of the | 100 | with the kernel recipes. |
| 105 | <ulink url='&YOCTO_DOCS_REF_URL;#source-directory'>Source Directory</ulink> | 101 | If you find you need some additional background, please be sure to |
| 106 | (<filename>poky</filename>) on your system. | 102 | review and understand the following documentation: |
| 107 | Follow the steps in the | 103 | <itemizedlist> |
| 108 | "<ulink url='&YOCTO_DOCS_DEV_URL;#cloning-the-poky-repository'>Cloning the <filename>poky</filename> Repository</ulink>" | 104 | <listitem><para> |
| 109 | section in the Yocto Project Development Manual to set up your | 105 | <ulink url='&YOCTO_DOCS_QS_URL;'>Yocto Project Quick Start</ulink> |
| 110 | Source Directory. | 106 | </para></listitem> |
| 111 | <note> | 107 | <listitem><para> |
| 112 | Be sure you check out the appropriate development branch or | 108 | <ulink url='&YOCTO_DOCS_SDK_URL;#using-devtool-in-your-sdk-workflow'><filename>devtool</filename> workflow</ulink> |
| 113 | by tag to get the version of Yocto Project you want. | 109 | as described in the Yocto Project Software Development Kit |
| 114 | See the | 110 | (SDK) Developer's Guide. |
| 115 | "<ulink url='&YOCTO_DOCS_DEV_URL;#checking-out-by-branch-in-poky'>Checking Out by Branch in Poky</ulink>" | 111 | </para></listitem> |
| 116 | and | 112 | <listitem><para> |
| 117 | "<ulink url='&YOCTO_DOCS_DEV_URL;#checkout-out-by-tag-in-poky'>Checking Out by Tag in Poky</ulink>" | 113 | The |
| 118 | sections in the Yocto Project Development Manual for more | 114 | "<ulink url='&YOCTO_DOCS_DEV_URL;#understanding-and-creating-layers'>Understanding and Creating Layers</ulink>" section |
| 119 | information. | 115 | in the Yocto Project Development Manual |
| 120 | </note> | 116 | </para></listitem> |
| 117 | <listitem><para> | ||
| 118 | The | ||
| 119 | "<link linkend='kernel-modification-workflow'>Kernel Modification Workflow</link>" | ||
| 120 | section. | ||
| 121 | </para></listitem> | ||
| 122 | </itemizedlist> | ||
| 121 | </para> | 123 | </para> |
| 122 | 124 | ||
| 123 | <para> | 125 | <para> |
| 124 | Kernel development is best accomplished using | 126 | Finally, while this document focuses on the manual creation of |
| 125 | <ulink url='&YOCTO_DOCS_SDK_URL;#using-devtool-in-your-sdk-workflow'><filename>devtool</filename></ulink> | 127 | recipes, patches, and configuration files, the Yocto Project |
| 126 | and not through traditional kernel workflow methods. | 128 | Board Support Package (BSP) tools are available to automate |
| 127 | The remainder of this section provides information for both scenarios. | 129 | this process with existing content and work well to create the |
| 130 | initial framework and boilerplate code. | ||
| 131 | For details on these tools, see the | ||
| 132 | "<ulink url='&YOCTO_DOCS_BSP_URL;#using-the-yocto-projects-bsp-tools'>Using the Yocto Project's BSP Tools</ulink>" | ||
| 133 | section in the Yocto Project Board Support Package (BSP) Developer's | ||
| 134 | Guide. | ||
| 128 | </para> | 135 | </para> |
| 129 | |||
| 130 | <section id='getting-ready-to-develop-using-devtool'> | ||
| 131 | <title>Getting Ready to Develop using <filename>devtool</filename></title> | ||
| 132 | |||
| 133 | <para> | ||
| 134 | Follow these steps to prepare to update the kernel image using | ||
| 135 | <filename>devtool</filename>. | ||
| 136 | Completing this procedure leaves you with a clean kernel image | ||
| 137 | and ready to make modifications as described in the | ||
| 138 | "<link linkend='using-devtool-to-patch-the-kernel'>Using <filename>devtool</filename> to Patch the Kernel</link>" | ||
| 139 | section: | ||
| 140 | <orderedlist> | ||
| 141 | <listitem><para> | ||
| 142 | <emphasis>Initialize the BitBake Environment:</emphasis> | ||
| 143 | Before building an extensible SDK, you need to | ||
| 144 | initialize the BitBake build environment by sourcing a | ||
| 145 | build environment script | ||
| 146 | (i.e. <ulink url='&YOCTO_DOCS_REF_URL;#structure-core-script'><filename>oe-init-build-env</filename></ulink> | ||
| 147 | or | ||
| 148 | <ulink url='&YOCTO_DOCS_REF_URL;#structure-memres-core-script'><filename>oe-init-build-env-memres</filename></ulink>): | ||
| 149 | <literallayout class='monospaced'> | ||
| 150 | $ cd ~/poky | ||
| 151 | $ source oe-init-build-env | ||
| 152 | </literallayout> | ||
| 153 | <note> | ||
| 154 | The previous commands assume the | ||
| 155 | <ulink url='&YOCTO_DOCS_REF_URL;#source-repositories'>Source Repositories</ulink> | ||
| 156 | (i.e. <filename>poky</filename>) have been cloned | ||
| 157 | using Git and the local repository is named | ||
| 158 | "poky". | ||
| 159 | </note> | ||
| 160 | </para></listitem> | ||
| 161 | <listitem><para> | ||
| 162 | <emphasis>Prepare Your <filename>local.conf</filename> File:</emphasis> | ||
| 163 | By default, the | ||
| 164 | <ulink url='&YOCTO_DOCS_REF_URL;#var-MACHINE'><filename>MACHINE</filename></ulink> | ||
| 165 | variable is set to "qemux86", which is fine if you are | ||
| 166 | building for the QEMU emulator in 32-bit mode. | ||
| 167 | However, if you are not, you need to set the | ||
| 168 | <filename>MACHINE</filename> variable appropriately in | ||
| 169 | your <filename>conf/local.conf</filename> file found in the | ||
| 170 | <ulink url='&YOCTO_DOCS_REF_URL;#build-directory'>Build Directory</ulink> | ||
| 171 | (i.e. <filename>~/poky/build</filename> in this example). | ||
| 172 | </para> | ||
| 173 | |||
| 174 | <para>Also, since you are preparing to work on the kernel | ||
| 175 | image, you need to set the | ||
| 176 | <ulink url='&YOCTO_DOCS_REF_URL;#var-MACHINE_ESSENTIAL_EXTRA_RRECOMMENDS'><filename>MACHINE_ESSENTIAL_EXTRA_RRECOMMENDS</filename></ulink> | ||
| 177 | variable to include kernel modules.</para> | ||
| 178 | |||
| 179 | <para>This example uses the default "qemux86" for the | ||
| 180 | <filename>MACHINE</filename> variable but needs to | ||
| 181 | add the "kernel-modules": | ||
| 182 | <literallayout class='monospaced'> | ||
| 183 | MACHINE_ESSENTIAL_EXTRA_RRECOMMENDS += "kernel-modules" | ||
| 184 | </literallayout> | ||
| 185 | </para></listitem> | ||
| 186 | <listitem><para> | ||
| 187 | <emphasis>Create a Layer for Patches:</emphasis> | ||
| 188 | You need to create a layer to hold patches created | ||
| 189 | for the kernel image. | ||
| 190 | You can use the <filename>yocto-layer</filename> command | ||
| 191 | as follows: | ||
| 192 | <literallayout class='monospaced'> | ||
| 193 | $ cd ~/poky | ||
| 194 | $ yocto-layer create my-kernel -o ../meta-my-kernel | ||
| 195 | Please enter the layer priority you'd like to use for the layer: [default: 6] | ||
| 196 | Would you like to have an example recipe created? (y/n) [default: n] | ||
| 197 | Would you like to have an example bbappend file created? (y/n) [default: n] | ||
| 198 | |||
| 199 | New layer created in ../meta-my-kernel. | ||
| 200 | |||
| 201 | Don't forget to add it to your BBLAYERS (for details see ../meta-my-kernel/README). | ||
| 202 | </literallayout> | ||
| 203 | </para></listitem> | ||
| 204 | <listitem><para> | ||
| 205 | <emphasis>Inform the BitBake Build Environment About Your Layer:</emphasis> | ||
| 206 | As directed when you created your layer, you need to add | ||
| 207 | the layer to the | ||
| 208 | <ulink url='&YOCTO_DOCS_REF_URL;#var-BBLAYERS'><filename>BBLAYERS</filename></ulink> | ||
| 209 | variable in the <filename>bblayers.conf</filename> file | ||
| 210 | as follows: | ||
| 211 | <literallayout class='monospaced'> | ||
| 212 | $ cd ~/poky/build | ||
| 213 | $ bitbake-layers add-layer ../../meta-my-kernel | ||
| 214 | </literallayout> | ||
| 215 | </para></listitem> | ||
| 216 | <listitem><para> | ||
| 217 | <emphasis>Build the Extensible SDK:</emphasis> | ||
| 218 | Use BitBake to build the extensible SDK specifically for | ||
| 219 | the Minnowboard: | ||
| 220 | <literallayout class='monospaced'> | ||
| 221 | $ cd ~/poky/build | ||
| 222 | $ bitbake core-image-minimal -c populate_sdk_ext | ||
| 223 | </literallayout> | ||
| 224 | Once the build finishes, you can find the SDK installer | ||
| 225 | file (i.e. <filename>*.sh</filename> file) in the | ||
| 226 | following directory: | ||
| 227 | <literallayout class='monospaced'> | ||
| 228 | ~/poky/build/tmp/deploy/sdk | ||
| 229 | </literallayout> | ||
| 230 | For this example, the installer file is named | ||
| 231 | <filename>poky-glibc-x86_64-core-image-minimal-i586-toolchain-ext-&DISTRO;.sh</filename> | ||
| 232 | </para></listitem> | ||
| 233 | <listitem><para> | ||
| 234 | <emphasis>Install the Extensible SDK:</emphasis> | ||
| 235 | Use the following command to install the SDK. | ||
| 236 | For this example, install the SDK in the default | ||
| 237 | <filename>~/poky_sdk</filename> directory: | ||
| 238 | <literallayout class='monospaced'> | ||
| 239 | $ cd ~/poky/build/tmp/deploy/sdk | ||
| 240 | $ ./poky-glibc-x86_64-core-image-minimal-i586-toolchain-ext-&DISTRO;.sh | ||
| 241 | Poky (Yocto Project Reference Distro) Extensible SDK installer version &DISTRO; | ||
| 242 | ============================================================================ | ||
| 243 | Enter target directory for SDK (default: ~/poky_sdk): | ||
| 244 | You are about to install the SDK to "/home/scottrif/poky_sdk". Proceed[Y/n]? Y | ||
| 245 | Extracting SDK......................................done | ||
| 246 | Setting it up... | ||
| 247 | Extracting buildtools... | ||
| 248 | Preparing build system... | ||
| 249 | Parsing recipes: 100% |#################################################################| Time: 0:00:52 | ||
| 250 | Initializing tasks: 100% |############## ###############################################| Time: 0:00:04 | ||
| 251 | Checking sstate mirror object availability: 100% |######################################| Time: 0:00:00 | ||
| 252 | Parsing recipes: 100% |#################################################################| Time: 0:00:33 | ||
| 253 | Initializing tasks: 100% |##############################################################| Time: 0:00:00 | ||
| 254 | done | ||
| 255 | SDK has been successfully set up and is ready to be used. | ||
| 256 | Each time you wish to use the SDK in a new shell session, you need to source the environment setup script e.g. | ||
| 257 | $ . /home/scottrif/poky_sdk/environment-setup-i586-poky-linux | ||
| 258 | </literallayout> | ||
| 259 | </para></listitem> | ||
| 260 | <listitem><para id='setting-up-the-esdk-terminal'> | ||
| 261 | <emphasis>Set Up a New Terminal to Work With the Extensible SDK:</emphasis> | ||
| 262 | You must set up a new terminal to work with the SDK. | ||
| 263 | You cannot use the same BitBake shell used to build the | ||
| 264 | installer.</para> | ||
| 265 | |||
| 266 | <para>After opening a new shell, run the SDK environment | ||
| 267 | setup script as directed by the output from installing | ||
| 268 | the SDK: | ||
| 269 | <literallayout class='monospaced'> | ||
| 270 | $ source ~/poky_sdk/environment-setup-i586-poky-linux | ||
| 271 | "SDK environment now set up; additionally you may now run devtool to perform development tasks. | ||
| 272 | Run devtool --help for further details. | ||
| 273 | </literallayout> | ||
| 274 | <note> | ||
| 275 | If you get a warning about attempting to use the | ||
| 276 | extensible SDK in an environment set up to run | ||
| 277 | BitBake, you did not use a new shell. | ||
| 278 | </note> | ||
| 279 | </para></listitem> | ||
| 280 | <listitem><para> | ||
| 281 | <emphasis>Build the Clean Image:</emphasis> | ||
| 282 | The final step in preparing to work on the kernel is to | ||
| 283 | build an initial image using <filename>devtool</filename> | ||
| 284 | in the new terminal you just set up and initialized for | ||
| 285 | SDK work: | ||
| 286 | <literallayout class='monospaced'> | ||
| 287 | $ devtool build-image | ||
| 288 | Parsing recipes: 100% |##########################################| Time: 0:00:05 | ||
| 289 | Parsing of 830 .bb files complete (0 cached, 830 parsed). 1299 targets, 47 skipped, 0 masked, 0 errors. | ||
| 290 | WARNING: No packages to add, building image core-image-minimal unmodified | ||
| 291 | Loading cache: 100% |############################################| Time: 0:00:00 | ||
| 292 | Loaded 1299 entries from dependency cache. | ||
| 293 | NOTE: Resolving any missing task queue dependencies | ||
| 294 | Initializing tasks: 100% |#######################################| Time: 0:00:07 | ||
| 295 | Checking sstate mirror object availability: 100% |###############| Time: 0:00:00 | ||
| 296 | NOTE: Executing SetScene Tasks | ||
| 297 | NOTE: Executing RunQueue Tasks | ||
| 298 | NOTE: Tasks Summary: Attempted 2866 tasks of which 2604 didn't need to be rerun and all succeeded. | ||
| 299 | NOTE: Successfully built core-image-minimal. You can find output files in /home/scottrif/poky_sdk/tmp/deploy/images/qemux86 | ||
| 300 | </literallayout> | ||
| 301 | If you were building for actual hardware and not for | ||
| 302 | emulation, you could flash the image to a USB stick | ||
| 303 | on <filename>/dev/sdd</filename> and boot your device. | ||
| 304 | For an example that uses a Minnowboard, see the | ||
| 305 | <ulink url='https://wiki.yoctoproject.org/wiki/TipsAndTricks/KernelDevelopmentWithEsdk'>TipsAndTricks/KernelDevelopmentWithEsdk</ulink> | ||
| 306 | Wiki page. | ||
| 307 | </para></listitem> | ||
| 308 | </orderedlist> | ||
| 309 | </para> | ||
| 310 | |||
| 311 | <para> | ||
| 312 | At this point you have set up to start making modifications to the | ||
| 313 | kernel by using the extensible SDK. | ||
| 314 | For a continued example, see the | ||
| 315 | "<link linkend='using-devtool-to-patch-the-kernel'>Using <filename>devtool</filename> to Patch the Kernel</link>" | ||
| 316 | section. | ||
| 317 | </para> | ||
| 318 | </section> | ||
| 319 | |||
| 320 | <section id='getting-ready-for-traditional-kernel-development'> | ||
| 321 | <title>Getting Ready for Traditional Kernel Development</title> | ||
| 322 | |||
| 323 | <para> | ||
| 324 | For traditional kernel development using the Yocto | ||
| 325 | Project, you need to establish a local copy of the | ||
| 326 | kernel source. | ||
| 327 | You can find Git repositories of supported Yocto Project | ||
| 328 | kernels organized under "Yocto Linux Kernel" in the Yocto | ||
| 329 | Project Source Repositories at | ||
| 330 | <ulink url='&YOCTO_GIT_URL;/cgit.cgi'></ulink>. | ||
| 331 | </para> | ||
| 332 | |||
| 333 | <para> | ||
| 334 | For simplicity, it is recommended that you create your copy | ||
| 335 | of the kernel Git repository outside of the | ||
| 336 | <ulink url='&YOCTO_DOCS_REF_URL;source-directory'>Source Directory</ulink>, | ||
| 337 | which is usually named <filename>poky</filename>. | ||
| 338 | </para> | ||
| 339 | |||
| 340 | <para> | ||
| 341 | The following command shows how to create a local copy of the | ||
| 342 | <filename>linux-yocto-4.9</filename> kernel: | ||
| 343 | <literallayout class='monospaced'> | ||
| 344 | $ git clone git://git.yoctoproject.org/linux-yocto-4.9 linux-yocto-4.9.git | ||
| 345 | Cloning into 'linux-yocto-4.9.git'... | ||
| 346 | remote: Counting objects: 5094108, done. | ||
| 347 | remote: Compressing objects: 100% (765113/765113), done. | ||
| 348 | remote: Total 5094108 (delta 4294009), reused 5088388 (delta 4288312) | ||
| 349 | Receiving objects: 100% (5094108/5094108), 1.02 GiB | 7.82 MiB/s, done. | ||
| 350 | Resolving deltas: 100% (4294009/4294009), done. | ||
| 351 | Checking connectivity... done. | ||
| 352 | Checking out files: 100% (56233/56233), done. | ||
| 353 | </literallayout> | ||
| 354 | </para> | ||
| 355 | </section> | ||
| 356 | </section> | 136 | </section> |
| 357 | 137 | ||
| 358 | <section id='kernel-modification-workflow'> | 138 | <section id='kernel-modification-workflow'> |
| @@ -370,21 +150,8 @@ | |||
| 370 | <para> | 150 | <para> |
| 371 | This section presents a high-level overview of the Yocto Project | 151 | This section presents a high-level overview of the Yocto Project |
| 372 | kernel modification workflow. | 152 | kernel modification workflow. |
| 373 | You can find additional information here: | 153 | The illustration and accompanying list provide general information |
| 374 | <itemizedlist> | 154 | and references for further information. |
| 375 | <listitem><para> | ||
| 376 | The | ||
| 377 | "<link linkend='using-devtool-to-patch-the-kernel'>Using <filename>devtool</filename> to Patch the Kernel</link>" | ||
| 378 | section. | ||
| 379 | </para></listitem> | ||
| 380 | <listitem><para> | ||
| 381 | The | ||
| 382 | "<ulink url='&YOCTO_DOCS_DEV_URL;#configuring-the-kernel'>Configuring the Kernel</ulink>" | ||
| 383 | section in the Yocto Project Development Manual. | ||
| 384 | </para></listitem> | ||
| 385 | </itemizedlist> | ||
| 386 | This illustration and the following list summarizes the kernel | ||
| 387 | modification general workflow. | ||
| 388 | <imagedata fileref="figures/kernel-dev-flow.png" | 155 | <imagedata fileref="figures/kernel-dev-flow.png" |
| 389 | width="9in" depth="5in" align="center" scalefit="1" /> | 156 | width="9in" depth="5in" align="center" scalefit="1" /> |
| 390 | </para> | 157 | </para> |
| @@ -392,58 +159,57 @@ | |||
| 392 | <para> | 159 | <para> |
| 393 | <orderedlist> | 160 | <orderedlist> |
| 394 | <listitem><para> | 161 | <listitem><para> |
| 395 | <emphasis>Set up Your Host Development System to Support | 162 | <emphasis>Set Up Your Host Development System to Support |
| 396 | Development Using the Yocto Project</emphasis>: | 163 | Development Using the Yocto Project:</emphasis> |
| 397 | See the | 164 | See the |
| 398 | "<ulink url='&YOCTO_DOCS_QS_URL;#yp-resources'>Setting Up to Use the Yocto Project</ulink>" | 165 | "<ulink url='&YOCTO_DOCS_QS_URL;#yp-resources'>Setting Up to Use the Yocto Project</ulink>" |
| 399 | section in the Yocto Project Quick Start for options on how | 166 | section in the Yocto Project Quick Start for options on how |
| 400 | to get a build host ready to use the Yocto Project. | 167 | to get a build host ready to use the Yocto Project. |
| 401 | </para></listitem> | 168 | </para></listitem> |
| 402 | <listitem><para> | 169 | <listitem><para> |
| 403 | <emphasis>Establish the Temporary Kernel Source Files</emphasis>: | 170 | <emphasis>Set Up Your Host Development System for Kernel Development:</emphasis> |
| 404 | Temporary kernel source files are kept in the | 171 | It is recommended that you use <filename>devtool</filename> |
| 405 | <ulink url='&YOCTO_DOCS_REF_URL;#build-directory'>Build Directory</ulink> | 172 | and an extensible SDK for kernel development. |
| 406 | created by the OpenEmbedded build system when you run BitBake. | 173 | Alternatively, you can use traditional kernel development |
| 407 | If you have never built the kernel in which you are | 174 | methods with the Yocto Project. |
| 408 | interested, you need to run an initial build to | 175 | Either way, there are steps you need to take to get the |
| 409 | establish local kernel source files.</para> | 176 | development environment ready.</para> |
| 410 | 177 | ||
| 411 | <para>If you are building an image for the first time, you | 178 | <para>Using <filename>devtool</filename> and the eSDK requires |
| 412 | need to get the build environment ready by sourcing an | 179 | that you have a clean build of the image and that you are |
| 413 | environment setup script | 180 | set up with the appropriate eSDK. |
| 414 | (i.e. <filename>oe-init-build-env</filename> or | 181 | For more information, see the |
| 415 | <filename>oe-init-build-env-memres</filename>). | 182 | "<link linkend='getting-ready-to-develop-using-devtool'>Getting Ready to Develop Using <filename>devtool</filename></link>" |
| 416 | You also need to be sure two key configuration files | 183 | section.</para> |
| 417 | (<filename>local.conf</filename> and | 184 | |
| 418 | <filename>bblayers.conf</filename>) are configured | 185 | <para>Using traditional kernel development requires that you |
| 419 | appropriately.</para> | 186 | have the kernel source available in an isolated local Git |
| 420 | 187 | repository. | |
| 421 | <para>The entire process for building an image is overviewed | 188 | For more information, see the |
| 422 | in the | 189 | "<link linkend='getting-ready-for-traditional-kernel-development'>Getting Ready for Traditional Kernel Development</link>" |
| 423 | "<ulink url='&YOCTO_DOCS_QS_URL;#qs-building-images'>Building Images</ulink>" | 190 | section. |
| 424 | section of the Yocto Project Quick Start. | ||
| 425 | You might want to reference this information. | ||
| 426 | You can find more information on BitBake in the | ||
| 427 | <ulink url='&YOCTO_DOCS_BB_URL;'>BitBake User Manual</ulink>. | ||
| 428 | </para> | ||
| 429 | |||
| 430 | <para>The build process supports several types of images to | ||
| 431 | satisfy different needs. | ||
| 432 | See the "<ulink url='&YOCTO_DOCS_REF_URL;#ref-images'>Images</ulink>" | ||
| 433 | chapter in the Yocto Project Reference Manual for information | ||
| 434 | on supported images. | ||
| 435 | </para></listitem> | 191 | </para></listitem> |
| 436 | <listitem><para> | 192 | <listitem><para> |
| 437 | <emphasis>Make Changes to the Kernel Source Code if | 193 | <emphasis>Make Changes to the Kernel Source Code if |
| 438 | applicable</emphasis>: | 194 | applicable:</emphasis> |
| 439 | Modifying the kernel does not always mean directly | 195 | Modifying the kernel does not always mean directly |
| 440 | changing source files. | 196 | changing source files. |
| 441 | However, if you have to do this, you make the changes to the | 197 | However, if you have to do this, you make the changes to the |
| 442 | files in the Build Directory. | 198 | files in the eSDK's Build Directory if you are using |
| 199 | <filename>devtool</filename>. | ||
| 200 | For more information, see the | ||
| 201 | "<link linkend='using-devtool-to-patch-the-kernel'>Using <filename>devtool</filename> to Patch the Kernel</link>" | ||
| 202 | section.</para> | ||
| 203 | |||
| 204 | <para>If you are using traditional kernel development, you | ||
| 205 | edit the source files in the kernel's local Git repository. | ||
| 206 | For more information, see the | ||
| 207 | "<link linkend='using-traditional-kernel-development-to-patch-the-kernel'>Using Traditional Kernel Development to Patch the Kernel</link>" | ||
| 208 | section. | ||
| 443 | </para></listitem> | 209 | </para></listitem> |
| 444 | <listitem><para> | 210 | <listitem><para> |
| 445 | <emphasis>Make Kernel Configuration Changes if | 211 | <emphasis>Make Kernel Configuration Changes if |
| 446 | Applicable</emphasis>: | 212 | Applicable:</emphasis> |
| 447 | If your situation calls for changing the kernel's | 213 | If your situation calls for changing the kernel's |
| 448 | configuration, you can use | 214 | configuration, you can use |
| 449 | <link linkend='generating-configuration-files'><filename>menuconfig</filename></link>, | 215 | <link linkend='generating-configuration-files'><filename>menuconfig</filename></link>, |
| @@ -455,10 +221,7 @@ | |||
| 455 | Try to resist the temptation to directly edit an | 221 | Try to resist the temptation to directly edit an |
| 456 | existing <filename>.config</filename> file, which is | 222 | existing <filename>.config</filename> file, which is |
| 457 | found in the Build Directory among the source code | 223 | found in the Build Directory among the source code |
| 458 | used for the build (e.g. see the workflow illustration | 224 | used for the build. |
| 459 | in the | ||
| 460 | "<link linkend='kernel-modification-workflow'>Kernel Modification Workflow</link>" | ||
| 461 | section). | ||
| 462 | Doing so, can produce unexpected results when the | 225 | Doing so, can produce unexpected results when the |
| 463 | OpenEmbedded build system regenerates the configuration | 226 | OpenEmbedded build system regenerates the configuration |
| 464 | file. | 227 | file. |
| @@ -481,61 +244,15 @@ | |||
| 481 | you interactively set up kernel configurations. | 244 | you interactively set up kernel configurations. |
| 482 | </para></listitem> | 245 | </para></listitem> |
| 483 | <listitem><para> | 246 | <listitem><para> |
| 484 | <emphasis>Rebuild the Kernel Image With Your Changes</emphasis>: | 247 | <emphasis>Rebuild the Kernel Image With Your Changes:</emphasis> |
| 485 | Rebuilding the kernel image applies your changes. | 248 | Rebuilding the kernel image applies your changes. |
| 249 | Depending on your target hardware, you can verify your changes | ||
| 250 | on actual hardware or perhaps QEMU. | ||
| 486 | </para></listitem> | 251 | </para></listitem> |
| 487 | </orderedlist> | 252 | </orderedlist> |
| 488 | </para> | 253 | </para> |
| 489 | </section> | 254 | </section> |
| 490 | 255 | ||
| 491 | <section id='kernel-dev-other-resources'> | ||
| 492 | <title>Other Resources</title> | ||
| 493 | |||
| 494 | <para> | ||
| 495 | The remainder of this manual provides instructions for completing | ||
| 496 | specific Linux kernel development tasks. | ||
| 497 | These instructions assume you are comfortable working with | ||
| 498 | <ulink url='http://openembedded.org/wiki/Bitbake'>BitBake</ulink> | ||
| 499 | recipes and basic open-source development tools. | ||
| 500 | Understanding these concepts will facilitate the process of working | ||
| 501 | with the kernel recipes. | ||
| 502 | If you find you need some additional background, please be sure to | ||
| 503 | review and understand the following documentation: | ||
| 504 | <itemizedlist> | ||
| 505 | <listitem><para> | ||
| 506 | <ulink url='&YOCTO_DOCS_QS_URL;'>Yocto Project Quick Start</ulink> | ||
| 507 | </para></listitem> | ||
| 508 | <listitem><para> | ||
| 509 | <ulink url='&YOCTO_DOCS_SDK_URL;#using-devtool-in-your-sdk-workflow'><filename>devtool</filename> workflow</ulink> | ||
| 510 | as described in the Yocto Project Software Development Kit | ||
| 511 | (SDK) Developer's Guide. | ||
| 512 | </para></listitem> | ||
| 513 | <listitem><para> | ||
| 514 | The | ||
| 515 | "<ulink url='&YOCTO_DOCS_DEV_URL;#understanding-and-creating-layers'>Understanding and Creating Layers</ulink>" section | ||
| 516 | in the Yocto Project Development Manual | ||
| 517 | </para></listitem> | ||
| 518 | <listitem><para> | ||
| 519 | The | ||
| 520 | "<link linkend='kernel-modification-workflow'>Kernel Modification Workflow</link>" | ||
| 521 | section. | ||
| 522 | </para></listitem> | ||
| 523 | </itemizedlist> | ||
| 524 | </para> | ||
| 525 | |||
| 526 | <para> | ||
| 527 | Finally, while this document focuses on the manual creation of | ||
| 528 | recipes, patches, and configuration files, the Yocto Project | ||
| 529 | Board Support Package (BSP) tools are available to automate | ||
| 530 | this process with existing content and work well to create the | ||
| 531 | initial framework and boilerplate code. | ||
| 532 | For details on these tools, see the | ||
| 533 | "<ulink url='&YOCTO_DOCS_BSP_URL;#using-the-yocto-projects-bsp-tools'>Using the Yocto Project's BSP Tools</ulink>" | ||
| 534 | section in the Yocto Project Board Support Package (BSP) Developer's | ||
| 535 | Guide. | ||
| 536 | </para> | ||
| 537 | </section> | ||
| 538 | |||
| 539 | </chapter> | 256 | </chapter> |
| 540 | <!-- | 257 | <!-- |
| 541 | vim: expandtab tw=80 ts=4 | 258 | vim: expandtab tw=80 ts=4 |
