项目一 iMX21整体方案(3): BSP Guide
时间:2009-05-02 来源:anabelle
ARM Linux (iMX21) BSP Guide
A. Introduction
This developer guide provides the information for developers, who need to use the IMX21 Linux BSP to modify the sound driver. This development may proceed with a specific model. And this document is created mainly to facilitate the usage of this BSP and Machine for engineers to quickly startup the development work of some device drivers. The host operating system we preferred is Redhat Linux 9.0, or VMWare plus Redhat Linux 9.0 under Windows XP.
B. BSP Installation and Compilation
1. Setup the tool chains
= = = = = = = = = = = = = = = = =
>Login as root
>mount /dev/cdrom /mnt/cdrom
>cd /usr/local
>tar zxvf /mnt/cdrom/arm-linux.tar.gz
In order to cross-compile on Imx21, please add “export PATH=$PATH:/usr/local/arm/bin” in /etc/profile or /etc/bashrc.
2. Kernel Configurations and Compilation
Kernel source preparation
= = = = = = = = = = = = = =
>cd /usr/src/
>tar zxvf /mnt/cdrom/linux-2.4.20-iMX21.tar.gz
Configure the linux kernel
= = = = = = = = = = = = = =
>cd /usr/src/linux-2.4.20-iMX21
>make config
>make dep
Build the new linux kernel
= = = = = = = = = = = = = =
>make zImage
>the kernel image will be located at linux-2.4.20-iMX21/arch/arm/boot/zImage
Device Drivers Specific
There are multiple drivers presented in Imx21 BSP. Only audio driver is shown as an example.
Audio Driver
The audio codec used on IMX21 is WM8731. The driver for WM8731 is based on three modules of MX21, DAM (Digital Audio Multiplexer) module, SSI (Synchronous Serial Interface) module and I2C module. The SSI module is used to manage a full-duplex data path between MX21 and WM8731. And the I2C module is used to set and read the register values of WM8731.
The audio driver source files are placed in /usr/src/linux-2.4.20-iMX21/drivers/sound.
6. Test on IMX21
The files associated with sound are listed as follows:
Sound drivers: soundcore.o
sound.o
dbmx-wm8721-audio.o
Application of wavplayer: wavplay
7. References
1. MCIMX21 and MCIMX21L Applications Processors Reference Manual;
2. i.MX31 Linux Board Support Package Reference Manual, Rev.3.2;
3. i.MX31ADS Linux BSP Targeting the Freescale i.MX31 ADS User’s Guide, Rev.3.2.
4. IMX21 CPU BD Schematics.