Didj crosstool-NG Build Environment

Background

I have used these instructions in the past to successfully build uclibc eabi toolchains for Didj. They are based on instructions I originally found at http://blog.leshak.ru/english/pages/how-to-build-cross-toolchain-arm-uclibc-eabi-using-crosstool-ng/

(That site was not responding as of this writing).

Prerequisites

build-essential bison flex texinfo or makeinfo (if you can't apt-get makeinfo try texinfo) automake libtool cvs ncurses (libncurses5-dev)

Download and unpack crosstool-NG (latest version 1.7.1 as of 17 July 2010)

Configure and install

Add the path to the ct-ng

Create a temporary folder for the assembly of the package

Copy preconfigured config files

If necessary, you can change the configuration (but it usually works fine without changes)

You can usually just change the path to the cross-toolchain

Configure CT_PREFIX_DIR to change the path to the cross-toolchain

this section previously told you to use the following as the prefix dir, unfortunately it causes issues, such as permission denied errors depending on how the user has their machine setup:

It has now been tested and the following should allow you to install the toolchain without issues:

if you look at Configure and install we use the $HOME/ctng folder, we should probably use $HOME/x-tools then we wouldn't need to edit the .config file at all. Run the compilation, get a coffee - have lunch, etc. (after “.” you can specify the number of concurrently running tasks. Set it to equal the number of CPU cores in your system)

An example log of a successful compilation: (There is one more step after this finishes)

'''Last step: Create a file named 'crosscompile' with the contents below (edit accordingly for your directory structure). Whenever you want to compile anything for the device, enter 'source crosscompile' first to set the environment variables. compiling for didj, edit the export PROJECT_PATH= line to where you unpacked your kernel sources, use:'''

'''Compiling for Explorer, use the following, if you edit the export PROJECT_PATH line it will change all of the other target path dirs for you:

The PROJECT_PATH will be the folder that you unpack the source to, so if I unpacked the explorer kernel sources in my $HOME dir that would be:

Create the directories for the rootfs of your shiny new kernel

You should also create the directories to save any tears later if a config file can't find a directory it needs so after running the crosscompile script for the first time do the following:

These are the various directories that the Leapfrog sources expect to put things in according to the different scripts that are available for us to use.

For instance, the make_rootfs.sh file in the Didj kernel sources ($PROJECT_PATH/scripts dir) will eventually make you a kernel and a whole rootfs and place it all in the $ROOTFS_PATH folder, from there you could mount your $ROOTFS_PATH as an NFS share as if it were actually on the Didj/Explorer (a tutorial for this will be along shortly....)

Once you've made your folders you should be set to compile your own apps. If you want to compile a kernel you need to edit the makefile in the kernel source dir ($PROJECT_PATH/linux-2.6/ for the explorer, $PROJECT_PATH/linux-2.6.20-lf1000 for the Didj) and comment out the CROSS_COMPILE= line with a #:

once thats done you should be able to make a kernel for yourself, enter the kernel source dir and execute:

This will build a stock Explorer kernel for you, of course feel free to do a make menuconfig after the initial make above.

on the Leapster Explorer you may well want to test the new kernel non destructively via usb, see the Testing Kernels via USB Boot tutorial for more details.