diff options
author | Scott Rifenbark <srifenbark@gmail.com> | 2017-10-03 13:09:54 -0700 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2017-10-06 12:06:34 +0100 |
commit | d7ad579ce547a56fedded2a6b5e531c5c4cda251 (patch) | |
tree | 2bee073cd7e1720fc8aad6f376d731a43b3cae7e /documentation/kernel-dev/kernel-dev-common.xml | |
parent | cb9150394dd430f5829a89bceb3bf5cc7a90dc13 (diff) | |
download | poky-d7ad579ce547a56fedded2a6b5e531c5c4cda251.tar.gz |
kernel-dev: Updates to "Working With Your Own Sources"
Formatting changes for the list.
(From yocto-docs rev: df1201085408eec45d8fbf649e80437299daa0e8)
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-common.xml')
-rw-r--r-- | documentation/kernel-dev/kernel-dev-common.xml | 122 |
1 files changed, 74 insertions, 48 deletions
diff --git a/documentation/kernel-dev/kernel-dev-common.xml b/documentation/kernel-dev/kernel-dev-common.xml index 47a61a1552..2b47eafac8 100644 --- a/documentation/kernel-dev/kernel-dev-common.xml +++ b/documentation/kernel-dev/kernel-dev-common.xml | |||
@@ -2258,23 +2258,29 @@ | |||
2258 | </para> | 2258 | </para> |
2259 | 2259 | ||
2260 | <para> | 2260 | <para> |
2261 | Here are some basic steps you can use to work with your own sources: | 2261 | Here are some basic steps you can use to work with your own |
2262 | sources: | ||
2262 | <orderedlist> | 2263 | <orderedlist> |
2263 | <listitem><para>Copy the <filename>linux-yocto-custom.bb</filename> | 2264 | <listitem><para> |
2265 | <emphasis>Create a Copy of the Kernel Recipe:</emphasis> | ||
2266 | Copy the <filename>linux-yocto-custom.bb</filename> | ||
2264 | recipe to your layer and give it a meaningful name. | 2267 | recipe to your layer and give it a meaningful name. |
2265 | The name should include the version of the Linux kernel you | 2268 | The name should include the version of the Yocto Linux |
2266 | are using (e.g. | 2269 | kernel you are using (e.g. |
2267 | <filename>linux-yocto-myproject_3.19.bb</filename>, | 2270 | <filename>linux-yocto-myproject_4.12.bb</filename>, |
2268 | where "3.19" is the base version of the Linux kernel | 2271 | where "4.12" is the base version of the Linux kernel |
2269 | with which you would be working).</para></listitem> | 2272 | with which you would be working). |
2270 | <listitem><para>In the same directory inside your layer, | 2273 | </para></listitem> |
2271 | create a matching directory | 2274 | <listitem><para> |
2272 | to store your patches and configuration files (e.g. | 2275 | <emphasis>Create a Directory for Your Patches:</emphasis> |
2273 | <filename>linux-yocto-myproject</filename>). | 2276 | In the same directory inside your layer, create a matching |
2277 | directory to store your patches and configuration files | ||
2278 | (e.g. <filename>linux-yocto-myproject</filename>). | ||
2274 | </para></listitem> | 2279 | </para></listitem> |
2275 | <listitem><para>Make sure you have either a | 2280 | <listitem><para> |
2276 | <filename>defconfig</filename> file or configuration | 2281 | <emphasis>Ensure You Have Configurations:</emphasis> |
2277 | fragment files. | 2282 | Make sure you have either a <filename>defconfig</filename> |
2283 | file or configuration fragment files in your layer. | ||
2278 | When you use the <filename>linux-yocto-custom.bb</filename> | 2284 | When you use the <filename>linux-yocto-custom.bb</filename> |
2279 | recipe, you must specify a configuration. | 2285 | recipe, you must specify a configuration. |
2280 | If you do not have a <filename>defconfig</filename> file, | 2286 | If you do not have a <filename>defconfig</filename> file, |
@@ -2283,27 +2289,32 @@ | |||
2283 | $ make defconfig | 2289 | $ make defconfig |
2284 | </literallayout> | 2290 | </literallayout> |
2285 | After running the command, copy the resulting | 2291 | After running the command, copy the resulting |
2286 | <filename>.config</filename> to the | 2292 | <filename>.config</filename> file to the |
2287 | <filename>files</filename> directory as "defconfig" and | 2293 | <filename>files</filename> directory in your layer |
2288 | then add it to the | 2294 | as "defconfig" and then add it to the |
2289 | <ulink url='&YOCTO_DOCS_REF_URL;#var-SRC_URI'><filename>SRC_URI</filename></ulink> | 2295 | <ulink url='&YOCTO_DOCS_REF_URL;#var-SRC_URI'><filename>SRC_URI</filename></ulink> |
2290 | variable in the recipe.</para> | 2296 | variable in the recipe.</para> |
2297 | |||
2291 | <para>Running the <filename>make defconfig</filename> | 2298 | <para>Running the <filename>make defconfig</filename> |
2292 | command results in the default configuration for your | 2299 | command results in the default configuration for your |
2293 | architecture as defined by your kernel. | 2300 | architecture as defined by your kernel. |
2294 | However, no guarantee exists that this configuration is | 2301 | However, no guarantee exists that this configuration is |
2295 | valid for your use case, or that your board will even boot. | 2302 | valid for your use case, or that your board will even boot. |
2296 | This is particularly true for non-x86 architectures. | 2303 | This is particularly true for non-x86 architectures.</para> |
2297 | To use non-x86 <filename>defconfig</filename> files, you | 2304 | |
2298 | need to be more specific and find one that matches your | 2305 | <para>To use non-x86 <filename>defconfig</filename> files, |
2306 | you need to be more specific and find one that matches your | ||
2299 | board (i.e. for arm, you look in | 2307 | board (i.e. for arm, you look in |
2300 | <filename>arch/arm/configs</filename> and use the one that | 2308 | <filename>arch/arm/configs</filename> and use the one that |
2301 | is the best starting point for your board). | 2309 | is the best starting point for your board). |
2302 | </para></listitem> | 2310 | </para></listitem> |
2303 | <listitem><para>Edit the following variables in your recipe | 2311 | <listitem><para> |
2304 | as appropriate for your project: | 2312 | <emphasis>Edit the Recipe:</emphasis> |
2313 | Edit the following variables in your recipe as appropriate | ||
2314 | for your project: | ||
2305 | <itemizedlist> | 2315 | <itemizedlist> |
2306 | <listitem><para><ulink url='&YOCTO_DOCS_REF_URL;#var-SRC_URI'><filename>SRC_URI</filename></ulink>: | 2316 | <listitem><para> |
2317 | <ulink url='&YOCTO_DOCS_REF_URL;#var-SRC_URI'><filename>SRC_URI</filename></ulink>: | ||
2307 | The <filename>SRC_URI</filename> should specify | 2318 | The <filename>SRC_URI</filename> should specify |
2308 | a Git repository that uses one of the supported Git | 2319 | a Git repository that uses one of the supported Git |
2309 | fetcher protocols (i.e. <filename>file</filename>, | 2320 | fetcher protocols (i.e. <filename>file</filename>, |
@@ -2315,24 +2326,32 @@ | |||
2315 | The skeleton recipe provides an example | 2326 | The skeleton recipe provides an example |
2316 | <filename>SRC_URI</filename> as a syntax reference. | 2327 | <filename>SRC_URI</filename> as a syntax reference. |
2317 | </para></listitem> | 2328 | </para></listitem> |
2318 | <listitem><para><ulink url='&YOCTO_DOCS_REF_URL;#var-LINUX_VERSION'><filename>LINUX_VERSION</filename></ulink>: | 2329 | <listitem><para> |
2330 | <ulink url='&YOCTO_DOCS_REF_URL;#var-LINUX_VERSION'><filename>LINUX_VERSION</filename></ulink>: | ||
2319 | The Linux kernel version you are using (e.g. | 2331 | The Linux kernel version you are using (e.g. |
2320 | "3.19").</para></listitem> | 2332 | "4.12"). |
2321 | <listitem><para><ulink url='&YOCTO_DOCS_REF_URL;#var-LINUX_VERSION_EXTENSION'><filename>LINUX_VERSION_EXTENSION</filename></ulink>: | 2333 | </para></listitem> |
2322 | The Linux kernel <filename>CONFIG_LOCALVERSION</filename> | 2334 | <listitem><para> |
2323 | that is compiled into the resulting kernel and visible | 2335 | <ulink url='&YOCTO_DOCS_REF_URL;#var-LINUX_VERSION_EXTENSION'><filename>LINUX_VERSION_EXTENSION</filename></ulink>: |
2336 | The Linux kernel | ||
2337 | <filename>CONFIG_LOCALVERSION</filename> that is | ||
2338 | compiled into the resulting kernel and visible | ||
2324 | through the <filename>uname</filename> command. | 2339 | through the <filename>uname</filename> command. |
2325 | </para></listitem> | 2340 | </para></listitem> |
2326 | <listitem><para><ulink url='&YOCTO_DOCS_REF_URL;#var-SRCREV'><filename>SRCREV</filename></ulink>: | 2341 | <listitem><para> |
2342 | <ulink url='&YOCTO_DOCS_REF_URL;#var-SRCREV'><filename>SRCREV</filename></ulink>: | ||
2327 | The commit ID from which you want to build. | 2343 | The commit ID from which you want to build. |
2328 | </para></listitem> | 2344 | </para></listitem> |
2329 | <listitem><para><ulink url='&YOCTO_DOCS_REF_URL;#var-PR'><filename>PR</filename></ulink>: | 2345 | <listitem><para> |
2330 | Treat this variable the same as you would in any other | 2346 | <ulink url='&YOCTO_DOCS_REF_URL;#var-PR'><filename>PR</filename></ulink>: |
2331 | recipe. | 2347 | Treat this variable the same as you would in any |
2332 | Increment the variable to indicate to the OpenEmbedded | 2348 | other recipe. |
2333 | build system that the recipe has changed. | 2349 | Increment the variable to indicate to the |
2350 | OpenEmbedded build system that the recipe has | ||
2351 | changed. | ||
2334 | </para></listitem> | 2352 | </para></listitem> |
2335 | <listitem><para><ulink url='&YOCTO_DOCS_REF_URL;#var-PV'><filename>PV</filename></ulink>: | 2353 | <listitem><para> |
2354 | <ulink url='&YOCTO_DOCS_REF_URL;#var-PV'><filename>PV</filename></ulink>: | ||
2336 | The default <filename>PV</filename> assignment is | 2355 | The default <filename>PV</filename> assignment is |
2337 | typically adequate. | 2356 | typically adequate. |
2338 | It combines the <filename>LINUX_VERSION</filename> | 2357 | It combines the <filename>LINUX_VERSION</filename> |
@@ -2340,16 +2359,17 @@ | |||
2340 | as derived from the | 2359 | as derived from the |
2341 | <ulink url='&YOCTO_DOCS_REF_URL;#var-SRCPV'><filename>SRCPV</filename></ulink> | 2360 | <ulink url='&YOCTO_DOCS_REF_URL;#var-SRCPV'><filename>SRCPV</filename></ulink> |
2342 | variable. | 2361 | variable. |
2343 | The combined results are a string with | 2362 | The combined results are a string with the |
2344 | the following form: | 2363 | following form: |
2345 | <literallayout class='monospaced'> | 2364 | <literallayout class='monospaced'> |
2346 | 3.19.11+git1+68a635bf8dfb64b02263c1ac80c948647cc76d5f_1+218bd8d2022b9852c60d32f0d770931e3cf343e2 | 2365 | 3.19.11+git1+68a635bf8dfb64b02263c1ac80c948647cc76d5f_1+218bd8d2022b9852c60d32f0d770931e3cf343e2 |
2347 | </literallayout> | 2366 | </literallayout> |
2348 | While lengthy, the extra verbosity in <filename>PV</filename> | 2367 | While lengthy, the extra verbosity in |
2349 | helps ensure you are using the exact | 2368 | <filename>PV</filename> helps ensure you are using |
2350 | sources from which you intend to build. | 2369 | the exact sources from which you intend to build. |
2351 | </para></listitem> | 2370 | </para></listitem> |
2352 | <listitem><para><ulink url='&YOCTO_DOCS_REF_URL;#var-COMPATIBLE_MACHINE'><filename>COMPATIBLE_MACHINE</filename></ulink>: | 2371 | <listitem><para> |
2372 | <ulink url='&YOCTO_DOCS_REF_URL;#var-COMPATIBLE_MACHINE'><filename>COMPATIBLE_MACHINE</filename></ulink>: | ||
2353 | A list of the machines supported by your new recipe. | 2373 | A list of the machines supported by your new recipe. |
2354 | This variable in the example recipe is set | 2374 | This variable in the example recipe is set |
2355 | by default to a regular expression that matches | 2375 | by default to a regular expression that matches |
@@ -2358,18 +2378,24 @@ | |||
2358 | failure. | 2378 | failure. |
2359 | You must change it to match a list of the machines | 2379 | You must change it to match a list of the machines |
2360 | that your new recipe supports. | 2380 | that your new recipe supports. |
2361 | For example, to support the <filename>qemux86</filename> | 2381 | For example, to support the |
2362 | and <filename>qemux86-64</filename> machines, use | 2382 | <filename>qemux86</filename> and |
2383 | <filename>qemux86-64</filename> machines, use | ||
2363 | the following form: | 2384 | the following form: |
2364 | <literallayout class='monospaced'> | 2385 | <literallayout class='monospaced'> |
2365 | COMPATIBLE_MACHINE = "qemux86|qemux86-64" | 2386 | COMPATIBLE_MACHINE = "qemux86|qemux86-64" |
2366 | </literallayout></para></listitem> | 2387 | </literallayout> |
2367 | </itemizedlist></para></listitem> | 2388 | </para></listitem> |
2368 | <listitem><para>Provide further customizations to your recipe | 2389 | </itemizedlist> |
2390 | </para></listitem> | ||
2391 | <listitem><para> | ||
2392 | <emphasis>Customize Your Recipe as Needed:</emphasis> | ||
2393 | Provide further customizations to your recipe | ||
2369 | as needed just as you would customize an existing | 2394 | as needed just as you would customize an existing |
2370 | linux-yocto recipe. | 2395 | linux-yocto recipe. |
2371 | See the "<link linkend='modifying-an-existing-recipe'>Modifying | 2396 | See the |
2372 | an Existing Recipe</link>" section for information. | 2397 | "<link linkend='modifying-an-existing-recipe'>Modifying an Existing Recipe</link>" |
2398 | section for information. | ||
2373 | </para></listitem> | 2399 | </para></listitem> |
2374 | </orderedlist> | 2400 | </orderedlist> |
2375 | </para> | 2401 | </para> |