IMX31ADS Compiling Linux kernel mainline

Document created by jesseg Employee on Aug 22, 2012Last modified by Jodi Paul on Apr 18, 2013
Version 2Show Document
  • View in full screen mode

Download Linux kernel 2.6.29:

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

Extract this:

$ tar jxvf linux-2.6.29.tar.bz2 

Apply the patches:

$ cd linux-2.6.29 

Edit the file drivers/net/cs89x0.c adding:

#include <mach/hardware.h> 

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 iMX31ADS board:

System Type -> 
            ARM system type -> (X) Freescale MXC/iMX-based 
            Freescale MXC Implementations  -> 
                           MXC/iMX Base Type -> (X) MX3-based 
                           MX3 Options  -> [*] Support MX31ADS 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 (CS89x0), serial driver and unselect VGA console:

Device Drivers  -> 
       
              [*] Network device support  ---> 
                                     [*]   Ethernet (10 or 100Mbit)  ---> 
                                            [*]   CS89x0 support
       
              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"


Attachments

    Outcomes