Linux Kernel

Introduction

Pre-built images

  SAM9M10 MCU SAM9G45 MCU SAM9X5 MCU
Nandflash Booting linux-2.6.39-sam9m10-nf-uImage linux-2.6.39-sam9g45-nf-uImage linux-2.6.39-sam9x5-nf-uImage
SD Card Booting linux-2.6.39-sam9m10-sd-uImage linux-2.6.39-sam9g45-sd-uImage linux-2.6.39-sam9x5-sd-uImage

Android4SAM pre-built kernel image is included in Android4SAM demo package. It is of U-Boot format.

Download

AT91 Linux Kernel Source

Linux Kernel revision Vanilla Linux Kernel Atmel patch Android kernel patch Android4SAM patch
Linux 2.6.39 linux-2.6.39.tar.bz2 2.6.39-at91-exp.tar.gz linux-2.6.39.diff linux-2.6.39_Android-2.3.7_r1.diff

Warning, important You need to apply the patch from left to right orderly.

Patch Description

Atmel Patch (2.6.39-at91-exp.tar.gz):
  • Support for AT91SAM9x5 family (SAM9G15, SAM9G25, SAM9X25, SAM9G35 and SAM9X35)
  • DMA use on SD/MMC, SSC (I2S) audio, SPI and NAND flash peripherals
  • NAND hardware ECC support using PMECC controller
  • LCD with overlays and 2D acceleration
  • ISI support using Video4Linux2 SoC interface
  • Qtouch touch button
  • CAN bus support for SA

Android4SAM Patch (linux-2.6.39_Android-2.3.7_r1.diff)
  • Add hardware video decoder driver for sam9m10 chip NEW
  • Add ISI driver for camera applicaton NEW
  • Add dummy battery driver which is needed for android
  • Add LCD double buffer driver which is needed for android
  • Modify the NAND flash partition table
  • Modify touchscreen driver to make it more accurate
  • Modify LCD driver to make it not flicker under android
  • Modify button driver to make the button work well under android
  • Add QT1070 button support on 5-Series EK boards

Build

Get and Patch

To get an experimental Android4SAM kernel up and running on an AT91 product, please go through the following steps:

1. Download the corresponding Linux kernel, for example, we use 2.6.39 kernel.

$ wget http://www.kernel.org/pub/linux/kernel/v2.6/linux-2.6.39.tar.bz2
$ tar xvjf linux-2.6.39.tar.bz2

2. Download the ATMEL's patch and apply it

$ wget ftp://ftp.linux4sam.org/pub/Android4SAM/v2.1/patches/2.6.39-at91-exp.tar.gz
$ tar zxvf 2.6.39-at91-exp.tar.gz
$ cd linux-2.6.39
$ for i in ../2.6.39-at91-exp/*; do patch -p1 < $i; done
$ cd ..

3. Download the Android kernel patch and apply it

$ wget ftp://ftp.linux4sam.org/pub/Android4SAM/v2.1/patches/linux-2.6.39.diff
$ cd linux-2.6.39
$ patch -p1 < ../linux-2.6.39.diff
$ cd ..

4. Download Android4SAM patch and apply it

$ wget ftp://ftp.linux4sam.org/pub/Android4SAM/v2.1/patches/linux-2.6.39_Android-2.3.7_r1.diff 
$ cd linux-2.6.39
$ patch -p1 < ../linux-2.6.39_Android-2.3.7_r1.diff 
$ cd ..
You now have an Android4SAM Linux kernel.

Configure and Build Linux Kernel

Now you need to configure the Linux Kernel according to your hardware. We provided a default configuration file in the patchset for you to use.

$ cd linux-2.6.39
$ make mrproper

1. For NAND Flash boot
Warning, important You need to BuildAndroid before this step, and copy mydroid/out/target/product/sam9m10/root (sam9m10 as an example) directory to linux-2.6.39 directory or use prebuilt extract it directly sam9m10-root.tar.gz, sam9g45-root.tar.gz, sam9x5-root.tar.gz

  • For AT91SAM9M10-G45-EK board with SAM9G45 MCU:
    $ make ARCH=arm at91sam9g45_android_ubifs_defconfig 
    

  • For AT91SAM9M10-G45-EK board with SAM9M10 MCU:
    $ make ARCH=arm at91sam9m10_android_ubifs_defconfig 
    

  • For AT91SAM9x5-EK board with SAM9G15, SAM9G35, SAM9X35 MCU:
    $ make ARCH=arm at91sam9x5_android_ubifs_defconfig 
    

2. For SD Card boot

  • For AT91SAM9M10-G45-EK board with SAM9G45 MCU:
    $ make ARCH=arm at91sam9g45_android_sdcard_defconfig 
    

  • For AT91SAM9M10-G45-EK board with SAM9M10 MCU:
    $ make ARCH=arm at91sam9m10_android_sdcard_defconfig 
    

  • For AT91SAM9x5-EK board with SAM9G15, SAM9G35, SAM9x35 MCU:
    $ make ARCH=arm at91sam9x5_android_sdcard_defconfig 
    

3. At this step, you can modify default configuration (Optional)

$ make ARCH=arm menuconfig 

4. And build the Linux kernel image

$ make uImage ARCH=arm  CROSS_COMPILE=<path_to_cross-compiler/cross-compiler-prefix->

After finish successfully, you can find kernel image in: arch/arm/boot/uImage

Warning, important NOTE: Make sure "mkimage" command can be found in your current path, otherwise U-Boot style image cannot be built.


r16 - 05 Aug 2014 - 03:04:45 - VoiceShen
 
Android4SAM

Copyright by the contributing authors. All material on the platform is the property of the contributing authors.

Android is a trademark of Google Inc. Use of this trademark is subject to Google Permissions

Atmel and others, are registered trademarks or trademarks of Atmel or its subsidiaries.This site is powered by the TWiki collaboration platform

ARM and others are registered trademarks or trademarks or ARM Ltd. Other terms and product names may be trademarks of others.

Under the terms of the Creative Commons Attribution License

Syndicate this siteRSS ATOM