Simtec Electronics


EB675001DIP μCLinux notes

Product:EB675001DIP
Date:17/12/2004
Reference:NTS001
Author:BJD & VRS
Version:1.4

Contents

©2004 Simtec Electronics

$Id: uclinux-20030909-notes.html,v 1.2 2006/01/10 20:32:59 vince Exp $


Introduction

This document outlines how to retrieve, unpack, patch and build the μCLinux distribution for use with the Simtec EB675001DIP module.

The main steps are:

  1. Install toolchain (cross compiler)
  2. Unpack and patch μCLinux distribution
  3. configure and build your distribution

Install compiler

Because of the limitations of μCLinux native compiling is usually not possible, so a cross compiler must be employed, cross compiler tools are typically hosted on a more powerful X86 machine and generate ARM binaries.

A μCLinux toolchain can be obtained from the μCLinux website. and provides all the necessary tools to compile the distribution.

The arm-elf-tools-20030314.sh is the toolchain we have used to build our example images.

To install one of the pre-built uclinux toolchains the downloaded file must be executed as root.

# sh arm-elf-tools-20030314.sh
this will install arm-elf-* tools into /usr/local/bin

Unpack and patch μCLinux distribution

  1. Obtain the distribution files, patches and kernel sources, the complete list of required files are:
  2. unpack the software distribution:
    # tar -xzf uClinux-dist-20030909.tar.gz
  3. Unpack 2.4.24 kernel inside the distribution
    # cd uClinux-dist
    # tar -xjf linux-2.4.24.tar.bz2
  4. Apply the patches for μCLinux
    # cd linux-2.4.24
    # zcat uClinux-2.4.24-uc0.diff.gz | patch -p1
  5. Apply Simtec OKI kernel patches
    # zcat patch-2.4.24-uc0-eb675001dip.gz | patch -p1
    # cd ..
  6. There may be some additional patches for specific hardware, possibly from application notes. Such additional patchesshould be applied in the same way as above at this point.
  7. Move the original kernel out of the way and link the new one in place.
    # mv linux-2.4.x linux-2.4.x-orig
    # ln -s linux-2.4.24 linux-2.4.x
  8. Apply Simtec Vendor patches for the EB675001DIP to the μCLinux distribution
    # zcat patch-uclinux20030909-vendor-eb675001dip.gz | patch -p1
  9. Apply uclibc fix for ioperm
    # zcat patch-uclinux20030909-uclibc-ioperm.gz | patch -p1
  10. Optionally apply this patch to add the css mime type to BOA webserver
    # zcat patch-uclinux20030909-boacss.gz | patch -p1

Configuring and building μCLinux

Ensure the present working directory is the unpacked μCLinux directory

# cd uClinux-dist
Then make the xconfig target
# make xconfig
Perform the following steps in the presented menu
  1. Select `Target Platform Selection`
  2. Select Oki/EB67DIP
  3. Return to Main Menu
  4. `Save and Exit`
Finally build the configured distribution with
# make dep
# make
if successful, this will create the output images image.bin and romfs.img in the images directory.

Download and run image on module

Download and run on module, using ABLE, the following commands can be issued:

> setargs root=/dev/ram console=ttyS0,115200 ro 
> load (tftpboot)image.bin (tftpboot)romfs.img
> boot

References


Simtec Electronics

Web:http://www.simtec.co.uk/

Email:info@simtec.co.uk

Simtec Electronics,
Avondale Drive,
Tarleton,
Preston,
Lancs
PR4 6AX
United Kingdom

Tel:+44 (0)1772 812863
Fax:+44 (0)1772 816426