Didj Kernel Build Environment

From eLinux.org
Revision as of 07:28, 9 May 2011 by Jsujjava (Talk | contribs) (Add Category Didj)

(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search

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


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 "<NEW>" 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.


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 from your home folder:

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 EROOTFS_PATH=~/didj-rootfs
export RELEASE_PATH=~/release
export TFTP_PATH=~/tftp
export KERNELDIR=~/Didj-Linux-4222-20090422-1236/linux-2.6.20-lf1000/
export PATH=$PATH:/scratchbox/compilers/arm-gcc4.1-uclibc20061004/bin

Exit scratchbox


sudo cp /scratchbox/users/$USER/home/$USER/Didj-Linux-4222-20090422-1236/host_tools/mkimage /scratchbox/compilers/bin/
sudo mv /scratchbox/users/$USER/home/$USER/Didj-Linux-4222-20090422-1236/host_tools/mkimage /scratchbox/users/$USER/home/$USER/Didj-Linux-4222-20090422-1236/host_tools/mkimage.disable

Now go go back into scratchbox and run:

mkdir didj-rootfs
mkdir release
mkdir tftp

Change Kernel Settings

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

Create kernel.bin

To make a bootable kernel.bin for use in a distribution package run this command inside scratchbox:


The resulting kernel.bin will be in the scripts directory.