Linux Kernel
Ecosystem
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 and to integrate ARM based system on chip specific patch sets. Specific ARM Linux discussion groups, patches and information are also available.
You will find on ARM Linux website :
AT91 linux 2.6 patches maintained by Andrew Victor. Andrew is the official Linux kernel maintainer for AT91 machines. You can find patches against official Linux kernel releases and driver development status. All AT91 patches should be sent to Andrew except if it exists a specific development branch like SD/MMC, ALSA, netdev, etc...
The provided patches, on this wiki, are always against the official kernel release
and Andrew's patches.
Pre-built images
Pre-built images are 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.
Linux4SAM Experimental Patches
The experimental AT91 patch set is built and contributed by people from the AT91 Linux community. These patches are against
Andrew Victor patches. They contain unpublished or not yet included piece of code or driver.
- add support for new AT91SAM9G10 chip and AT91SAM9G10EK board
- add support for new AT91SAM9G45 chip and AT91SAM9G45EKES board
- ISI driver for AT91SAM9G45 & AT91SAM9263 (use OV9655 camera sensor)
- DMA driver at_hdmac for AT91SAM9RL & AT91SAM9G45
- atmel_mci MCI driver adaptation for DMA usage on AT91SAM9G45
- USB high speed drivers for AT91SAM9G45 (both host and gadget)
- All 2.6.27-at91-exp.patch enhancements included (see below)
- AT91SAM9G20EK - add audio support
- merge AT32 and AT91 ssc DAI (Digital Audio Interface)
- AC97 playback and capture driver
- DMA engine driver on AT91SAM9RL
- AT91SAM9RLEK - fix touchscreen
- LED - on AT91SAM9RLEK
- AT91_MCI - fixes
- ATMEL_MACB - Add SRAM Tx buffers capabilities for AT91SAM926[03]EK
- ATMEL_LCD - fixes & RGB 555 wiring mode
- new NandFlash partitioning
- buttons (on AT91SAM9RLEK and AT91SAM9G20EK)
- hardware ECC on NandFlash for AT91SAM9G20
- fix NandFlash timings
- new NandFlash partitioning
- atmel_lcd manage underflow error
- pwm_led driver
- buttons (& pullups conf.)
- Fix some typos on SSC, RTC
- Enhancement in support for AT91SAM9RL : LCD fifo, USB HS, buttons, leds, AC97
- Note that the touchscreen is not supported yet on AT91SAM9RL
- LCD wiring mode : BGR or RGB selection
- backlight for LCD panel
- Power management support
- AT91SAM9261EK - Add button interface
- AT91_MCI - Enhancements 1
- ATMEL_LCD - Add STN and alpha in 32bpp mode support
- AT91SAM9261Ek - Make NAND FLASH partition match those on AT91SAM926[03]EK
- ATMEL_MACB - Add SRAM Tx buffers capabilities for AT91SAM926[03]EK
- AT91_AC97 driver for AT91SAM9263EK (playback only)
- AT73C213 (I2S DAC audio) support for AT91SAM926[01]EK

Source : check the
summary table below (last column).
Build
AT91 Linux kernel sources summary table

From left to right, each patch applies on top of the previous source tree.
For the vanilla Linux kernel, do not forget to use preferably kernel.org mirrors found here :
http://www2.kernel.org/mirrors/

We also advice you to use the powerful
ketchup tool. You can thus easily get a Linux Kernel without having to consume bandwidth each time you update it.
Get and patch the Linux kernel
To get an experimental Linux4SAM kernel up and running on an AT91 product, you have to go through the following steps:
1. identify on which linux kernel revision the experimental patches will apply
2. download the corresponding Linux kernel
wget http://www.kernel.org/pub/linux/kernel/v2.6/linux-2.6.xx.tar.bz2
tar xvjf linux-2.6.xx.tar.bz2
cd linux-2.6.xx
3. download the AT91 Maintainer's patch and apply it
wget http://maxim.org.za/AT91RM9200/2.6/2.6.xx-at91.patch.gz
zcat 2.6.xx-at91.patch.gz | patch -p1
4. take the experimental patchset and apply it on top of the AT91 one
wget ftp://www.linux4sam.org/pub/linux/2.6.xx-at91-exp.patch.gz
or
wget ftp://www.linux4sam.org/pub/linux/2.6.xx.at91.y/2.6.xx.at91.y-exp.patch.gz
And then :
zcat linux-2.6.xx-at91-exp.diff.gz | patch -p1
You will now have an updated copy of the experimental Linux4SAM kernel.
Configure and Build the Linux kernel
Now you have to configure the Linux kernel according to your hardware. First identify your kernel revision, your board and then, download the corresponding configuration file. Default configuration files are provided
here.
wget http://www.linux4sam.org/twiki/pub/Linux4SAM/LinuxKernel/at91sam926yek_defconfig
cd linux-2.6.xx
cp at91sam926yek_defconfig .config
make ARCH=arm oldconfig
At this step, you can modify default configuration
make ARCH=arm menuconfig
And build the Linux kernel image
make ARCH=arm CROSS_COMPILE=<path_to_cross-compiler/cross-compiler-prefix->
Notes
1: at91_mci enhancement with those upstream patches :
- folow flowcharts
- disable handling of blocks with size not multiple of 4 bytes
- bug-in-at91-mci-suspend-routines.patch
- whitespace
- typo
- add multiwrite cap
2: For AT91SAM9XE chips, there is an additional tiny patch that locates TX Ethernet buffers in internal SRAM :
adapt_macb_sam9xe.diff