diff options
author | Scott Rifenbark <scott.m.rifenbark@intel.com> | 2011-08-03 12:05:32 -0700 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2011-08-15 15:26:58 +0100 |
commit | fa1fb04bbb73e45b146d0715d6131434887d4d00 (patch) | |
tree | c97bfcfe429e57e21d029901f51b89324cc16e8c /documentation/dev-manual/dev-manual-kernel-appendix.xml | |
parent | 07544deddca6a885be0133a0a5da89f2e1a365e0 (diff) | |
download | poky-fa1fb04bbb73e45b146d0715d6131434887d4d00.tar.gz |
documentation/dev-manual/dev-manual-kernel-appendix.xml: partial updates
various things going on in the kernel example. Far from complete.
(From yocto-docs rev: 0c0548b79589a606f91bdb39e5a2ece71f4c108e)
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 | 505 |
1 files changed, 305 insertions, 200 deletions
diff --git a/documentation/dev-manual/dev-manual-kernel-appendix.xml b/documentation/dev-manual/dev-manual-kernel-appendix.xml index 8a80d54356..787be3df5d 100644 --- a/documentation/dev-manual/dev-manual-kernel-appendix.xml +++ b/documentation/dev-manual/dev-manual-kernel-appendix.xml | |||
@@ -5,248 +5,355 @@ | |||
5 | 5 | ||
6 | <title>Kernel Modification Example</title> | 6 | <title>Kernel Modification Example</title> |
7 | 7 | ||
8 | <para> | ||
9 | Kernel modification involves changing or adding configurations to an existing kernel, or | ||
10 | adding recipes to the kernel that are needed to support specific hardware features. | ||
11 | The process is similar to creating a Board Support Package (BSP) except that it invloves | ||
12 | isolating your work in a kernel layer and the use of <filename>menuconfig</filename> | ||
13 | to help make configuration data easily identifiable. | ||
14 | </para> | ||
15 | |||
16 | <para> | ||
17 | This section presents a simple example that shows how to modify the kernel. | ||
18 | The example uses a three-step approach that is convenient for making kernel modifications. | ||
19 | <orderedlist> | ||
20 | <listitem><para>Iteratively determine and set kernel configurations and make | ||
21 | kernel recipe changes.</para></listitem> | ||
22 | <listitem><para>Apply your configuration changes to your local kernel layer. | ||
23 | </para></listitem> | ||
24 | <listitem><para>Push your configuration and recipe changes upstream into the | ||
25 | Yocto Project source repositories to make them available to the community. | ||
26 | </para></listitem> | ||
27 | </orderedlist> | ||
28 | </para> | ||
29 | |||
30 | <section id='modifying-a-kernel-example'> | ||
31 | <title>Modifying a Kernel Example</title> | ||
32 | |||
8 | <para> | 33 | <para> |
9 | Kernel modification involves changing or adding configurations to an existing kernel, or | 34 | The example changes kernel configurations to support the VFAT filesystem and |
10 | adding recipes to the kernel that are needed to support specific hardware features. | 35 | allow the user to print out a simple text file from the mounted VFAT filesystem. |
11 | The process is similar to creating a Board Support Package (BSP) except that it invloves | 36 | The filesystem used will be an image filesystem rather than a filesystem on some |
12 | isolating your work in a kernel layer and the use of <filename>menuconfig</filename> | 37 | external drive such as a USB stick or external drive. |
13 | to help make configuration data easily identifiable. | 38 | The example uses the <filename>linux-yocto-2.6.37</filename> kernel. |
14 | </para> | 39 | </para> |
15 | 40 | ||
16 | <para> | 41 | <para> |
17 | This section presents a brief overview of the kernel structure and then provides a simple | 42 | For a general flow of the example, see |
18 | example that shows how to modify the kernel. | 43 | <xref linkend='kernel-modification-workflow'>Kernel Modification Workflow</xref> |
44 | earlier in this manual. | ||
19 | </para> | 45 | </para> |
20 | 46 | ||
21 | <section id='yocto-project-kernel'> | 47 | <section id='setting-up-yocto-project-kernel-example'> |
22 | <title>Yocto Project Kernel Overview</title> | 48 | <title>Setting Up Yocto Project</title> |
23 | 49 | ||
24 | <para> | 50 | <para> |
25 | When one thinks of the source files for a kernel they usually think of a fixed structure | 51 | You need to have the Yocto Project files available on your host system. |
26 | of files that contain kernel patches. | 52 | You can get files through tarball extraction or by cloning the <filename>poky</filename> |
27 | The Yocto Project, however, employs mechanisims that in a sense result in a kernel source | 53 | Git repository. |
28 | generator. | 54 | See the bulleted item |
55 | <link linkend='local-yp-release'>Yocto Project Release</link> in | ||
56 | <xref linkend='getting-setup'>Getting Setup</xref> earlier in this manual | ||
57 | for information on how to get these files. | ||
29 | </para> | 58 | </para> |
30 | 59 | ||
31 | <para> | 60 | <para> |
32 | The Yocto Project uses the source code management (SCM) tool Git to manage and track Yocto | 61 | Once you have the local <filename>poky</filename> Git repository set up, |
33 | Project files. | 62 | you have many development branches from which you can work. |
34 | Git employs branching strategies that effectively produce a tree-like structure whose | 63 | From inside the repository you can see the branch names and the tag names used |
35 | branches represent diversions from more general code. | 64 | in the Git repository using either of the following two commands: |
36 | For example, suppose two kernels are basically identical with the exception of a couple | 65 | <literallayout class='monospaced'> |
37 | different features in each. | 66 | $ git branch -a |
38 | In the Yocto Project source repositories managed by Git a main branch can contain the | 67 | $ git tag -l |
39 | common or shared | 68 | </literallayout> |
40 | parts of the kernel source and two branches that diverge from that common branch can | 69 | For this example we are going to use the Yocto Project 1.1 Release, |
41 | each contain the features specific to the respective kernel. | 70 | which maps to the <filename>1.1</filename> branch in the repository. |
42 | The result is a managed tree whose "leaves" represent the end of a specific path that yields | 71 | These commands create a local branch named <filename>1.1</filename> |
43 | a set of kernel source files necessary for a specific piece of hardware and its features. | 72 | that tracks the remote branch of the same name. |
73 | <literallayout class='monospaced'> | ||
74 | $ cd poky | ||
75 | $ git checkout -b 1.1 origin/1.1 | ||
76 | Switched to a new branch '1.1' | ||
77 | </literallayout> | ||
44 | </para> | 78 | </para> |
45 | 79 | </section> | |
80 | |||
81 | <section id='getting-a-local-copy-of-the-kernel-files'> | ||
82 | <title>Getting a Local Copy of the Kernel Files</title> | ||
83 | |||
46 | <para> | 84 | <para> |
47 | A big advantage to this scheme is the sharing of common features by keeping them in | 85 | You need to have a local copy of the Linux Yocto kernel files on your system. |
48 | "larger" branches that are further up the tree. | 86 | Yocto Project files available on your host system. |
49 | This practice eliminates redundant storage of similar features shared among kernels. | 87 | You must create a local Git repository of these files. |
88 | See the bulleted item | ||
89 | <link linkend='local-kernel-files'>Linux Yocto Kernel</link> in | ||
90 | <xref linkend='getting-setup'>Getting Setup</xref> earlier in this manual | ||
91 | for information on how to get these files. | ||
50 | </para> | 92 | </para> |
93 | </section> | ||
94 | |||
95 | <section id='create-a-layer-for-your-kernel-work'> | ||
96 | <title>Create a Layer for Your Kernel Work</title> | ||
51 | 97 | ||
52 | <para> | 98 | <para> |
53 | When you build the kernel on your development system all files needed for the build | 99 | It is always good to isolate your work using your own layer. |
54 | are taken from the Yocto Project source repositories pointed to by the | 100 | Doing so allows you to experiment and easily start over should things go wrong. |
55 | <filename>SRC_URI</filename> variable and gathered in a temporary work area | 101 | This example uses a layer named <filename>meta-vfatsupport</filename>. |
56 | where they are subsequently used to create the unique kernel. | ||
57 | Thus, in a sense, the process constructs a local source tree specific to your | ||
58 | kernel to generate the new kernel image - a source generator if you will. | ||
59 | </para> | 102 | </para> |
60 | 103 | ||
61 | <para> | 104 | <para> |
62 | For a complete discussion of the Yocto Project kernel's architcture and its branching strategy, | 105 | When you set up a layer for kernel work you should follow general layout |
63 | see the <ulink url='http://www.yoctoproject.org/docs/1.1/kernel-manual/kernel-manual.html'> | 106 | guidelines layers. |
64 | The Yocto Project Kernel Architecture and Use Manual</ulink>. | 107 | For example, if you were creating a BSP you would want to follow the layout |
108 | described in the | ||
109 | <ulink url='http://www.yoctoproject.org/docs/1.1/bsp-guide/bsp-guide.html#bsp-filelayout'> | ||
110 | Example Filesystem Layout</ulink> section of the Board Support Package (BSP) Development | ||
111 | Guide. | ||
112 | For kernel layers, you can start with a skeleton layer | ||
113 | named <filename>meta-skeleton</filename> found in your local | ||
114 | Yocto Project file directory structure (the <filename>poky</filename> Git | ||
115 | repository or the directory structure resulting from unpacking the Yocto Project | ||
116 | release tarball). | ||
65 | </para> | 117 | </para> |
66 | 118 | ||
67 | <para> | 119 | <para> |
68 | You can find a web interface to the Yocto Project source repository at | 120 | To create your kernel layer simply copy the <filename>meta-skeleton</filename> |
69 | <ulink url='http://git.yoctoproject.org/'></ulink>. | 121 | layer and rename it <filename>meta-vfatsupport</filename>. |
70 | Within the interface you will see groups of related source code, each of which can | 122 | The following command sets up the layer inside the <filename>poky</filename> |
71 | be cloned using Git to result in a working Git repository on your local system | 123 | Git repository: |
72 | (referred to as the "local Yocto Project files" in this manual). | 124 | <literallayout class='monospaced'> |
73 | The Yocto Project supports four types of kernels in its source repositories at | 125 | $ cd ~/poky |
74 | <ulink url='http://git.yoctoproject.org/'></ulink>: | 126 | $ cp -r meta-skeleton meta-vfatsupport |
75 | <itemizedlist> | 127 | </literallayout> |
76 | <listitem><para><emphasis><filename>linux-yocto-2.6.34</filename></emphasis> - The | ||
77 | stable Linux Yocto kernel that is based on the Linux 2.6.34 release.</para></listitem> | ||
78 | <listitem><para><emphasis><filename>linux-yocto-2.6.37</filename></emphasis> - The current | ||
79 | Linux Yocto kernel that is based on the Linux 2.6.37 release.</para></listitem> | ||
80 | <listitem><para><emphasis><filename>linux-yocto-dev</filename></emphasis> - A development | ||
81 | kernel based on the Linux 2.6.39-rc1 release.</para></listitem> | ||
82 | <listitem><para><emphasis><filename>linux-2.6</filename></emphasis> - A kernel based on | ||
83 | minimal Linux mainline tracking. | ||
84 | [WRITER'S NOTE: I don't know which Git repository the user needs to clone to get this | ||
85 | repository on their development system.]</para></listitem> | ||
86 | </itemizedlist> | ||
87 | </para> | 128 | </para> |
88 | </section> | ||
89 | 129 | ||
90 | <section id='modifying-a-kernel-example'> | 130 | <para> |
91 | <title>Modifying a Kernel Example</title> | 131 | In the new layer you will find areas for configuration changes |
132 | (<filename>conf</filename>) and recipe changes (<filename>recipes-skeleton</filename>). | ||
133 | </para> | ||
92 | 134 | ||
93 | <para> | 135 | <para> |
94 | This section presents a simple example that illustrates kernel modification | 136 | You need to modify the structure a bit for your work. |
95 | based on the <filename>linux-yocto-2.6.37</filename> kernel. | 137 | These commands add some further structure and names that the Yocto Project build |
96 | The example uses the audio and mixer capabilities supported by the | 138 | environment expect: |
97 | <ulink url='http://www.alsa-project.org/main/index.php/Main_Page'>Advanced Linux | 139 | <literallayout class='monospaced'> |
98 | Sound Architecture (ALSA) Project</ulink>. | 140 | $ mkdir meta-vfatsupport/images |
99 | As the example progresses you will see how to do the following: | 141 | $ mkdir meta-vfatsupport/recipes-bsp |
100 | <itemizedlist> | 142 | $ mv meta-vfatsupport/recipes-skeleton meta-vfatsupport/recipes-kernel |
101 | <listitem><para>Iteratively modify a base kernel locally.</para></listitem> | 143 | $ mkdir meta-vfatsupport/recipes-kernel/linux |
102 | <listitem><para>Provide a recipe-based solution for your modified kernel. | 144 | $ mkdir meta-vfatsupport/recipes-kernel/linux/linux-yocto |
103 | </para></listitem> | 145 | </literallayout> |
104 | <listitem><para>Proved an "in-tree" solution for your modified kernel | ||
105 | (i.e. make the modifcations part of the Yocto Project).</para></listitem> | ||
106 | </itemizedlist> | ||
107 | </para> | 146 | </para> |
108 | 147 | ||
109 | <para> | 148 | <para> |
110 | The example flows as follows: | 149 | The last piece you need for your layer is a |
150 | <filename>linux-yocto_git.bbappend</filename> file inside | ||
151 | <filename>meta-vfatsupport/recipes-kernel/linux</filename>. | ||
152 | This file needs the following content to make the build process aware of the | ||
153 | new layer's location: | ||
154 | <literallayout class='monospaced'> | ||
155 | FILESEXTRAPATHS := "${THISDIR}/${PN}" | ||
156 | </literallayout> | ||
111 | </para> | 157 | </para> |
112 | 158 | ||
113 | <para> | 159 | <para> |
114 | <itemizedlist> | 160 | [WRITER'S NOTE: We need a better <filename>meta-skeleton</filename> layer |
115 | <listitem><para>Be sure your host development system is set up to support | 161 | that is part of <filename>poky</filename>. |
116 | development using the Yocto Project. | 162 | It should have a structure that includes <filename>images</filename>, |
117 | See | 163 | <filename>recipes-bsp</filename>, <filename>recipes-kernel</filename>, and |
118 | <ulink url='http://www.yoctoproject.org/docs/1.1/yocto-project-qs/yocto-project-qs.html#the-linux-distro'> | 164 | so forth. |
119 | The Linux Distributions</ulink> section and | 165 | For now this step of the example is brute-forcing the structure with shell |
120 | <ulink url='http://www.yoctoproject.org/docs/1.1/yocto-project-qs/yocto-project-qs.html#packages'> | 166 | commands to set up the minimum structure and include the |
121 | The Packages</ulink> section both | 167 | <filename>.bbappend</filename> file. |
122 | in the Yocto Project Quick Start for requirements. | ||
123 | You will also need a release of Yocto Project installed on the host.</para></listitem> | ||
124 | <listitem><para>Set up your environment for optimal local kernel development. | ||
125 | </para></listitem> | ||
126 | <listitem><para>Create a layer to isolate your kernel work.</para></listitem> | ||
127 | <listitem><para>Next item.</para></listitem> | ||
128 | <listitem><para>Next item.</para></listitem> | ||
129 | <listitem><para>Next item.</para></listitem> | ||
130 | <listitem><para>Next item.</para></listitem> | ||
131 | </itemizedlist> | ||
132 | </para> | 168 | </para> |
169 | </section> | ||
133 | 170 | ||
134 | <section id='setting-up-yocto-project-kernel-example'> | 171 | <section id='prepare-to-use-menuconfig'> |
135 | <title>Setting Up Yocto Project</title> | 172 | <title>Prepare to use <filename>menuconfig</filename></title> |
173 | |||
174 | <para> | ||
175 | The <filename>menuconfig</filename> tool provides an interactive method with which | ||
176 | to set kernel configurations. | ||
177 | In order to use <filename>menuconfig</filename> from within the BitBake environment | ||
178 | you need to source an environment setup script. | ||
179 | This script is located in the local Yocto Project file structure and is called | ||
180 | <filename>oe-init-build-env</filename>. | ||
181 | </para> | ||
136 | 182 | ||
137 | <para> | 183 | <para> |
138 | You need to have the Yocto Project files available on your host system. | 184 | The following command sets up the environment: |
139 | The process is identical to that described in the | 185 | <literallayout class='monospaced'> |
140 | <xref linkend='getting-setup'>"Getting Setup"</xref> section earlier in this | 186 | $ cd ~/poky |
141 | manual. | 187 | $ source oe-init-build-env |
142 | Be sure to either set up a local Git repository for <filename>poky</filename> | 188 | </literallayout> |
143 | or download and unpack the Yocto Project release tarball. | 189 | </para> |
144 | </para> | 190 | </section> |
145 | </section> | ||
146 | 191 | ||
147 | <section id='create-a-git-repository-of-poky-extras'> | 192 | <section id='make-configuration-changes-to-the-kernel'> |
148 | <title>Create a Git Repository of <filename>poky-extras</filename></title> | 193 | <title>Make Configuration Changes to the Kernel</title> |
194 | |||
195 | <para> | ||
196 | After setting up the environment to run <filename>menuconfig</filename> you are ready | ||
197 | to use the tool to interactively change the kernel configuration. | ||
198 | In this example we are basing our changes on the <filename>linux-yocto-2.6.37</filename> | ||
199 | kernel. | ||
200 | The Yocto Project build environment recognizes this kernel as | ||
201 | <filename>linux-yocto</filename>. | ||
202 | Thus, the following command from the shell in which you previously sourced the | ||
203 | environment initialization script launches <filename>menuconfig</filename>: | ||
204 | <literallayout class='monospaced'> | ||
205 | $ bitbake linux-yocto -c menuconfig | ||
206 | </literallayout> | ||
207 | </para> | ||
149 | 208 | ||
150 | <para> | 209 | <para> |
151 | Everytime you change a configuration or add a recipe to the kernel you need to | 210 | [WRITER'S NOTE: Stuff from here down are crib notes] |
152 | do a fetch from the Linux Yocto kernel source repositories. | 211 | </para> |
153 | This can get tedious and time consuming if you need to fetch the entire | ||
154 | Linux Yocto 2.6.37 Git repository down from the Internet everytime you make a change | ||
155 | to the kernel. | ||
156 | </para> | ||
157 | 212 | ||
158 | <para> | 213 | <para> |
159 | You can get around this by setting up a <filename>meta-kernel-dev</filename> | 214 | Once menuconfig fires up you see all kinds of categories that you can interactively |
160 | area on your local system. | 215 | investigate. |
161 | This area contains "append" files for every kernel recipe, which also include | 216 | If they have an "M" in it then the feature is "modularized". |
162 | a <filename>KSRC</filename> statement that points to the kernel source files. | 217 | I guess that means that means that it needs to be manually linked in when the |
163 | You can set up the environment so that the <filename>KSRC</filename> points to the | 218 | kernel is booted??? (Not sure). |
164 | <filename>meta-kernel-dev</filename>, thus pulling source from a local area. | 219 | If they have an "*" then the feature is automatically part of the kernel.] |
165 | This setup can speed up development time. | 220 | </para> |
166 | </para> | ||
167 | |||
168 | <para> | ||
169 | To get set up you need to do two things: create a local Git repository | ||
170 | of the <filename>poky-extras</filename> repository, and create a bare clone of the | ||
171 | Linux Yocto 2.6.37 kernel Git repository. | ||
172 | </para> | ||
173 | |||
174 | <para> | ||
175 | The following transcript shows how to clone the <filename>poky-extras</filename> | ||
176 | Git repository into the current working directory, which is <filename>poky</filename> | ||
177 | in this example. | ||
178 | The command creates the repository in a directory named <filename>poky-extras</filename>: | ||
179 | <literallayout class='monospaced'> | ||
180 | $ git clone git://git.yoctoproject.org/poky-extras | ||
181 | Initialized empty Git repository in /home/scottrif/poky/poky-extras/.git/ | ||
182 | remote: Counting objects: 532, done. | ||
183 | remote: Compressing objects: 100% (472/472), done. | ||
184 | remote: Total 532 (delta 138), reused 307 (delta 39) | ||
185 | Receiving objects: 100% (532/532), 534.28 KiB | 362 KiB/s, done. | ||
186 | Resolving deltas: 100% (138/138), done. | ||
187 | </literallayout> | ||
188 | </para> | ||
189 | 221 | ||
190 | <para> | 222 | <para> |
191 | This transcript shows how to clone a bare Git repository of the Linux Yocto | 223 | So the tmp/work/ area was created in poky and there is a .config file in there and |
192 | 2.6.37 kernel: | 224 | a .config.old file. |
193 | <literallayout class='monospaced'> | 225 | The old one must have been created when I exited from menuconfig after poking around |
194 | $ git clone --bare git://git.yoctoproject.org/linux-yocto-2.6.37 | 226 | a bit. |
195 | Initialized empty Git repository in /home/scottrif/linux-yocto-2.6.37.git/ | 227 | Nope - appears to just be created automatically. |
196 | remote: Counting objects: 1886034, done. | 228 | </para> |
197 | remote: Compressing objects: 100% (314326/314326), done. | ||
198 | remote: Total 1886034 (delta 1570202), reused 1870335 (delta 1554798) | ||
199 | Receiving objects: 100% (1886034/1886034), 401.51 MiB | 714 KiB/s, done. | ||
200 | Resolving deltas: 100% (1570202/1570202), done. | ||
201 | </literallayout> | ||
202 | </para> | ||
203 | 229 | ||
204 | <para> | 230 | <para> |
205 | The bare clone of the Linux Yocto 2.6.37 kernel on your local system mirrors | 231 | A good practice is to first determine what configurations you have for the kernel. |
206 | the upstream repository of the kernel. | 232 | You can see the results by looking in the .config file in the build/tmp/work/qemux86-poky-linux area |
207 | You can effectively point to this local clone now during development to avoid | 233 | of the local YP files. |
208 | having to fetch the entire Linux Yocto 2.6.37 kernel every time you make a | 234 | There is a directory named linux-yocto-2.6.37* in the directory. |
209 | kernel change. | 235 | In that directory is a directory named linux-qemux86-standard-build. |
210 | </para> | 236 | In that directory you will find a file named .config that is the configuration file |
211 | </section> | 237 | for the kernel that will be used when you build the kernel. |
238 | You can open that file up and examine it. | ||
239 | If you do a search for "VFAT" you will see that that particular configuration is not | ||
240 | enabled for the kernel. | ||
241 | This means that you cannot print a VFAT text file, or for that matter, even mount one | ||
242 | from the image if you were to build it at this point. | ||
243 | </para> | ||
212 | 244 | ||
213 | <section id='create-a-layer-for-your-kernel-work'> | 245 | <para> |
214 | <title>Create a Layer for Your Kernel Work</title> | 246 | You can prove the point by actually trying it at this point. |
247 | Here are the commands: | ||
248 | <literallayout class='monospaced'> | ||
249 | $ mkdir ~/vfat-test | ||
250 | $ cd ~/vfat-test | ||
251 | $ dd if=/dev/zero of=vfat.img bs=1024 count=5000 [creates a 5MB disk image] | ||
252 | 5+0 records in | ||
253 | 5+0 records out | ||
254 | 5242880 bytes (5.2 MB) copied, 0.00798912 s, 656 MB/s | ||
255 | $ ls -lah [lists the contents of the new image. l=long, a=all, h=human readable] | ||
256 | total 5.1M | ||
257 | drwxr-xr-x 2 srifenbark scottrif 4.0K 2011-08-01 08:18 . | ||
258 | drwxr-xr-x 66 srifenbark scottrif 4.0K 2011-08-01 08:14 .. | ||
259 | -rw-r--r-- 1 srifenbark scottrif 5.0M 2011-08-01 08:18 vfat.img | ||
260 | $ mkfs.vfat vfat.img [formats the disk image] | ||
261 | mkfs.vfat 3.0.7 (24 Dec 2009) | ||
262 | $ mkdir mnt [mounts the disk image] | ||
263 | $ sudo su [gives you root privilege] | ||
264 | # mount -o loop vfat.img mnt [mounts it as a loop device] | ||
265 | # ls mnt [shows nothing in mnt] | ||
266 | # mount [lists the mounted filesystems - note/dev/loop0] | ||
267 | /dev/sda1 on / type ext4 (rw,errors=remount-ro) | ||
268 | proc on /proc type proc (rw,noexec,nosuid,nodev) | ||
269 | none on /sys type sysfs (rw,noexec,nosuid,nodev) | ||
270 | none on /sys/fs/fuse/connections type fusectl (rw) | ||
271 | none on /sys/kernel/debug type debugfs (rw) | ||
272 | none on /sys/kernel/security type securityfs (rw) | ||
273 | none on /dev type devtmpfs (rw,mode=0755) | ||
274 | none on /dev/pts type devpts (rw,noexec,nosuid,gid=5,mode=0620) | ||
275 | none on /dev/shm type tmpfs (rw,nosuid,nodev) | ||
276 | none on /var/run type tmpfs (rw,nosuid,mode=0755) | ||
277 | none on /var/lock type tmpfs (rw,noexec,nosuid,nodev) | ||
278 | none on /lib/init/rw type tmpfs (rw,nosuid,mode=0755) | ||
279 | binfmt_misc on /proc/sys/fs/binfmt_misc type binfmt_misc (rw,noexec,nosuid,nodev) | ||
280 | gvfs-fuse-daemon on /home/scottrif/.gvfs type fuse.gvfs-fuse-daemon (rw,nosuid,nodev,user=srifenbark) | ||
281 | /dev/loop0 on /home/scottrif/vfat-test/mnt type vfat (rw) | ||
282 | # echo "hello world" > mnt/hello.txt [creates a text file in the mounted VFAT system] | ||
283 | # ls mnt [verifies the file is there] | ||
284 | hello.txt | ||
285 | # cat mnt/hello.txt [displays the contents of the file created] | ||
286 | hello world | ||
287 | # umount mnt [unmounts the system and destroys the loop] | ||
288 | # exit [gets out of privileged user mode] | ||
289 | exit | ||
290 | |||
291 | $ lsmod [this stuff Darren did to show me ] | ||
292 | Module Size Used by [the status of modules in the regular linux kernel] | ||
293 | nls_iso8859_1 4633 0 | ||
294 | nls_cp437 6351 0 | ||
295 | vfat 10866 0 | ||
296 | fat 55350 1 vfat | ||
297 | snd_hda_codec_atihdmi 3023 1 | ||
298 | binfmt_misc 7960 1 | ||
299 | snd_hda_codec_realtek 279008 1 | ||
300 | ppdev 6375 0 | ||
301 | snd_hda_intel 25805 2 | ||
302 | fbcon 39270 71 | ||
303 | tileblit 2487 1 fbcon | ||
304 | font 8053 1 fbcon | ||
305 | bitblit 5811 1 fbcon | ||
306 | snd_hda_codec 85759 3 snd_hda_codec_atihdmi,snd_hda_codec_realtek,snd_hda_intel | ||
307 | softcursor 1565 1 bitblit | ||
308 | snd_seq_dummy 1782 0 | ||
309 | snd_hwdep 6924 1 snd_hda_codec | ||
310 | vga16fb 12757 0 | ||
311 | snd_pcm_oss 41394 0 | ||
312 | snd_mixer_oss 16299 1 snd_pcm_oss | ||
313 | snd_pcm 87946 3 snd_hda_intel,snd_hda_codec,snd_pcm_oss | ||
314 | vgastate 9857 1 vga16fb | ||
315 | snd_seq_oss 31191 0 | ||
316 | snd_seq_midi 5829 0 | ||
317 | snd_rawmidi 23420 1 snd_seq_midi | ||
318 | radeon 744506 3 | ||
319 | snd_seq_midi_event 7267 2 snd_seq_oss,snd_seq_midi | ||
320 | ttm 61007 1 radeon | ||
321 | snd_seq 57481 6 snd_seq_dummy,snd_seq_oss,snd_seq_midi,snd_seq_midi_event | ||
322 | drm_kms_helper 30742 1 radeon | ||
323 | snd_timer 23649 2 snd_pcm,snd_seq | ||
324 | snd_seq_device 6888 5 snd_seq_dummy,snd_seq_oss,snd_seq_midi,snd_rawmidi,snd_seq | ||
325 | usb_storage 50377 0 | ||
326 | snd 71283 16 \ | ||
327 | snd_hda_codec_realtek,snd_hda_intel,snd_hda_codec, \ | ||
328 | snd_hwdep,snd_pcm_oss,snd_mixer_oss,snd_pcm, \ | ||
329 | snd_seq_oss,snd_rawmidi,snd_seq,snd_timer,snd_seq_device | ||
330 | soundcore 8052 1 snd | ||
331 | psmouse 65040 0 | ||
332 | drm 198886 5 radeon,ttm,drm_kms_helper | ||
333 | i2c_algo_bit 6024 1 radeon | ||
334 | serio_raw 4918 0 | ||
335 | snd_page_alloc 8500 2 snd_hda_intel,snd_pcm | ||
336 | dell_wmi 2177 0 | ||
337 | dcdbas 6886 0 | ||
338 | lp 9336 0 | ||
339 | parport 37160 2 ppdev,lp | ||
340 | usbhid 41116 0 | ||
341 | ohci1394 30260 0 | ||
342 | hid 83888 1 usbhid | ||
343 | ieee1394 94771 1 ohci1394 | ||
344 | tg3 122382 0 | ||
345 | </literallayout> | ||
346 | </para> | ||
347 | </section> | ||
348 | </section> | ||
349 | </appendix> | ||
215 | 350 | ||
216 | <para> | ||
217 | It is always good to isolate your work using your own layer. | ||
218 | Doing so allows you to experiment and easily start over should things go wrong. | ||
219 | This example uses a layer named <filename>meta-amixer</filename>. | ||
220 | </para> | ||
221 | 351 | ||
222 | <para> | 352 | <!-- |
223 | When you set up a layer for kernel work you should follow the general layout | ||
224 | guidelines as described for BSP layers. | ||
225 | This layout is described in the | ||
226 | <ulink url='http://www.yoctoproject.org/docs/1.1/bsp-guide/bsp-guide.html#bsp-filelayout'> | ||
227 | Example Filesystem Layout</ulink> section of the Board Support Package (BSP) Development | ||
228 | Guide. | ||
229 | In the standard layout you will notice a suggested structure for recipes and | ||
230 | configuration information. | ||
231 | [WRITER'S NOTE: The <filename>meta-elc</filename> example uses an | ||
232 | <filename>images</filename> directory. | ||
233 | Currently, <filename>images</filename> is not part of the standard BSP layout. | ||
234 | I need to find out from Darren if this directory is required for kernel work.] | ||
235 | </para> | ||
236 | 353 | ||
237 | <para> | 354 | EXTRA STUFF I MIGHT NEED BUT NOW SURE RIGHT NOW. |
238 | [WRITER'S NOTE: I need a paragraph here describing how to set up the layer. | ||
239 | I am not sure if you should copy an existing BSP layer and modify from there. | ||
240 | Or, if you should just look at a BSP layer and then create your own files. | ||
241 | Email to Darren on this but no answer yet.] | ||
242 | </para> | ||
243 | </section> | ||
244 | 355 | ||
245 | <section id='making-changes-to-your-kernel-layer'> | 356 | In the standard layer structure you have several areas that you need to examine or |
246 | <title>Making Changes to Your Kernel Layer</title> | ||
247 | |||
248 | <para> | ||
249 | In the standard layer structure you have several areas that you need to examine or | ||
250 | modify. | 357 | modify. |
251 | For this example the layer contains four areas: | 358 | For this example the layer contains four areas: |
252 | <itemizedlist> | 359 | <itemizedlist> |
@@ -375,10 +482,8 @@ | |||
375 | The file can also contain <filename>KERNEL_FEATURES</filename> statements that specify | 482 | The file can also contain <filename>KERNEL_FEATURES</filename> statements that specify |
376 | included kernel configurations that ship with the Yocto Project. | 483 | included kernel configurations that ship with the Yocto Project. |
377 | </para> | 484 | </para> |
378 | </section> | 485 | --> |
379 | </section> | ||
380 | 486 | ||
381 | </appendix> | ||
382 | <!-- | 487 | <!-- |
383 | vim: expandtab tw=80 ts=4 | 488 | vim: expandtab tw=80 ts=4 |
384 | --> | 489 | --> |