User:Carlsojs

Joel Carlson

Rose-Hulman Institute of Technology, Class of 2011
 * Bachelor's of Computer Engineering, 2011
 * Master's of Electrical and Computer Engineering, 2011

Development Environment Setup
I am using Ubuntu 10.04 64-bit. You may have to download different tools if using a different environment (e.g. - 32-bit vs 64-bit). Assume most instructions are taking place in the location, unless otherwise indicated.

Some of these steps were taken from BeagleBoard and other locations.

Git
Git is an excellent tool for maintaining version control. It is also needed to download some of the necessary source code. To install git, run the command  .

After installing Git, consider looking for the file  , and editing it so that future commits will be registered to your name/email: [user] name = Your Name email = username@address.com

Cross-Compiler
Download the CodeSourcery Lite toolchain. The version below (arm-2011.03-41) was compiled against the Linux 2.6.38 kernel headers, though CodeSourcery says they should be fine for compiling kernels back to around 2.6.16. $ sudo apt-get install ia32-libs # CodeSourcery is intended for 32-bit host systems, and thus on 64-bit Ubuntu you need to install ia32-libs $ mkdir -p ${HOME}/tools $ cd tools $ wget http://www.codesourcery.com/sgpp/lite/arm/portal/package8739/public/arm-none-linux-gnueabi/arm-2011.03-41-arm-none-linux-gnueabi-i686-pc-linux-gnu.tar.bz2 $ tar -xjvf arm-2011.03-41-arm-none-linux-gnueabi-i686-pc-linux-gnu.tar.bz2 Add the location of this toolchain to your PATH so you don't have to enter it in the future. I am using zsh, so I added the line   to the file  (it is necessary to close and re-open the terminal after modifying .zshrc).

Linux Kernel
Obtain and build the Linux kernel. $ sudo apt-get install uboot-mkimage # Necessary for building a u-boot wrapped image $ git clone git://git.kernel.org/pub/scm/linux/kernel/git/stable/linux-3.0.y.git kernel_3.0.1 $ cd kernel_3.0.1 $ make mrproper $ make ARCH=arm omap2plus_defconfig $ make ARCH=arm CROSS_COMPILE=arm-none-linux-gnueabi- uImage This should create a file  in.

X-Loader
Obtain and build the X-Loader source. $ git clone git://gitorious.org/x-loader/x-loader.git x-loader $ cd x-loader $ make distclean $ make omap3530beagle_config $ make CROSS_COMPILE=arm-none-linux-gnueabi- This should create a file  in the main x-loader directory.

U-Boot
Obtain and build the U-Boot source. $ git clone git://git.denx.de/u-boot.git u-boot $ cd u-boot $ git checkout --track -b omap3 origin/master $ make CROSS_COMPILE=arm-none-linux-gnueabi- mrproper $ make CROSS_COMPILE=arm-none-linux-gnueabi- omap3_beagle_config $ make CROSS_COMPILE=arm-none-linux-gnueabi- This should create a file  in the main u-boot directory.

NOTE 2011-08-14: When I tried to compile, make gave me errors about "asm/arch/gpio.h" not existing. When I found that directory, gpio.h was indeed nonexistent. If you don't get this error, don't worry about it (a future repository update may fix it). My temporary fix that allowed it to compile with no errors/warnings that I saw: $ cd arch/arm/include/asm $ cp omap_gpio.h arch-omap3/gpio.h $ cd ../../../.. $ make CROSS_COMPILE=arm-none-linux-gnueabi-

OpenEmbedded and Bitbake
$ mkdir -p oe/build/conf $ cd oe $ wget http://download.berlios.de/bitbake/bitbake-1.12.0.tar.gz $ tar -xvf bitbake-1.12.0.tar.gz $ mv bitbake-1.12.0.tar.gz bitbake $ git clone https://github.com/openembedded/openembedded.git $ cd openembedded $ git checkout --track origin/org.openembedded.dev $ export OEBASE="/home/user/beagle/oe" #<-- Added to ~/.zshrc $ export PATH="${OEBASE}/bitbake/bin:${PATH}" #<-- Added to ~/.zshrc $ export BBPATH="${OEBASE}/build:${OEBASE}/openembedded" #<-- Added to ~/.zshrc $ export BB_ENV_EXTRAWHITE="OEBASE" #<-- Added to ~/.zshrc $ cd ../build/conf $ cp ../../openembedded/conf/local.conf.sample local.conf.sample The local.conf.sample was copied just for reference. Create a   file and put the following in it: DL_DIR = "${OEBASE}/build/sources"
 * 1) Where BitBake places downloaded sources

BBFILES = "${OEBASE}/openembedded/recipes/*/*.bb"
 * 1) Where BitBake finds recipes

TMPDIR = "${OEBASE}/build/tmp"
 * 1) Force BitBake to put temporary files in a specific location

MACHINE = "beagleboard"
 * 1) The machine to build for

DISTRO = "angstrom-2010.x"
 * 1) The distribution policy to follow

TOOLCHAIN_VENDOR = "-none" TOOLCHAIN_TYPE = "external" TOOLCHAIN_BRAND = "csl" TOOLCHAIN_PATH = "${HOME}/tools/arm-2011.03"
 * 1) To use our own CodeSourcery Lite toolchain

IMAGE_FSTYPES = "tar.gz"
 * 1) The image file system types
 * 2) jffs2, tar(.gz|bz2), cpio(.gz), cramfs, ext2(.gz), ext3(.gz), ext4(.gz|.bz2),
 * 3) squashfs, squashfs-lzma

PARALLEL_MAKE =	"-j 4"
 * 1) Enable parallel make

BB_NUMBER_THREADS = "2" This may or may not be a problem, but I did it anyway (from the OpenEmbedded User Manual). Open   and add to the bottom of the file:
 * 1) Run multiple bitbake threads in parallel

For this one time only (the sysctl.conf will handle it on subsequent reboots of your machine), run the command  (if you get permission denied errors, run , then  , and finally.

Then build the beagleboard-demo-image as a test. $ sudo apt-get install python-ply python-progressbar diffstat texi2html chrpath # BitBake complained about not having these $ cd /bin $ sudo mv sh sh.old # This and the following are because BitBake has problems unless using bash, $ sudo ln -s bash sh # and my original /bin/sh was pointing to dash $ cd ${OEBASE}/build $ bitbake beagleboard-demo-image