Tag/tag.png

Candidate for Deletion
This article may not be appropriate for this wiki, and may be deleted. More info...

Freescale 5329 And uClinux (with LTIB)

Version française ici

Introduction

The purpose of this document is the implementation, under Ubuntu, of the System-On-Module MCF5329 Fire Engine (from Freescale/Logicpd). On this system (available from Farnell), we are going to install uClinux via the image generator provided by Freescale : LTIB.

Commands and concepts present in this tutorial are often "simple", but it possible to waste a lot of time to find them and to use them correctly (especially with small embedded Linux). Therefore, in this tutorial, we retranscribe all of these (including these for TFTP, NFS,...).

Many commands present in this tutorial are, probably, exportable to other development boards.

Note of the author (Val) : This document is a synthesis of a lot of information, forums, tutorial, etc. found on the Web. I'm not a Linux/Ubuntu expert, that's why, some of these commands are not optimal and/or "clean".

Requirement

Reference documents

LTIB installation

LTIB is the uClinux image generator for the System-On-Module.

Extract the m53xxevb-20081215-ltib.iso file (source : Linux BSP for Freescale M5329EVB )

LTIB installation

Required packages installation (for LTIB)

LTIB authorizations

LTIB first launch

Re-execute LTIB :

and it works !

Minicom installation

In a terminal, install Minicom :

To configure it, execute :

In Serial port configuration, verify these options and save them :

To launch Minicom, execute this command in a terminal :

TFTP server installation

In a terminal, create a tftpboot directory :

and install these packages :

Open a text editor (root user) :

Write these lines :

(! there is a [enter] after the last brace !)

And save in /etc/xinet.d/tftp file (create it if necessary).

Then, with this text editor (root user), add these lines in the /etc/hosts.allow file :

And these lines in the /etc/hosts.deny file :

After, reload the configuration file :

And restart the TFTP server :

We check the TFTP server configuration :

This command should return :

NFS server installation

In a terminal, create a link to the rootfs directory (directory in the LTIB directory) :

Install the NFS package :

Add this line in the /etc/exports file (with a text editor in root mode) :

Reload the configuration :

And restart the NFS server :

C/C++ compiler installation

Download Sourcery G++ Lite Edition for ColdFire (uClinux) (here).

In a terminal, go to the download directory and launch the installation script :

Let the default choice for all options.

Add these lines into the .bashrc (/home/as/.bashrc) file :

Test the compiler :

This command should return :

To compile, execute this command :

C++ source file - input : helloworld.c - output : hello

and,

C source file - input : helloworld.c - output : hello

Kernel image generation

In a terminal, launche LTIB :

We arrive in the kernel options.

The kernel image is generated. Now, prepare it to be injected in the System-On-Module (we are in LTIB directory) :

uImage kernel image, in /tftpboot, is ready to be injected in the System-On-Module.

Root directory (in JFFS2) generation

In a terminal, launche LTIB :

choose "Target image: (jffs2)"

Quit these menus "Do you wish to save your new configuration? → yes".

Now, the root directory image is available (rootfs.jffs2). Copy it in the boot directory (terminal in the LTIB directory) :

The root directory is ready to be implemented in the System-On-Module.

Kernel image installation (in RAM, with root directory in NFS)

Connect the serial and Ethernet ports, form the System-On-Module to the computer.

DevelopmentBoardFreescaleMCF5329.jpg

In a terminal, launch Minicom (following commands are launched in Minicom).

Connect the supply to the System-On-Module and observe the boot sequence with Minicom. If a counter is present, interrupt it (Now, we are in bootloader menu).

To print (on the screen) the bootloader settings, execute this command :

To modify a setting, it is :

Example :

Check (through printenv) the configuration (and modify if necessary) :

Indicate to the OS where is the root directory (through a setting in the bootloader) :

(the root directory is in NFS on the development computer)

Load in RAM the kernel image :

And boot uClinux :

Root directory installation (in NAND Flash - JFFS2)

Here, we are in uClinux !

Execute these commands :

Reboot the System-On-Module and change this bootloader setting

Now, the root directory is operational from the System-On-Module

Kernel image installation (in NOR Flash)

Launch the System-On-Module and in the bootloader (U-Boot), Execute these commands

Remove a part of the NOR Flash memory protection, and erase it :

Load the kernel in the RAM, and copy it to the NOR Flash

Change the boot settings (bootloader option)

Now, the kernel boot from the NOR Flash, and the root directory is in NAND Flash. We have finished, the uClinux is fully functional from the System-On-Module !

Bug

Under uClinux AND with the kernel image in the NOR Flash, we have a bug : Ethernet is down.

To re-activate Ethernet, execute these commands (under uClinux) :

(0008ee013f7c is MY System-On-Module MAC address. Modify this value for your System-On-Module (Sticker on the card))

Check Ethernet with a simple ping :


CategoryDevelopment

Freescale5329AndUclinux (last edited 2011-05-16 15:26:12 by ug-uyst-s-0003)