i.MX27 ADS Compiling Linux Kernel Mainline

Document created by jesseg Employee on Aug 21, 2012Last modified by Jodi Paul on May 14, 2013
Version 3Show Document
  • View in full screen mode

This steps are basically the same used to boot Linux mainline on i.MX 31 ADS, just replacing Network Driver cs89x0 by i.MX 27 internal FEC.

Download Linux kernel 2.6.30:

$ wget -c http://www.kernel.org/pub/linux/kernel/v2.6/linux-2.6.30.tar.bz2 

Extract this:

$ tar jxvf linux-2.6.30.tar.bz2 

Export CROSS_COMPILE environmet:

$ export PATH="$PATH:/opt/freescale/usr/local/gcc-4.1.2-glibc-2.5-nptl-3/arm-none-linux-gnueabi/bin/" 
$ export CROSS_COMPILE=arm-none-linux-gnueabi- 

Unselect all no essentials features:

$ make ARCH=arm allnoconfig 

Start the configuration menu:

$ make ARCH=arm menuconfig 

Change/Select the kernel options below.

Select the MXC/iMX platform and iMX27ADS board:

System Type -> 
            ARM system type -> (X) Freescale MXC/iMX-based 
            Freescale MXC Implementations  -> 
                           MXC/iMX Base Type -> (X) MX2-based 
                           MX2 Options  -> [*] Support MX27ADS platforms (NEW)

Select ARM EABI standard to compile the kernel:

Kernel Features  ---> 
          [*] Use the ARM EABI to compile the kernel

Add support to Linux Binary Format ELF:

Userspace binary formats -> 
             [*] Kernel support for ELF binaries

Add support to Network (TCP/IP):

[*] Networking support  -> 
         Networking options  -> 
                          [*] Packet socket 
                          [*] Unix domain sockets 
                          [*] PF_KEY sockets 
                          [*] TCP/IP networking 
                                   [*] IP: kernel level autoconfiguration 
                                   [*]     IP: DHCP support

Select network driver (FEC), serial driver and unselect VGA console:

Device Drivers  -> 
       
              [*] Network device support  ---> 
                                      [*]   Ethernet (10 or 100Mbit)  ---> 
                                             [*]   FEC ethernet controller (of ColdFire CPUs)
       
              Character devices  -> 
                             Serial drivers  ---> 
                                      [*] IMX serial port support 
                                      [*]   Console on IMX serial port
       
              Graphics support  -> 
                             Console display driver support  ---> 
                                        [ ] VGA text console

Add support to NFS and support to use it as root file system:

File systems  -> 
                          [*] Network File Systems (NEW)  -> 
                                   [*]   NFS client support 
                                   [*]     Root file system on NFS

Compile the kernel:

$ make ARCH=arm 

Copy the created zImage to tftp directory:

$ cp arch/arm/boot/zImage /tftpboot/ 

Configure your RedBoot to boots with this kernel:

load -r -b 0x100000 /tftpboot/zImage 
exec -b 0x100000 -l 0x200000 -c "noinitrd console=ttymxc0,115200 root=/dev/nfs nfsroot=10.29.240.191:/tftpboot/rootfs ip=dhcp"

Change the default network device on RedBoot to internal FEC:

Default network device: mxc_fec 

Connect the network cable on FEC connector (connector T3).

Notes: We are using rootfs from LTIB then select to get parameters from DHCP:

"Target System Configuration" 
Options  ---> 
              [*] start networking 
                     Network setup  ---> 
                           [*]   get network parameters using dhcp


Attachments

    Outcomes