Tux
Communication
Mailing lists
Documentation
User Manual
Target board info.
Target chip info.
Support
Linux support
Bugzilla
Downloads
STLinux
Updates
Search
Google


The web
stlinux.com
Kernel Porting Guide
Introduction
ST Logo
  Contents   Next


Kernel Porting Guide

Porting Linux to a new board is a relatively simple task, but it does require a reasonable knowledge of how the Linux kernel is put together. This guide provides a tutorial style approach to adding a new board. It assumes that you know how to build the kernel from scratch, and that the chip used on the board is already supported.

The most important point when porting to a new board is that you should never modify support for an existing board to make the new port. The board support may incorrectly assume that some hardware on the old board is present on the new board. This can result in a disaster. There is nothing wrong with copying fragments of code from other boards, but you need to think about the assumptions at each stage and never blindly copy code over.

For this reason, it is imperative that you put the software to support the new board into a new directory structure and separate it from the rest of the kernel tree and provide a clean starting point. This also makes it easier to integrate your changes with future revisions of the kernel.

Porting Linux to a new board

The ST200 and ST40 kernels are different in the way in which boards are added. The ST200 kernel is cleaner and easier to work with, but it is expected that over time the differences will become less. At present, however, the differences are sufficient to justify having a separate section for ST200 and ST40. The following section provides an example for the ST200 kernel, an ST40 example will be provided in a later release. Read the documentation available on the board and on SoC support before attempting this tutorial.

Example: The ACME coyote board

This tutorial describes a hypothetical board called a Coyote, made by a company named ACME. The board has the following features:

  • based on an STi5301 chip for the ST200 tutorial and an STi7100 chip for the ST40 tutorial,

  • 64 Mbytes of memory on LMI,

  • SMSC 91C111 ethernet chip on EMI,

  • IDE hard disk is connected via the EMI,

  • LED is connected via PIO,

  • a UART connects to the serial console,

  • USB connector.

The tutorial consists of the following sections:

Other peripherals

The sections that make up the tutorial provide basic board support. To add other board-specific drivers please refer to the documentation of other boards with the same chip which have previously been configured. The older board drivers are in the process of being converted into platform drivers, which make porting to a new board far simpler.

  Contents   Next
Valid HTML 4.01! Last updated: 2005/09/29 14:43:17
© Copyright STMicroelectronics Limited, 2005
Printer