Didj Kernel Build Environment

Steps to a working didj build environment using Ubuntu 9.1 (Karmic Koala)
Add the following line your "/etc/apt/sources.list":

"deb http://scratchbox.org/debian/ stable main"

Install Scratchbox:

sudo apt-get update sudo apt-get install scratchbox-core scratchbox-devkit-cputransp scratchbox-devkit-debian scratchbox-libs scratchbox-toolchain-arm-gcc4.1-uclibc20061004

Add these settings to /etc/sysctl.conf

vm.vdso_enabled = 0 vm.mmap_min_addr = 4096

Run:

sudo sysctl -p

Add yourself to the "scratchbox" user group:

sudo /scratchbox/sbin/sbox_adduser "$USER"

Make a symbolic link to avoid sudo errors:

sudo ln -s /scratchbox/tools/bin/fakeroot /scratchbox/tools/bin/sudo

At this point you will need to log out of and then back in to your computer and re-open terminal.

Enter "scratchbox" into a terminal to start the sandbox environment:


 * 1)    Next, enter "sb-menu" to bring up the Scratchbox configuration menu.
 * 2)    Then you'll want to select "Setup".
 * 3)    Select "" for a new target, then enter "didj" as your target name.
 * 4)    Choose "arm-gcc4.1-uclibc20061004" as your compiler.
 * 5)    Then, browse down to select the "cputransp" development kit. Then select "DONE".
 * 6)    Next, select "qemu-arm-cvs" for your CPU-transparency method.
 * 7)    Then, choose "NO" for extracting a rootstrap to the target.
 * 8)    Select "YES" to install files on the target. Choose any extra packages to install, and then select "OK".
 * 9)    Finally, choose "YES" to select the target you just created.

Run:

wget http://medialib.leapfrog.com/didj_opensource_code/Didj-Linux-4222-20090422-1236.tar.gz

And decompress it:

tar -xzf Didj-Linux-4222-20090422-1236.tar.gz

Run:

nano .bashrc

And put in this text:

export PROJECT_PATH=~/Didj-Linux-4222-20090422-1236 export TARGET_MACH=LF_LF1000 export CROSS_COMPILE=sbox-arm-linux-uclibc export ROOTFS_PATH=~/didj-rootfs export RELEASE_PATH=~/release export TFTP_PATH=~/tftp

Exit then go back into scratchbox to load the environment variables.

Comment out lines 50 and 51 in Didj-Linux-4222-20090422-1236/linux-2.6.20-lf1000/install.sh

Run:

mkdir didj-rootfs mkdir release mkdir tftp ./Didj-Linux-4222-20090422-1236/scripts/make_rootfs.sh

I had to comment out the lines that make the uImage in the install.sh file in the linux subdirectory. If anyone knows why this returns a file not found error, please let me know.

However, this setup does build a kernel image without reporting any errors.

The kernel is at Didj-Linux-4222-20090422-1236/linux-2.6.20-lf1000/vmlinux The ~/tftp path will have kImage and zImage

If you want to change kernel options, make sure you are not in scratchbox and run these commands:

sudo apt-get install libncurses5-dev cd /scratchbox/users/$USER/home/$USER/Didj-Linux-4222-20090422-1236/linux-2.6.20-lf1000 make menuconfig