Difference between revisions of "EBC Exercise 23 Configuring the Kernel"

From eLinux.org
Jump to: navigation, search
(bitbake)
(bitbake: Fixed kernel numbering)
Line 30: Line 30:
 
<pre>
 
<pre>
 
  cd ${OETREE}/openembedded
 
  cd ${OETREE}/openembedded
$ bitbake -c clean linux-omap-2.29-r46
+
$ bitbake -c clean linux-omap-2.6.29-r46
$ bitbake -f -c compile linux-omap-2.29-r46
+
$ bitbake -f -c compile linux-omap-2.6.29-r46
 
</pre>
 
</pre>
 
''Note:  These instructions are based on
 
''Note:  These instructions are based on
Line 38: Line 38:
 
This took some three hours on my machine.  Your mileage may vary.  Once done go back to
 
This took some three hours on my machine.  Your mileage may vary.  Once done go back to
 
<pre>
 
<pre>
cd ${OETREE}/angstrom-dev/work/beagleboard/angstrom-linux-gnueabi/linux-omap-2.29-r46
+
cd ${OETREE}/angstrom-dev/work/beagleboard/angstrom-linux-gnueabi/linux-omap-2.6.29-r46
 
ls
 
ls
 
</pre>
 
</pre>
Line 50: Line 50:
 
After saving the configuration changes to update the .config file, it is a simple matter of rerunning the forced compile step from above to rebuild the kernel:
 
After saving the configuration changes to update the .config file, it is a simple matter of rerunning the forced compile step from above to rebuild the kernel:
 
<pre>
 
<pre>
$ bitbake -f -c compile linux-omap-2.6.28
+
$ bitbake -f -c compile linux-omap-2.6.29-r46
$ bitbake -f -c deploy linux-omap-2.6.28
+
$ bitbake -f -c deploy linux-omap-2.6.29-r46
 
</pre>
 
</pre>
 
If your kernel configuration modifications happen to result in the generation of any loadable modules, then you will wind up with another file in the deployment images folder:
 
If your kernel configuration modifications happen to result in the generation of any loadable modules, then you will wind up with another file in the deployment images folder:

Revision as of 20:53, 12 March 2010


There are several ways to get and configure the kernel. You could go to the [www.kernel.org The Linux Kernel Archives] find the ---arm--- branch, download a kernel and patch it for the omap. You could use git to get a kernel. Or you could just use bitbake like we did before.

Let's first learn how to do it the bitbake way. I'll also include some instructions for using git.

bitbake

When you did ECE597 Installing The Ångström Distribution you used bitbake to build console-image. During that build the kernel was downloaded and compiled. If you used the default configure, the source code was removed once it was done. Check and see:

cd ${OETREE}/angstrom-dev/work/beagleboard-angstrom-linux-gnueabi
ls

You should see a directory starting with linux-omap-. The rest of the name tells what version you have. Change to that directory and see what's there:

cd linux-omap-2.29-r46
ls

If you see a git directory, you are in luck. If you see just a temp directory you need to do the following to reload the sources:

cd ${OETREE}/build/conf
gedit local.conf

Find the line near the top that says INHERIT += " rm_work " and comment it out.

# INHERIT += " rm_work "

Save the file and then:

 cd ${OETREE}/openembedded
$ bitbake -c clean linux-omap-2.6.29-r46
$ bitbake -f -c compile linux-omap-2.6.29-r46

Note: These instructions are based on this which is a good reference on finding and modifying the kernel in the oe distribution. In fact, wh1t3s seems to have several nice tips.

This took some three hours on my machine. Your mileage may vary. Once done go back to

cd ${OETREE}/angstrom-dev/work/beagleboard/angstrom-linux-gnueabi/linux-omap-2.6.29-r46
ls

You should now see the git directory. cd to it and look around.

You can now configure the kernel.

sudo apt-get install libqt3-mt-dev
make xconfig

After saving the configuration changes to update the .config file, it is a simple matter of rerunning the forced compile step from above to rebuild the kernel:

$ bitbake -f -c compile linux-omap-2.6.29-r46
$ bitbake -f -c deploy linux-omap-2.6.29-r46

If your kernel configuration modifications happen to result in the generation of any loadable modules, then you will wind up with another file in the deployment images folder:

$ cd ${OETREE}/angstrom-dev/deploy/glibc/images/beagleboard
$ ls