The source code for your particular application can be extracted pretty much anywhere. A project folder in your home directory works well.

The source code for your particular application can be extracted pretty much anywhere. A project folder in your home directory works well.

+

+

Depending on how you build the source code, you may need to create a few directories for the build scripts to put the finished images and binaries in. These directories will be TFTP_PATH, ROOTFS_PATH, EROOTFS_PATH, and RELEASE as defined in the environment variables script.

'''Tip:''' Set it up so you can have multiple source trees parallel to each other. Keep an untouched tree in this directory, along with trees for different major changes you are working on. This makes it easy to create and roll back patches, and keeps modifications organized and sensible.

'''Tip:''' Set it up so you can have multiple source trees parallel to each other. Keep an untouched tree in this directory, along with trees for different major changes you are working on. This makes it easy to create and roll back patches, and keeps modifications organized and sensible.

Revision as of 20:00, 6 July 2011

Contents

Summary

A build environment allows you to compile a kernel, root file system, or programs for use on your device. Commonly referred to as Cross Compiling, this will set up your Linux host PC to build for a different architecture, in this case the Pollux(LF1000) SoC.

How To

Installing Software

Source Code
The source code for your particular application can be extracted pretty much anywhere. A project folder in your home directory works well.

Depending on how you build the source code, you may need to create a few directories for the build scripts to put the finished images and binaries in. These directories will be TFTP_PATH, ROOTFS_PATH, EROOTFS_PATH, and RELEASE as defined in the environment variables script.

Tip: Set it up so you can have multiple source trees parallel to each other. Keep an untouched tree in this directory, along with trees for different major changes you are working on. This makes it easy to create and roll back patches, and keeps modifications organized and sensible.

Environment Variables

Once you got your toolchain and source code in their respective directories, you'll need to set up some environmental variables for the cross compiling, and the build scripts. The following paths should be copy and pasted into a text file, crosscompile_env_vars, and stored in your source code parent directory.

You need to use the command line to build the source code, so open up a terminal and go to the source code you want to build. If you run ls you should see linux-2.6/ packages/ and scripts/ from here you want to set your environment variables, as they are set up based on what directory you are in.

source ../crosscompile_env_vars

This will set your current terminal shell with these variables, if you close it, or use another one, you need to reset these variables by running that command.

You are now set up to start compiling for the LeapFrog Pollux Platform.