Posted by: Wildan Maulana | July 9, 2007

build kernel for avr32

avr32-linux README
———————–

This is the AVR32 Linux release for developers

For more info about Linux please visit http://www.kernel.org and http://www.linux.org
For more info about AVR32 Linux please visit http://www.avr32linux.org
For more general info about AVR32 please visit http://www.atmel.com/avr32

To report AVR32 related bugs or get AVR32 support: avr32@atmel.com

Build Requirements
——————

– AVR32 GNU Toolchain
– U-Boot

Installation
————

1) Unpack source code (‘x.x.x’ equals version number):

tar jxf linux-x.x.x.tar.bz2
cd linux-x.x.x

2) Copy dot-config and patch source

cp ../linux-dot-config .config
for i in `cat ../series `; do patch -p1 < ../$i; done

If building on Linux host (not Cygwin):
3) Make old config

make ARCH=avr32 KBUILD_HAVE_NLS=yes oldconfig

4) Make

PATH=”../u-boot-${U_BOOT_VERSION}/tools:$PATH” \
make ARCH=avr32 CROSS_COMPILE=avr32-linux- \
KBUILD_HAVE_NLS=yes $MAKEOPTS

5) Copy image to your AVR32 Linux build directory

cd ..
cp linux-x.x.x/arch/avr32/boot/images/uImage “AVR32 build directory”

If building on Cygwin:
3) Make old config

make ARCH=avr32 KBUILD_HAVE_NLS=no oldconfig

4) Make

PATH=”../u-boot-${U_BOOT_VERSION}/tools:$PATH” \
make ARCH=avr32 CROSS_COMPILE=avr32-linux- \
KBUILD_HAVE_NLS=no $MAKEOPTS

5) Copy image to your AVR32 Linux build directory

cd ..
cp linux-x.x.x/arch/avr32/boot/images/uImage “AVR32 build directory”


Taken from :
avr32-cd/software/linux/README

—–OR—- (From Orange Personal Doc)
Step 3 : Remove/Clean from .o etc
make ARCH=avr32 CROSS_COMPILE=avr32-linux- distclean

Step 4 : Set config to ngw100
make ARCH=avr32 CROSS_COMPILE=avr32-linux- atngw_defconfig

Or on linux-2.6.22 :

make ARCH=avr32 CROSS_COMPILE=avr32-linux- atngw100_defconfig

Step 5 : Configure the kernel
make ARCH=avr32 CROSS_COMPILE=avr32-linux- menuconfig

Step 6 : Build the kernel
make ARCH=avr32 CROSS_COMPILE=avr32-linux-

If you encountered error on step 6, and the error similiar like this :



In file included from include/linux/buffer_head.h:13,
from init/main.c:51:


include/linux/pagemap.h: In function ‘fault_in_pages_readable’:


include/linux/pagemap.h:206: error: read-only variable ‘__gu_val’ used as ‘asm’ output


include/linux/pagemap.h:206: error: read-only variable ‘__gu_val’ used as ‘asm’ output


include/linux/pagemap.h:206: error: read-only variable ‘__gu_val’ used as ‘asm’ output


include/linux/pagemap.h:206: error: read-only variable ‘__gu_val’ used as ‘asm’ output


include/linux/pagemap.h:212: error: read-only variable ‘__gu_val’ used as ‘asm’ output


include/linux/pagemap.h:212: error: read-only variable ‘__gu_val’ used as ‘asm’ output


include/linux/pagemap.h:212: error: read-only variable ‘__gu_val’ used as ‘asm’ output


include/linux/pagemap.h:212: error: read-only variable ‘__gu_val’ used as ‘asm’ output


make[1]: *** [init/main.o] Error 1


make: *** [init] Error 2

Download the following patch :
http://git.kernel.org/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commitdiff_plain;h=8224ca195874525533665bbcd23b6da1e575aa4d

and apply it to the kernel source :

#patch -p1 < ../linux2.6.patch


If you encountered the following error :

In file included from include/linux/selection.h:11,

                 from drivers/char/tty_io.c:103:

include/linux/vt_buffer.h:18:21: error: asm/vga.h: No such file or directory

make[2]: *** [drivers/char/tty_io.o] Error 1

make[1]: *** [drivers/char] Error 2

make: *** [drivers] Error 2

You must disable these two console,

Device Drivers –> Graphics support —>
Console display driver support —>
[ ] VGA text console
< > Framebuffer Console support


Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

Categories

%d bloggers like this: