[[bc10]]
- Contents
#Contents

* Summary [#zc9e1d86]
> 
This article explains Linux kernel-2.6.32 for bc10. This kernel is based upon the kernel of rowboat project, and the~
bc10 specific drivers are added to the kernel. This section shows how to modify the original kernel for bc10. For the~
information of the boot process of bc10 and the installation of kernel image, please visit  [[bc10/booting]].~

* Build kernel-2.6.32 [#ob0f5f32]
** Development environment [#m80ec9b3]
>
Prepare '''toolchain''' for bc10~
Using the '''toolchain''', examine whether the build process is sucessful or not. The details of '''toolchain''' are explained at~
[[bc10/booting]]. 
- [[OpenEmbedded Linux toolchain>http://labs.beatcraft.com/ja/index.php?bc10%2FOpenEmbedded%20Linux]] (arm-angstrom-linux-guneabi-)
-- This is a toolchain of OpenEmbedded Linux, which is used for the development environment of BeagleBoard.

** Configure environment variable [#xd5ae413]
*** OpenEmbedded toolchain [#j6106c4d]
> 
To use '''toolchain''' of OpenEmbedded, the OpenEmbedded development environment is needed to be installed. For the~
installation process of the OpenEmbedded development environment, please refer to [[bc10/OpenEmbedded Linux]]. To~
work with the '''toolchain''', set up the environment variable.~
 export PATH=${WORK_DIR}/OE/angstrom-dev/cross/armv7a/bin:${PATH}
 export ARCH=arm
 export CROSS_COMPILE=arm-angstrom-linux-gnueabi-

** Obtaining source code [#m44d902e]
>
Obtain the source code from its git repository.~
 git clone git://gitorious.org/~bc-dev/rowboat/bc10-rowboat-kernel.git bc10-rowboat-kernel

** Check out git blanch [#paf17fb9]
** Check out git branch [#paf17fb9]
> 
To modify the source code for bc10, its git blanch is checked out.
To modify the source code for bc10, its git branch is checked out.
 cd bc10-rowboat-kernel/
 git checkout -t -b bc10-2.6.32 origin/bc10-2.6.32

** Build [#d1ab3ae4]
> 
To use OpenEmbedded toolchain, make cross-build.
 make omap3_bc10_defconfig
 make uImage
If the build process is successfully completed, ''uImage'' (kernel image file) is generated at the directory shown below. 
- kernel image 
-- arch/arm/bootuImage
Please look at [[bc10/booting]] for the instructions of installing  '''uImage'''.

*** About modules [#i586954f]
>
bc10-rowboat-kernel is already configured the most device drivers for embedded device.  There are basically no issues~
if the modules are not placed. As Android runs on bc10, the modules are not requirements, and these processes shown~
below are not necessary. To boot OpenEmbedded, an warning will appear if the modules are not installed. This is a good~
idea to install the modules for preventing the warning.~

>
This is how to build Kernel modules.
 make modules
The next step is to install the modules. To change the location of its installation later, create a temporal location for~
installing the modules. Create directory inside the directory, and name it '''modwork'''. Install the module at the directory.~
If the destination of the installation is already decided, the value of '''INSTALL_MOD_PATH''' can be replaced with the~
install path.~
 make DEPMOD=echo INSTALL_MOD_PATH=modwork modules_install
 arm-angstrom-linux-gnueabi-depmod-2.6 -A -b ./modwork/ -F ./System.map `make kernelrelease`
Finally, the modules are installed under '''./modwork'''.~
To compress the file, handle the file easily later on. The file can be extracted at the target of the userland.~
 Tar czvf modules.tgz -C ./modwork/ lib   

** Update source code [#q2df16a8]
>
As source code is updated for adding new functions and/or fixing bugs, do not need to obtain the whole source code. It is~
fine to download only the renewed portion of code.~
 cd bc10-rowboat-kernel/
 git checkout bc10-2.6.32
 git pull
After the source code is updated, rebuild and replace '''uImage'''.

* About source code repository [#i59aea55]
>
The source code of bc10-rowboat-kernel is managed by Gitorious.
- Project Page
-- http://gitorious.org/~bc-dev/rowboat/bc10-rowboat-kernel
- repository
-- git://gitorious.org/~bc-dev/rowboat/bc10-rowboat-kernel.git

** Blanch [#s39f0888]
** Branch [#s39f0888]
>
bc10-rowboat-kernel repository has several blanches.
There are three important blanches for bc10. These blanches are:
bc10-rowboat-kernel repository has several branches.
There are three important branch for bc10. These branches are:
- bc10-2.6.32
-- a release blanch for bc10
-- a release branch for bc10
- bc10-2.6.32-develop
-- a blanch for the development of bc10
-- a branch for the development of bc10
- bc10-2.6.32-build 
-- a build blanch for bc10 (this will be removed soon).
-- a build branch for bc10 (this will be removed soon).

>
To build a bootable '''uImage''' for bc10, please use '''bc10-2.6.32'''.~

>
The '''bc10-2.6.32-develop''' blanch is highly experimental. This is used for a test that examines the condition of newly~
added functions. This blanch always has the most updated version of kernel. However, because of its experimental~
nature, it may not work well. The  '''bc10-2.6.32''' blanch is highly recommended for daily use.~
The '''bc10-2.6.32-develop''' branch is highly experimental. This is used for a test that examines the condition of newly~
added functions. This branch always has the most updated version of kernel. However, because of its experimental~
nature, it may not work well. The  '''bc10-2.6.32''' branch is highly recommended for daily use.~

>
The '''bc10-2.6.32-build''' blanch has been used temporarily for a build blanch until MACH_TYPE number was officially~
added. As of writing this article, MACH_TYPE of bc10 is officially supported, and the '''bc10-2.6.32-build''' blanch is no~
longer updated (or maintained). In the near future, the '''bc10-2.6.32-build''' blanch will be removed. Please do NOT~
use the '''bc10-2.6.32-build''' blanch. For the details of this issue, please read README, a document, which is located~
The '''bc10-2.6.32-build''' blanch has been used temporarily for a build branch until MACH_TYPE number was officially~
added. As of writing this article, MACH_TYPE of bc10 is officially supported, and the '''bc10-2.6.32-build''' branch is no~
longer updated (or maintained). In the near future, the '''bc10-2.6.32-build''' branch will be removed. Please do NOT~
use the '''bc10-2.6.32-build''' branch. For the details of this issue, please read README, a document, which is located~
at '''Documentation/arm/README''' in the kernel source.

** Origins [#h255b0c7]
>
The source code of bc10-rowboat-kernel is basically a clone of rowboat kernel repository, and this is specifically~
modified for bc10. The locations of the originals are shown below.
- rowboat kernel
-- http://gitorious.org/rowboat/kernel
- repository 
-- git://gitorious.org/rowboat/kernel.git
- blanch
-- rowboat-eclair-2.6.32

* Explanations for options and others [#a3c83d83]
** Options at booting kernel [#sa0f8a4a]
>
This section explains the details of configurable options at booting kernel. To set up options in kernel, the environment~
variable of U-Boot, '''bootargs''', is used.~
Please look at [[bc10/u-boot]] for the details~.

*** omapdss.def_disp [#xe062bad]
>
It determines a display for visual output. On bc10, one of the two choices can be selected.
- lcd
-- AMOLED output
- dvi
-- DVI outpit

>
Example) Select AMOLED for visual output
 omapdss.def_sisp =lcd
For the details of this option, please look at the directory of '''Documentation/arm/OMAP/DSS''' in the kernel source tree.

*** omapfb.mode [#ab8c97c6]
>
This option sets up the level of resolutions of a display. It theoretically select different resolutions for different monitors;~
however, since the resolution of bc10's AMOLED is fixed at 480x272, this option is only applicable to DVI output for bc10.

>
Example) To set up the DVI output at the level of 1024x768 and 24bit color, and its refresh rate is seted to 60Hz.
 omapfb.mode=dvi:1024x768MR-24@60
Please read the document for the farther information of this option. The document is located under the directory of~
'''Documentation/arm/OMAP/DSS''' in the source tree of kernel.

* Revision History [#uc159e31]
- 2011/01/07 This article is initially uploaded.



Front page   New List of pages Search Recent changes   RSS of recent changes