Welcome to AVR32 Linux... Users Groups


Atmel vendor kernels

Download the kernel tarball for the version you want from LinuxPatches. Unpack it to a directory and skip down to "Configure the Kernel".

BSP Kernel:

Note: you should use a new kernel if you can!

First, download and either burn to a CD, or mount the BSP 2.0 ISO image

You can mount the image by,

creating a mount point directory: sudo mkdir /mnt/iso

then mount the file: sudo mount -t iso9660 AVR32_Linux_BSP_CD_Image_2.0.0.iso /mnt/iso -o loop

Make sure, if you haven't already setup the developer tools, to install the packages from the BSP CD. These packages can be found here: /mnt/iso/devel/linux

Also, if you are using the NGW100, and you have not upgraded the firmware yet, do it now. Instructions can be found here

Now it is time to extract the Linux source.

tar -xvf /mnt/iso/software/linux/linux-2.6.18.tar.bz2 -C ~/Desktop

Next, apply the patchset:

(or use the new unified patch)

cd ~/Desktop/linux-2.6.18

for i in `cat /mnt/iso/software/linux/series `; do patch -p1 < /mnt/iso/software/linux/$i; done

You will likely also need this patch if you are using gcc 4.1 or greater. Apply the patch like this: patch -p1 < ../avr32-kernel-2.6.18.patch

You will need this patch if you are building a kernel for the NGW100. Apply the patch like this: patch -p1 < ../add-pioe-gpio-initialization.patch

Configure the kernel:

make ARCH=avr32 KBUILD_HAVE_NLS=yes xconfig

Open your default dot-config file, the default config files for the NGW100 and STK1000 are located in linux-2.6.18/arch/avr32/configs.

Save your .config

If you want to change the kernel name, edit the Makefile and change it now. By default it will be named 2.6.18-at0.

Begin the build:

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

Create the modules directory:

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

Copy to the target:

In older root filesystems, you will find uImage in the root directory. In newer root filesystems the kernel image is in the /boot folder. Below we will assume that your kernel image is in the root directory; if yours is in /boot then substitute as necessary :-). It is a good idea to keep a backup of the stock kernel, so on your target, do the following: mv /uImage /uImage-orig

Then copy arch/avr32/boot/images/uImage in your kernel directory to your target. This may be over FTP, NFS, SAMBA or via an SD card. Place it in your root directory (or in /boot).

Pack up your modules directory on the host: tar -cvf avr32-modules.tar /lib/modules/2.6.18-at0

Now copy the new uImage and modules from ~/Desktop/linux-2.6.18/arch/avr32/boot/images and ~/Desktop/linux-2.6.18/avr32-modules.tar to your target using FTP, NFS, SAMBA, or on an SD memory card.

Unpack the modules onto the target: tar -xvf avr32-modules.tar -C /

Cleanup: rm avr32-modules.tar

Cross your fingers and reboot into your new kernel, by typing: reboot

If something goes wrong:

Connect to the board using the serial port and some application such as minicom. Press space when u-boot starts and enter ls to list files. Type fsload uImage-orig and note the memory address it loads to. Type bootm 0x0xxxxx (0x0xxxxx being the memory address) to boot with your backed up kernel.

You can also restore the original root filesystem to flash using the NGW100 upgrade instructions I mentioned earlier.

-- JohnVoltz - 20 Aug 2007

* avr32-kernel-2.6.18.patch: GCC 4.1 patch

* add-pioe-gpio-initialization.patch: GPIO port E patch for NGW100

* unified-2.6.18.patch.tar.gz: Unified 2.6.18 patch with AC'97 and LCDC fixes

* kernel-patch-2.6.22.atmel.4.tar.gz: Patch and kernel config for 2.6.22.atmel.4 on modified NGW100 (sets up LCD connection and stable kernel preemption)

  File Size Date By Actions
else add-pioe-gpio-initialization.patch
GPIO port E patch for NGW100
1.7 K 2007-08-20 - 15:41 JohnVoltz props, move
else avr32-kernel-2.6.18.patch
GCC 4.1 patch
1.6 K 2007-08-20 - 15:40 JohnVoltz props, move
else kernel-patch-2.6.22.atmel.4.tar.gz
Patch and kernel config for 2.6.22.atmel.4 on modified NGW100
13.3 K 2007-10-15 - 17:09 JohnVoltz props, move
else unified-2.6.18.patch.tar.gz
Unified 2.6.18 patch with AC'97 and LCDC fixes
249.1 K 2007-08-31 - 15:09 JohnVoltz props, move
r11 - 2010-09-20 - 08:04:47 - HaavardSkinnemoen
Copyright © by the contributing authors. All material on this collaboration platform is the property of the contributing authors.
Linux® is the registered trademark of Linus Torvalds in the U.S. and other countries.
Atmel®, AVR® and others are registered trademarks or trademarks of Atmel Corporation or its subsidiaries.
All other trademarks are the property of their respective owners.
Syndicate this site RSSATOM