Phytec phyCORE-iMX35/Pengutronix/Embedded

Installing and building the Phytec Linux BSP PD10.1.1 for phyCORE-i.MX35 on a Gentoo host.

About this tutorial
The exact commands needed to download, install and build the Phytec Linux BSP are shown. The tool ptxdist from Pengutronix is used to cross-compile the Linux kernel and the Linux root file system.

After the kernel and the root file system have been built on the host system, the target is booted as a diskless system. The bootloader u-boot loads the Linux kernel from a TFTP server. The Linux kernel mounts the root file system via NFS.

In this example the size of the created root file system is about 30MB.

For installation and building you need the tools: wget, expect, sudo. Emerge these tools

For testing and using the Linux BSP on a phyCORE-i.MX35x board you need the utilities: tftp, nfs, minicom, taylor-uucp. Emerge these tools

Folder names
IMPORTANT: These three folders are used for

Downloads:

Installation:

Source:

Archives and docs which are needed to build the tools are downloaded in the folder.

All software is installed in the folder.

Archives which are downloaded by ptxdist are downloaded into the folder.

Define environment variables:

Privileges
Usually you can use a simple user account to execute the commands. Root privileges are needed seldom.

Download files
These folders are used for downloads and should be created:

Download BSP

Download ptxdist

Download installation doc

Download toolchain, if it is not installed

Download Hardware Manual iMX35x

Download Quick Start iMX35

Useful links
Phytec phyCORE-i.MX35 FAQ (German)

Pengutronix ptxdist

Pengutronix ptxdist documentation

Pengutronix ptxdist downloads

Pengutronix toolchain

Pengutronix toolchain downloads

Pengutronix BSPs for Phytec boards

Installation Folders
These folders are used for installation and should be created:

These folders are used and created during installation

Installation of ptxdist
Installation of ptxdist is described in OSELAS.BSP-Phytec-phyCORE-i.MX35-Quickstart.pdf on page 5ff.

Extract source of ptxdist

List files in the folder, just check if you are in the correct folder

Configure, build and install ptxdist

ptxdist source folder is no longer needed, you may delete it, if you like.

Add path of ptxdist to the PATH variable

Check which ptxdist is called

Check if the link 'ptxdist' points to the correct version

'$MY_DEVELOP/phyCORE-iMX35/OSELAS/tools/bin/ptxdist' should point to'$MY_DEVELOP/phyCORE-iMX35/OSELAS/tools/lib/ptxdist-2010.08.0/bin/ptxdist'

Configuration of ptxdist is described in OSELAS.BSP-Phytec-phyCORE-i.MX35-Quickstart.pdf on page 8ff.

Select a common source directory, where all the archives are downloaded, only missing archives are downloaded.

Source Directories ---> old value ${PTXDIST_WORKSPACE}/src

new value /MyDevelop/src

Installation of Toolchain
Building the toolchain is described in OSELAS.BSP-Phytec-phyCORE-i.MX35-Quickstart.pdf on page 10ff.

Extract toolchain

Select ptxconfig

info: selected ptxconfig: 'ptxconfigs/arm-1136jfs-linux-gnueabi_gcc-4.3.2_glibc-2.8_binutils-2.19_kernel-2.6.27-sanitized.ptxconfig' Build the tool chain

Building of the Linux Root File System
Building the Linux root file system is described in OSELAS.BSP-Phytec-phyCORE-i.MX35-Quickstart.pdf on page 14ff.

Extract Linux BSP

Select ptx config and platform config

info: selected platformconfig: 'configs/phyCORE-i.MX35-2010.08.0/platformconfig'

found and using toolchain: '/opt/OSELAS.Toolchain-1.99.3/arm-1136jfs-linux-gnueabi/gcc-4.3.2-glibc-2.8-binutils-2.19-kernel-2.6.27-sanitized/bin' If toolchain is not found or you want to change the toolchain

Configure the Linux file system. For the first tests skip this and use the default settings.

Configure the Linux kernel. For the first tests skip this and use the default settings.

Build the root file system

Create device nodes
When you have executed the last command without root privileges, it will try to start 'sudo'.

--- For a proper NFS-root environment, some device nodes are essential. In order to create them root privileges are required. ---

(Please press enter to start 'sudo' to gain root privileges.) When you don't press enter in time, it will end with the following warning:

WARNING: NFS-root might not be working correctly! You can call ptxdist again and press the enter key in time

(Please press enter to start 'sudo' to gain root privileges.) password: Press enter to start sudo and enter the root password. Device nodes will be created now

Setup Board
Connection to the board and booting Linux is described in OSELAS.BSP-Phytec-phyCORE-i.MX35-Quickstart.pdf on page 16ff.

Setup connection between host and target. Use the top serial port

Test connection to target and setup the environment

Copy image to tftp folder

Configure tftp server
Setup tftp server

Start the tftp server

Configure nfs server
Setup nfs server

Start the nfs server

U-boot
Connect to the board. Use the top serial port. Baud rate is usually 115200 8N1. You can use the terminal application minicom

Or you can use the application cu to connect to the board.

Note: When I use cu, I get only the output from the target. No characters are sent to the target. Therefore I am using minicom.

This is the command line of u-boot

Change config file

Save with CTRL-D, exit without saving: CTRL-C

Save the environment

Connect the ethernet cable to the board and boot the board

Now u-boot should load via tftp the Linux kernel and mount via nfs the root file system. After a short time you should be able to login as root.

Target Logs
Boot Log: Output when the board is booted and Linux is started..

Simple Commands: Output of some simple commands executed on the target.