LeapFrog Pollux Platform: Kernel Configuration

From eLinux.org
Revision as of 22:01, 6 July 2011 by Jrspruitt (talk | contribs) (Make Menuconfig)
Jump to: navigation, search

Summary

There are various options that can be set when compiling a Linux kernel for the LeapFrog Pollux Platform. In the linux-2.6/ kernel directory you will find a file called .config, you may need to turn on "View Hidden Files" or ls -al in terminal to see it. This file is where your configuration options are stored. There are also several default config files listed in the SOURCE_CODE/linux-2.6/arch/arm/configs directory. The ones we are interested in are prefixed with lf1000_. It is recommended that you back up your .config file before making changes or replacing it.

There is two ways to edit your configuration files, either with a text editor, or the make menuconfig GUI. This tutorial will go over the basics of editing your config file. Tutorials referencing this, should supply you with the options you need to configure, which this guide will help you apply.


Using Preexisting Config

LeapFrog provides a couple different config files in their sources, listed in the SOURCE_CODE/linux-2.6/arch/arm/configs directory, prefixed with lf1000_. If one of these files has all the settings you need, or atleast a good start on the ones you want to set, you can easily make it your default config file by running this command.

make <config_file>

This copies the lf1000_<config> file to the main directory and renames it .config, you can then proceed to build your kernel from here, or if you require some more options to be set, continue on.


Make Menuconfig

The GUI editor makes it rather easy to edit your config file, as everything is categorized for you, making options easy to find. To start the menuconfig program, in a terminal move to your LeapFrog Linux source directory of choice, and into the main kernel directory, usually named something like linux-2.6/

From the command line you'll need to import one of the preexisting config files located in /linux-2.6/arch/arm/configs, then you can change it. Run the commands

$ make menu lf1000_<options>_defconfig
$ make menuconfig

Make menuconfig.png


This is the first screen you will see after the program loads. Up/Down arrows move the selection and space enters or selects, while Right/Left moves between Select/Exit/Help. You can use the space bar or Y, N, or M to make your selections. Y=include, N=exclude, and M=Module. Include makes it part of the kernel, while module requires loading it from user space. To navigate out of a category highlight Exit, and hit return, this will back you out until you get to the main screen, if you hit Exit at the main screen it will ask if you would like to save, hit Yes if you're all done and want to keep the changes, or No to close and discard all changes.


Once you are done, and save your configuration, it will update the .config file, and you are ready to compile your kernel with its new options.

Manual Config Editing

If you would prefer to use a text editor, you can open one of the lf1000_<options>_defconfig files in SOURCE_CODE/linux-2.6/arch/arm/configs with your editor of choice. Then save it to your /linux-2.6 directory renaming it .config. You will see a long list of options. Comment out with a # to deselect the option, or uncomment and change "#OPTION is not set" to "OPTION=y" to enable it.