herunterladen

Freescale Semiconductor
Application Note
Document Number: AN3765
Rev. 0, 12/2008
Contents
© Freescale Semiconductor, Inc., 2008. All rights reserved.
1 Introduction
The Linux BSP for MPC5121e supports the ADS5121
evaluation board. This application note provides
guidance for porting the Linux BSP to customer board
designs. The first section covers modifications to the
u-boot universal boot loader and details the board and
processor specific sections of the source code. The
second section covers Linux kernel modification and
highlights board-specific sources and configuration files
involved in porting the kernel to a new design.
This document uses the Linux Target Image Builder
(LTIB) running on a Linux-based workstation/PC as the
development environment. The appendix gives an
example setup procedure for preparing this environment
on a Windows PC using a VMware Player to host a
Debian Linux distribution on a virtual machine. This
may be useful for readers not familiar with Linux
software development. Any Linux host able to install and
run LTIB can be used with the porting procedures
outlined in this application note.
1 Introduction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1
2 Porting the u-boot Boot-Loader . . . . . . . . . . . . . . . . . . . . 2
2.1 u-boot Source Code from DENX . . . . . . . . . . . . . . . 2
2.2 u-boot Source Code from Freescale . . . . . . . . . . . . 3
2.3 File Organization . . . . . . . . . . . . . . . . . . . . . . . . . . 4
2.4 Porting u-boot to a New Freescale MPC5121e-Based
Hardware System Board . . . . . . . . . . . . . . . . . . . . . 5
3 Porting the 2.6.24.6 Linux Kernel to a Customized
MPC5121e Board Using LTIB . . . . . . . . . . . . . . . . . . . . . 6
3.1 PowerPC Software Architecture in the Linux. . . . . . 6
3.2 PowerPC Initialization Sequence in the Linux . . . . 8
3.3 Create a New MPC5121e Platform in the Linux
Source Tree. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9
3.4 Deploy New Platform to LTIB . . . . . . . . . . . . . . . . 12
Appendix APackage Fixes. . . . . . . . . . . . . . . . . . . . . . . . . . . 15
A.1 hotplug. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 15
A.2 glib2. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 15
Appendix BLinux Development Environment Setup . . . . . . . 16
Porting Linux for the MPC5121e
by: Dave Erazmus, Gene Fortanely, Kalle Odenthal
Austin
Infotainment Multimedia and Telematics
(IMT)