Linux Kernel


Linux Kernel Archives is the primary site for the Linux kernel source. All Linux kernel versions, including latest snapshot or "release candidate" (-rc) can be easily found here.

The ARM Linux Project lead by Russell King. Russell is in charge to ensure the ARM core support in the Kernel mainline.

The ARM-SOC git tree lead by Arnd Bergmann, Olof Johansson and Kevin Hilman. It is the initiative that managed to unify the work being done on ARM-based System on Chip (SoC) by different vendors. This git tree is the natural way to send AT91-related material upstream.

The Linux-arm-kernel Mailing lists is where the work is actually being done. Discussions, bug reports and patches must be posted there.

Changes introduced by Device Tree support

The Device Tree is a binary file containing the description of your SoC and your board. Before this move to Device Tree, the information was stored in several C files directly in the Linux kernel code. The number of ARM-based SoC growing rapidly it has become clear that the amount of C code could not follow this pace. In addition to consolidating the ARM related kernel code, allowing the common code to be centralized and better maintained, the Device Tree also bring the possibility to run the same kernel binary on several platforms sharing the same ARM instruction set. This single zImage initiative allow the use of the same Linux kernel binary, without having the need for recompiling it, on another SoC, by just providing the proper Device Tree Binary file (.dtb).

Now the boot process has to deal with two Linux files instead of one: the Device Tree Binary file and the kernel image itself. It mainly involves changes for the U-Boot / barebox booting command. If you don't want to care about this new file, there is an Linux kernel option to append the Device Tree Binary at the end of the kernel image.

Useful documentation:

Pre-built images

3.6.9 (linux4sam_4.2 tag)
Board Description Binary Device Tree Binary (DTB) Configuration file
sama5d3xek linux-3.6.9-at91 zImage zImage-sama5d3.bin sama5d31ek.dtb
linux-3.6.9-at91 uImage uImage-sama5d3.bin
3.10 (83a9eb4b2f16d9b388daa473a954fb2a563a7ccb)
Board Description Binary Device Tree Binary (DTB) Configuration file
sama5d3 Xplained linux-3.10-at91 zImage zImage-sama5d3_xplained.bin at91-sama5d3_xplained.dtb
3.10 (linux4sam_4.5 tag)
Board Description Binary Device Tree Binary (DTB) Configuration file
sama5d4ek linux-3.10-at91 zImage zImage-sama5d4.bin sama5d4ek.dtb sama5d4_defconfig
3.10 (linux4sam_4.6 tag)
Board Description Binary Device Tree Binary (DTB) Configuration file
sama5d4ek_xplained linux-3.10-at91 zImage zImage-sama5d4_xplained.bin at91-sama5d4_xplained.dtb sama5d4_defconfig

Pre-built images are also delivered into uImage U-Boot format. To download them on AT91 boards, see the section How to load Linux kernel with U-Boot in the U-Boot page.

Linux for AT91 source code

The Linux kernel for Atmel ARM-based SoC (aka AT91) is distributed as a GIT tree hosted on GitHub as a fork of the official Linus Torvalds' git tree. The objective of the Atmel Linux team is to integrate all the AT91-related material in the official Linux Kernel.
Before completing this inclusion process, which can take time, this website provides the Linux4SAM Linux Kernel git tree for AT91 devices at:

linux4sam_4.6 tag

  • SAMA5D4 Xplained board support
  • HDMI driver for SiI902x component on SAMA5D4-EK and SAMA5D4 Xplained boards
  • power management enhancements
  • power management states on pin configuration (pinctrl OUTPUT configuration)
  • power management pin states for: SPI, i2c, MMC, serial, LCD, SSC, IIO (ADC), ETH, NAND, CAN
  • serial RX & TX DMA support
  • serial fixes and enhancements
  • and of course everything listed above

linux4sam_4.5 tag

  • ARM Cortex-A5 support (include SAMA5D4 chip family support)
  • VFP + NEON support
  • L2 Cache for SAMA5D4 family
  • Linux drivers for Hardware Video Decoder
  • Ethernet driver enhancements for both 10/100 and Gigabit Ethernet
  • Power management enhancement
  • PWM interface
  • and of course everything listed above

linux4sam_4.2 tag

  • ARM Cortex-A5 support (include SAMA5D36 chip support)
  • VFP support
  • Timer Counter
  • Watchdog (beware, can be deactivated by AT91Bootstrap)
  • RTC
  • Serial driver with DMA support
  • I2C interface with DMA support
  • SPI interface with DMA support
  • CAN
  • ADC (with 12 bits support)
  • ISI interface (support OV2640, OV2643 and OV5640)
  • MCI interface with DMA support
  • NAND flash with hadware ECC and DMA support
  • serial flash (SPI - at25)
  • Enhanced Ethernet drivers & Enhanced Gigabit Ethernet drivers
  • USB: host (OHCI & EHCI)
  • USB: device/gadget high speed
  • LCD base layer / LCD overlay 1, 2 / LCD High End Overlay
  • Crypto engines (AES, DES/TDES, SHA) with DMA support
  • Pinctrl (PIO muxing, PIO control and configuration)
  • Resistive touchscreen
  • Capacitive touchscreen maXTouch - PDA module
  • Touch button QT1070
  • LEDs
  • Audio using SSC/I2S - wm8904 codec
  • Power management

Get sources

To get the source code, you have to clone the repository:

$ git clone git://
Cloning into 'linux-at91'...
remote: Counting objects: 5239592, done.
remote: Compressing objects: 100% (764014/764014), done.
Receiving objects: 100% (5239592/5239592), 1018.56 MiB | 11.18 MiB/s, done.
remote: Total 5239592 (delta 4448248), reused 5218219 (delta 4427054)
Resolving deltas: 100% (4448248/4448248), done.
Checking out files: 100% (38567/38567), done.
$ cd linux-at91
$ ls
arch     CREDITS        drivers   include  Kbuild   lib          mm      REPORTING-BUGS  security  usr
block    crypto         firmware  init     Kconfig  MAINTAINERS  net     samples         sound     virt
COPYING  Documentation  fs        ipc      kernel   Makefile     README  scripts         tools

The source code has been taken from the master branch which is pointing on the latest branch we use.

Pointing hand Note that you can also add this Linux4SAM repository as a remote GIT repository to your usual Linux git tree. It will save you a lot of bandwidth and download time:

$ git remote add linux4sam git://
$ git remote update linux4sam
Fetching linux4sam
From git://
 * [new branch]                linux-2.6.39-at91 -> linux4sam/linux-2.6.39-at91
 * [new branch]                linux-3.10-at91 -> linux4sam/linux-3.10-at91
 * [new branch]                linux-3.15-at91 -> linux4sam/linux-3.15-at91
 * [new branch]                linux-3.15-at91_at91sam9x5_drm -> linux4sam/linux-3.15-at91_at91sam9x5_drm
 * [new branch]                linux-3.4.9-at91 -> linux4sam/linux-3.4.9-at91
 * [new branch]                linux-3.6.9-at91 -> linux4sam/linux-3.6.9-at91
 * [new branch]                master     -> linux4sam/master

If you want to use an other branch, you can list them and use one of them by doing this:

$ git branch -r
  origin/HEAD -> origin/master
$ git checkout origin/linux-3.10-at91 -b linux-3.10-at91
Branch linux-3.10-at91 set up to track remote branch linux-3.10-at91 from origin.
Switched to a new branch 'linux-3.10-at91'

Configure and Build the Linux kernel

Now you have to configure the Linux kernel according to your hardware. The default configuration for a particular SoC is a good starting point that you will be able to adapt to your needs afterwards.

$ cd linux-at91
$ ls arch/arm/configs/+(at91|sam)*
arch/arm/configs/at91_dt_defconfig           arch/arm/configs/at91sam9g45_defconfig
arch/arm/configs/at91rm9200_defconfig        arch/arm/configs/at91sam9rl_defconfig
arch/arm/configs/at91sam9260_9g20_defconfig  arch/arm/configs/sama5d3_xplained_defconfig
arch/arm/configs/at91sam9261_9g10_defconfig  arch/arm/configs/sama5d4_defconfig
arch/arm/configs/at91sam9263_defconfig       arch/arm/configs/sama5_defconfig
$ make ARCH=arm <name of your SoC_defconfig>  # sama5d4_defconfig for instance
  HOSTCC  scripts/basic/fixdep
  HOSTCC  scripts/kconfig/conf.o
  SHIPPED scripts/kconfig/
  SHIPPED scripts/kconfig/zconf.lex.c
  SHIPPED scripts/kconfig/zconf.hash.c
  HOSTCC  scripts/kconfig/
  HOSTLD  scripts/kconfig/conf
# configuration written to .config

At this step, you can modify default configuration using the menuconfig

$ make ARCH=arm menuconfig 

And build the Linux kernel image

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


  Kernel: arch/arm/boot/Image is ready
  Kernel: arch/arm/boot/zImage is ready

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


  Kernel: arch/arm/boot/Image is ready
  Kernel: arch/arm/boot/zImage is ready
  UIMAGE  arch/arm/boot/uImage
Image Name:   Linux-3.6.9+
Created:      Mon Feb  4 12:26:46 2013
Image Type:   ARM Linux Kernel Image (uncompressed)
Data Size:    2837352 Bytes = 2770.85 kB = 2.71 MB
Load Address: 20008000
Entry Point:  20008000
  Image arch/arm/boot/uImage is ready

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


  DTC     arch/arm/boot/at91sam9g20ek.dtb
DTC: dts->dtb  on file "arch/arm/boot/dts/at91sam9g20ek.dts"
  DTC     arch/arm/boot/at91sam9g20ek_2mmc.dtb
DTC: dts->dtb  on file "arch/arm/boot/dts/at91sam9g20ek_2mmc.dts"


DTC: dts->dtb  on file "arch/arm/boot/dts/at91sam9m10g45ek.dts"
  DTC     arch/arm/boot/at91sam9n12ek.dtb
DTC: dts->dtb  on file "arch/arm/boot/dts/at91sam9n12ek.dts"
  DTC     arch/arm/boot/at91sam9g15ek.dtb
DTC: dts->dtb  on file "arch/arm/boot/dts/at91sam9g15ek.dts"
  DTC     arch/arm/boot/at91sam9g25ek.dtb
DTC: dts->dtb  on file "arch/arm/boot/dts/at91sam9g25ek.dts"
  DTC     arch/arm/boot/at91sam9g35ek.dtb
DTC: dts->dtb  on file "arch/arm/boot/dts/at91sam9g35ek.dts"
  DTC     arch/arm/boot/at91sam9x25ek.dtb
DTC: dts->dtb  on file "arch/arm/boot/dts/at91sam9x25ek.dts"
  DTC     arch/arm/boot/at91sam9x35ek.dtb
DTC: dts->dtb  on file "arch/arm/boot/dts/at91sam9x35ek.dts"
  DTC     arch/arm/boot/sama5d31ek.dtb
DTC: dts->dtb  on file "arch/arm/boot/dts/sama5d31ek.dts"
  DTC     arch/arm/boot/sama5d31ek_pda.dtb
DTC: dts->dtb  on file "arch/arm/boot/dts/sama5d31ek_pda.dts"
  DTC     arch/arm/boot/sama5d33ek.dtb
DTC: dts->dtb  on file "arch/arm/boot/dts/sama5d33ek.dts"
  DTC     arch/arm/boot/sama5d33ek_pda.dtb
DTC: dts->dtb  on file "arch/arm/boot/dts/sama5d33ek_pda.dts"
  DTC     arch/arm/boot/sama5d34ek.dtb
DTC: dts->dtb  on file "arch/arm/boot/dts/sama5d34ek.dts"
  DTC     arch/arm/boot/sama5d34ek_pda.dtb
DTC: dts->dtb  on file "arch/arm/boot/dts/sama5d34ek_pda.dts"
  DTC     arch/arm/boot/sama5d35ek.dtb
DTC: dts->dtb  on file "arch/arm/boot/dts/sama5d35ek.dts"
  DTC     arch/arm/boot/sama5d36ek.dtb
DTC: dts->dtb  on file "arch/arm/boot/dts/sama5d36ek.dts"
  DTC     arch/arm/boot/sama5d36ek_pda.dtb
DTC: dts->dtb  on file "arch/arm/boot/dts/sama5d36ek_pda.dts"

path_to_cross-compiler is only needed if it is not in your PATH.
Usually cross-compiler-prefix- looks like arm-none-linux-gnueabi- or arm-linux-gnueabi-

If the building process is successful, the final images can be found under arch/arm/boot/ directory.

$ ls arch/arm/boot/dts
aks-cdu.dtb             at91-sama5d3_xplained.dtb       sama5d33ek_pda4.dtb       sama5d36ek_pda7.dtb
animeo_ip.dtb           at91-sama5d3_xplained_pda4.dtb  sama5d33ek_pda7.dtb       sama5d36ek_revc.dtb
at91-ariag25.dtb        at91-sama5d3_xplained_pda7.dtb  sama5d33ek_revc.dtb       sama5d36ek_revc_pda4.dtb
at91-foxg20.dtb         ethernut5.dtb                   sama5d33ek_revc_pda4.dtb  sama5d36ek_revc_pda7.dtb
at91rm9200ek.dtb        evk-pro3.dtb                    sama5d33ek_revc_pda7.dtb  sama5d4ek.dtb
at91sam9263ek.dtb       kizbox.dtb                      sama5d34ek.dtb            tny_a9260.dtb
at91sam9g15ek.dtb       mpa1600.dtb                     sama5d34ek_pda4.dtb       tny_a9263.dtb
at91sam9g20ek_2mmc.dtb  pm9g45.dtb                      sama5d34ek_pda7.dtb       tny_a9g20.dtb
at91sam9g20ek.dtb       sama5d31ek.dtb                  sama5d34ek_revc.dtb       usb_a9260.dtb
at91sam9g25ek.dtb       sama5d31ek_pda4.dtb             sama5d34ek_revc_pda4.dtb  usb_a9263.dtb
at91sam9g35ek.dtb       sama5d31ek_pda7.dtb             sama5d34ek_revc_pda7.dtb  usb_a9g20.dtb
at91sam9m10g45ek.dtb    sama5d31ek_revc.dtb             sama5d35ek.dtb            usb_a9g20_lpw.dtb
at91sam9n12ek.dtb       sama5d31ek_revc_pda4.dtb        sama5d35ek_revc.dtb
at91sam9x25ek.dtb       sama5d31ek_revc_pda7.dtb        sama5d36ek.dtb
at91sam9x35ek.dtb       sama5d33ek.dtb                  sama5d36ek_pda4.dtb

r70 - 10 Dec 2014 - 17:37:55 - NicolasFerre
Linux & Open Source related information for AT91 Smart ARM Microcontrollers

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® and others, are registered trademarks or trademarks of Atmel Corporation or its subsidiaries. This site is powered by the TWiki collaboration platform

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

Ideas, requests, contributions ? Connect to LinksToCommunities page.

Syndicate this siteRSS ATOM