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.
2.6.24.at91.2-exp.patch
- fix NandFlash timings
- new NandFlash partioning
- atmel_lcd manage underflow error
- pwm_led driver
- buttons (& pullups conf.)
2.6.24-at91-exp.patch
- 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
2.6.22-at91-exp.patch
- 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
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