Difference between revisions of "Kernel build instructions"
(added kernel build instructions) |
m |
||
Line 39: | Line 39: | ||
</source> | </source> | ||
and it should build you uImage and place it in arch/arm/boot/ . You can now use it to boot from SD (recommended) or replace the one in your flash. | and it should build you uImage and place it in arch/arm/boot/ . You can now use it to boot from SD (recommended) or replace the one in your flash. | ||
+ | |||
+ | [[Category:Development]] |
Revision as of 20:07, 30 November 2008
Note: these instructions are written for Linux users, but may work under windows with cygwin.
Preparation
First you need a toolchain and several other tools. Usually CodeSourcery's ARM GNU/Linux tool chain is used to build OMAP3 kernels, but other variations can be used as well. For CodeSourcery, 2007q3 version is recommended (click "all versions" in above page, as 2008q1 and 2008q3 produce bad code in some situations. See BeagleBoard page for more information. Next you need to have git installed, so use your packet manager or build it from source. Finally you need to have 'mkimage' tool in PATH, which can be built as part of u-boot build process, or simply downloaded here.
Cloning and switching branches
Now you need to 'clone' kernel source using git tools from previous step. Make a directory you want to keep source in and cd into it. Then run:
git clone git://openpandora.org/pandora-kernel.git
This will now download the source from openpandora.org. Note that it will take a while, so be patient. When done, you will have default 'master' branch checked out, but it doesn't have the latest files, so you need to checkout the current 'pandora-27-omap1' branch:
git checkout --track -b pandora-27-omap1 origin/pandora-27-omap1
Building
To build you need to have several environment variables set. If you don't have your toolchain in PATH, you need to add it there:
export PATH=$PATH:/path/to/arm-2007q3/bin
You also need to have CROSS_COMPILE set:
export CROSS_COMPILE=arm-none-linux-gnueabi-
Now set up the default .config file:
make omap3_pandora_defconfig
If you want to customize kernel features, run
make menuconfig
When finished, just run
make
and it should build you uImage and place it in arch/arm/boot/ . You can now use it to boot from SD (recommended) or replace the one in your flash.