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:

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:


Name Board Supported Comment Related Tags
github sources: linux-4.4-at91
wiki page: LinuxKernel_4_4
All Atmel boards supported
All boards using Device Tree
Boards with demo available: SAMA5D2 Xplained, SAMA5D3 Xplained, SAMA5D4 Xplained, AT91SAM9X5-EK
Maintained, stable linux4sam_5.4
github sources: linux-4.1-at91
wiki page: LinuxKernel_4_1
All Atmel boards supported
All boards using Device Tree
Boards with demo available: SAMA5D2 Xplained, SAMA5D3 Xplained, SAMA5D4 Xplained
Maintained, stable linux4sam_5.0
github sources: linux-3.18-at91
wiki page: LinuxKernel_3_18
All Atmel boards supported
All boards using Device Tree
Boards with demo available: SAMA5D2 Xplained, SAMA5D3-EK, SAMA5D3 Xplained, SAMA5D4-EK, SAMA5D4 Xplained
Not recommended for new developments linux4sam_5.0-alpha7
github sources: linux-3.10-at91
wiki page: LinuxKernel_3_10
All Atmel boards supported
Some boards using Device Tree
Boards with demo available: SAMA5D3-EK, SAMA5D3 Xplained, SAMA5D4-EK, SAMA5D4 Xplained, AT91SAM9X5-EK, AT91SAM9N12, Legacy
Not recommended for new developments linux4sam_4.6
github sources: linux-3.6.9-at91
wiki page: LinuxKernel_legacy
  Old branch
don't use for new developments
github sources: linux-2.6.39-at91
wiki page: LinuxKernel_legacy
  Legacy branch
don't use for new developments


linux4sam_5.5 tag

Enhancements are added on top of the official v4.4 Linux kernel tag. Note as well that we re-integrate each and every stable kernel release on top of this Long Term Support (LTS) kernel revision. This means that each v4.4.x version is merged in our branch. Here is a little summary of the main enhancements:

  • Integration of stable kernel updates up to v4.4.26
  • SAMA5D2: ISC and camera sensors enhancements (ov7740) to be compatible with V4L2
  • SAMA5D2: ADC driver backport from Linux Mainline
  • SAMA5D2: add FIFO configuration for I2C
  • WILC1000 WIFI driver backport from a recent Linux "staging" directory content
  • HDMI on SAMA5D4 Xplained: verified functioning sii902x driver
  • maXTouch driver: stabilize and integrate driver enhancements from atmel-maxtouch github repository
  • fixes: LCD driver vertical scaling, OHCI power consumption, SDHCI non-removable devices handling

linux4sam_5.4 tag

  • SAMA5D2: chipID, LED, push button, shutdown controller, TRNG
  • SAMA5D2: NAND driver enhancements (32 bits ECC)
  • SAMA5D2: new I2S driver
  • ISI and camera sensors enhancements
  • adaptation and use of the Bosch M_CAN device driver
  • audio PLL clock driver
  • PMIC and charger ACT8945A driver
  • crypto engines enhancement
  • quad-SPI support: QSPI
  • power management: support for ULP1 mode
  • support for PDA 4.3", 7" screens
  • HDMI on sama5d4 Xplained: add sii902x driver
  • USART fractional baud rate support
  • fixes: DMA residue computation, HSMCI regulator, i2c hold time

linux4sam_5.3 tag

  • add the drm bridge driver for HDMI encoder silicon image: sii902x that is present on SAMA5D4 Xplained board
  • several LCD enhancements:
    • extended timings rage for SAMA5D2 and SAMA5D4
    • optimize AHB master DMA interface by choosing the less used one for a particular overlay
    • add access to GEM for using overlay for video decoding via gstreamer
  • QSPI: add support for FLASH >16MiB : 4byte address mode
  • QSPI: add support for Macronix mx25l25635e that is present on sama5d2 Xplained board
  • fixes for QSPI, PMIC drivers
  • Regulator/SDHCI: strengthen support for SD card insertion/removal

linux4sam_5.2 tag

  • SAMA5D4 Demo updated together with the other Xplained board demos
  • SAMA5D4 Video Decoder driver
  • Move to the Ultra-Low-Power mode ULP1 for suspend/resume power management
    • for more information on this mode, read chapter "62.5.3: Ultra Low-power (ULP) Mode" and the corresponding table "Table 62.5 Low-power Mode Configuration Summary"
    • suspend/resume ULP1 mode wake-up sources are wakeup button and RTC
    • gain better consumption numbers due to the stop of most of the clocks while entering this mode
    • fast resume time
  • WIFI WILC1000 driver integrated from the latest source code submitted to the Linux Mainline staging directory

linux4sam_5.1 tag

  • Addition of PDA inc 4.3" and 7" screens: TM430x and TM7000/7000B
  • New Pulse Density Modulation Interface Controller (PDMIC) for SAMA5D2 PDM microphone interface
  • New SAMA5D2 ADC driver: using the IIO sub-system, software trigger supported
  • fixes for: QSPI, XDMA, RTC for suspend/resume, phy interface for suspend/resume, SHA driver

linux4sam_5.0 tag

As a updated kernel revision this branch contains all the enhancements already found on the the Atmel linux-3.18-at91 branch.

Here is a little summary of the enhancements added on top of the official v4.1 Linux kernel tag:

  • all Atmel material included in the following 4.2 kernel:
    • addition of newer AT91 boards
    • AT91SAM9x5: pwm0 pinctrl definition
    • SAMA5D4: more peripherals: usarts, uarts, spi, pioD access
    • SAMA5D3: phy address for gmac
    • regulator additions for the SD/MMC
    • rtc node for AT91SAM9RL/AT91SAM9RL-EK
  • addition of the new SAMA5D2 SoC and associated SAMA5D2 Xplained board
  • DMA: interleaved, memset and scatter-gathered memset offload operations
  • flexcom: serial, I2C and SPI: new FIFO and DMA modes for SAMA5D2
  • SDHCI driver (SD/MMC) for SAMA5D2
  • ClassD audio output driver for SAMA5D2
  • Image Sensor:
    • ISC: support YUV sensor output ; support RGB output format
    • ISI enhancement: add RGB565, GREY, SGRBG, SBGGR (Bayer) support
  • new shutdown controller driver for SAMA5D2
  • new I2S controller driver for audio on SAMA5D2
  • CAN controller for SAMA5D2
  • new watchdog driver for SAMA5D4 & SAMA5D2 SoCs
  • generated and audio PLL clocks for SAMA5D2
  • support for act8865 PMIC
  • LCD specification to the at91sam9x5 series and associated boards
  • fixes for USB, AES dma configuration

linux4sam_5.0-alpha7 tag

  • support for new SAMA5D2 SoC and the associated sama5d2 Xplained board
    • QSPI with DMA (disabled in Device Tree by default)
    • Flexcom with FIFO & DMA
      • USART interface
      • I2C interface
      • SPI interface
    • SD/MMC interface (SDHCI) + on-board eMMC
    • Audio using Class D amplifier
    • ISC
      • support YUV sensor output
      • support RGB output format
    • Crypto engines
      • AEAD support for IPSec
  • fix residue computation for HDMA
  • ISI: add RGB565, GREY, SGRBG, SBGGR (Bayer) support
  • runtime PM: added the ISI driver, modifications to the HLCD DRM driver

And the enhancements from linux4sam_4.7 tag below

linux4sam_4.7 tag

  • Based on 3.18 linux kernel
  • Update atmel hlcdc driver to DRM driver.
  • Totally support devicetree. Remove the temperory code which not support devicetree.
  • SAMA5 series boards support
  • HDMI driver for SiI902x component on SAMA5D4-EK and SAMA5D4 Xplained boards
  • add LCD driver entries in at91sam9x5 and at91sam9n12 DT (HLCD DRM driver)
  • 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
  • updated clock management for USB (OHCI and EHCI)

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 below

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

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

Build Linux for AT91

Following sections will show you how to build Linux Kernel for AT91.

Getting Kernel sources

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

$ git clone git://
Cloning into 'linux-sama9x5-github'...
remote: Counting objects: 4524288, done.
remote: Compressing objects: 100% (721/721), done.
remote: Total 4524288 (delta 385), reused 1 (delta 1), pack-reused 4523564
Receiving objects: 100% (4524288/4524288), 1.22 GiB | 1.35 MiB/s, done.
Resolving deltas: 100% (3777338/3777338), done.
Checking connectivity... done.
Checking out files: 100% (49565/49565), done.

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 usu

$ 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.18-at91 -> linux4sam/linux-3.18-at91
 * [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]                linux-4.1-at91 -> linux4sam/linux-4.1-at91
 * [new branch]                linux-4.4-at91 -> linux4sam/linux-4.4-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-4.4-at91 -b linux-4.4-at91
Branch linux-4.1-at91 set up to track remote branch linux-4.4-at91 from origin.
Switched to a new branch 'linux-4.4-at91'

Configure and Build the Linux kernel

Now you have to configure the Linux kernel according to your hardware. We have two default configuration at91 SoC in arch/arm/configs

  • at91_dt_defconfig: for at91sam ARM926 series chips
  • sama5_defconfig: for SAMA5 series chips

Now we Configure and Build kernel for board:

$ make ARCH=arm sama5_defconfig
  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, before you build you need set up the cross compile toolchain, check this section.

$ make ARCH=arm


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

Now you have an usable compressed kernel image zImage.

If you need an uImage you can run this additional step:

make ARCH=arm uImage LOADADDR=0x20008000


  Kernel: arch/arm/boot/zImage is ready
  UIMAGE  arch/arm/boot/uImage
Image Name:   Linux-4.1.0-linux4sam_5.3+
Created:      Fri Sep  9 17:02:45 2016
Image Type:   ARM Linux Kernel Image (uncompressed)
Data Size:    3441072 Bytes = 3360.42 kB = 3.28 MB
Load Address: 20008000
Entry Point:  20008000
  Image arch/arm/boot/uImage is ready

make ARCH=arm dtbs


  DTC     arch/arm/boot/dts/at91rm9200ek.dtb
  DTC     arch/arm/boot/dts/mpa1600.dtb
  DTC     arch/arm/boot/dts/animeo_ip.dtb
  DTC     arch/arm/boot/dts/at91-qil_a9260.dtb
  DTC     arch/arm/boot/dts/aks-cdu.dtb
  DTC     arch/arm/boot/dts/ethernut5.dtb
  DTC     arch/arm/boot/dts/evk-pro3.dtb
  DTC     arch/arm/boot/dts/tny_a9260.dtb
  DTC     arch/arm/boot/dts/usb_a9260.dtb
  DTC     arch/arm/boot/dts/at91sam9261ek.dtb
  DTC     arch/arm/boot/dts/at91sam9263ek.dtb
  DTC     arch/arm/boot/dts/tny_a9263.dtb
  DTC     arch/arm/boot/dts/usb_a9263.dtb
  DTC     arch/arm/boot/dts/at91-foxg20.dtb
  DTC     arch/arm/boot/dts/at91-kizbox.dtb
  DTC     arch/arm/boot/dts/at91sam9g20ek.dtb
  DTC     arch/arm/boot/dts/at91sam9g20ek_2mmc.dtb
  DTC     arch/arm/boot/dts/tny_a9g20.dtb
  DTC     arch/arm/boot/dts/usb_a9g20.dtb
  DTC     arch/arm/boot/dts/usb_a9g20_lpw.dtb
  DTC     arch/arm/boot/dts/at91sam9m10g45ek.dtb
  DTC     arch/arm/boot/dts/pm9g45.dtb
  DTC     arch/arm/boot/dts/at91sam9n12ek.dtb
  DTC     arch/arm/boot/dts/at91sam9rlek.dtb
  DTC     arch/arm/boot/dts/at91-ariag25.dtb
  DTC     arch/arm/boot/dts/at91-ariettag25.dtb
  DTC     arch/arm/boot/dts/at91-cosino_mega2560.dtb
  DTC     arch/arm/boot/dts/at91-kizboxmini.dtb
  DTC     arch/arm/boot/dts/at91sam9g15ek.dtb
  DTC     arch/arm/boot/dts/at91sam9g25ek.dtb
  DTC     arch/arm/boot/dts/at91sam9g35ek.dtb
  DTC     arch/arm/boot/dts/at91sam9x25ek.dtb
  DTC     arch/arm/boot/dts/at91sam9x35ek.dtb

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

Recent FAQ


Crypto Config: How to configure Crypto driver. (Sama5d2Xplained, Sama5d4Xplained, Sama5d4ek, Sama5d3Xplained, Sama5d3xek)
Connect Module From PDA: How to connect LCD module from PDA to the Xplained Boards. (Sama5d2Xplained, Sama5d4Xplained, Sama5d3Xplained)
Using Atmel DRMDriver: Using Atmel KMS/DRM LCD driver. (Sama5d2Xplained, Sama5d4Xplained, Sama5d4ek, Sama5d3Xplained, Sama5d3xek)
Shutdown Wake Up: Use the Wakeup Feature of the Shutdown Controller.. (AT91sam9x5-ek)
PDMICAudio Record: Using the PDMIC to record audio stream. (Sama5d2Xplained)
Using SAMA5 D2 ADCDevice: Using the SAMA5D2-compatible ADC device. (Sama5d2Xplained)
Using Ultra Low Power Mode 1: Using Ultra Low Power mode 1 (ULP1). (Sama5d2Xplained)
Real Time: Enable Real Time support for AT91SAM9 Soc. (AT91sam9x5-ek, other AT91SAM9 boards)
Using Max Touch: Introduction for how to use MaxTouch. (Sama5d2Xplained, Sama5d4Xplained, Sama5d4ek, Sama5d3Xplained, Sama5d3xek)
Using Isi: How to use the Image Sensor Interface. (Sama5d4Xplained, Sama5d4ek, Sama5d3xek)
Iio Adc Driver: Adc IIO driver introduction. (Sama5d2Xplained, Sama5d4Xplained, Sama5d4ek, Sama5d3Xplained, Sama5d3xek)
r82 - 21 Oct 2016 - 13:08:58 - 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