Help building custom Kernel

Hello,
Ive been looking over the directions on how to build custom u-boot
xloader and kernel. Im able to build the u-boot and xloader how ever
when i try to build the kernel it always builds for the host machine.
ive saw some where that i have to set the compiler machine to Arm but
im not sure how to do that using the code sourcery pre-built
toolchain. any help would be apreciated. also if anyone could help
with trying to build a file system for the beagle board that would
also be aprecciated.

Thank you all,
Dave

At Linux PC machine:

export OETREE="${HOME}/OE"
mkdir -p ${OETREE} && cd ${OETREE}
git clone git://git.openembedded.org/openembedded.git openembedded
cd openembedded
git checkout origin/stable/2009 -b stable/2009

cd ${OETREE}/openembedded
git pull

mkdir -p ${OETREE}/build/conf

cp ${OETREE}/openembedded/contrib/angstrom/local.conf ${OETREE}/build/conf/

Add a string to the end of the local.conf file:
MACHINE=“beagleboard”

cd ${OETREE}
wget http://www.angstrom-distribution.org/files/source-me.txt
source source-me.txt

cd ${OETREE}/build
bitbake console-image
bitbake x11-image

The resulting files will be in the directory “${OETREE}/angstrom-dev/deploy/glibc/images/beagleboard”
Need x-loader? bitbake x-loader

regards,
Max

2010/8/19 Dave <harrisdf40@gmail.com>

As you're already using the codesourcery cross compiler, you just need to use it
while building your kernel.

Example:
export PATH=$PATH:/path/to/your/codesourcery/toolchain/bin
make ARCH=arm CROSS_COMPILE=arm-none-linux-gnueabi- menuconfig
make ARCH=arm CROSS_COMPILE=arm-none-linux-gnueabi- uImage
or
make ARCH=arm CROSS_COMPILE=arm-none-linux-gnueabi- deb-pkg # to generate a deb file

Cheers,

Thank you Max for the quick reply. I was wondering if anyone knew how to build a kernel from source files?

Dave

Dave,

there is a second part of instructions to build your custom Kernel. Just follow my first mail to build the OE environment than comment the line in $OETREE/build/conf/local.conf:
#INHERIT += " rm_work "

Now:
bitbake virtual/kernel -c clean; bitbake virtual/kernel

So in the directory “$OETREE/angstrom-dev/work/beagleboard-angstrom-linux-gnueabi/linux-omap-2.6.29-r46/git” you can find sources with all patches applied. Insert any changes and you can compile the kernel with OE-toolchain. Just copy defconfig from the directory a level upper and:

make ARCH=arm CROSS_COMPILE=$OETREE/angstrom-dev/cross/armv7a/bin/arm-angstrom-linux-gnueabi- menuconfig
make ARCH=arm CROSS_COMPILE=$OETREE/angstrom-dev/cross/armv7a/bin/arm-angstrom-linux-gnueabi- uImage

2010/8/19 Dave <harrisdf40@gmail.com>

In the top Makefile of the kernel source tree make sure the following two lines look like this:

ARCH ?= arm
CROSS_COMPILE ?= arm-none-linux-gnueabi-

You could also specify these as arguments to make.

Maciej