These are the steps for setting up a toolchain and SDK to cross compile GNU Linux for the Beagleboard ver. C4 (OMAP 3530). The host is Ubuntu 10.04. The toolchain is then used to cross compile the Codelite package.
Toolchain
Start by making a filesystem and SDK with Narcissus. Be sure to include the option for the toolchain and X11 with xfce4. Save and extract the SDK to the root / of the partition.
mark@ubuntu:~$ cd /
mark@ubuntu:/$ sudo tar -xfv /home/mark/Downloads/angstrom-SDK.tar.gz
This should create the folders:
/usr/local/angstrom/…
/var/lib/opkg/…
I made the following changes to the environment-setup script located in /usr/local/angstrom/arm/../environment-setup
-export PKG_CONFIG_PATH=$SDK_PATH/$TARGET_SYS${libdir}pkgconfig
+export PKG_CONFIG_PATH=$SDK_PATH/$TARGET_SYS/usr/lib/pkgconfig
alias gcc=”arm-angstrom-linux-gnueabi-gcc”
alias g++=”arm-angstrom-linux-gnueabi-g++”
alias as=”arm-angstrom-linux-gnueabi-as”
alias strip=”arm-angstrom-linux-gnueabi-strip”
alias ld=”arm-angstrom-linux-gnueabi-ld”
CORE_NUM=`cat /proc/cpuinfo | grep processor | wc -l`
alias make=”make -j$CORE_NUM”
Beagleboard rootfs install
Save the file system tar.gz that Narcissus generated and untar it to the SD partition. There are a number of ways to boot the Beagleboard and the particulars of this step are not included. Once Angstrom has booted, login as root and issue the following commands.
root:~# opkg install angstrom-x11-base-depends
root:~# startxfce4
Cross Compiling
The Codelite project requires the wxWidgets GTK libraries.
Get the wxWidgets source package from http://www.wxwidgets.org/downloads/
Untar and cd to the root of the wxWidgets folder
Prepare the shell for cross compiling by running the environment-setup script. Don’t forget the period before /usr/…
wxWidgets-2.9.1$ . /usr/local/angstrom/arm/environment-setup
wxWidgets-2.9.1$ opkg-target update
wxWidgets-2.9.1$ mkdir build_gtk
wxWidgets-2.9.1$ cd build_gtk
Build wxWidgets with the Narcissus SDK:
build_gtk$ ../configure –enable-unicode –enable-debug –host=arm-angstrom-linux-gnueabi –with-gtk
build_gtk$ make -j2
build_gtk$ sudo make install
Build Codelite with Narcissus SDK:
Downloads$ svn co https://codelite.svn.sourceforge.net/svnroot/codelite/trunk codelite
Downloads$ cd codelite/
codelite$ ./configure –host=arm-angstrom-linux-gnueabi
codelite$ make -j2
Install on Beagleboard
Copy the wxWidgets libraries labled ‘libwx_xxx_xxxx.so’ to /usr/local/lib/ of the Beagleboard rootfs. Also copy the codelite folder to a location on the Beagleboards rootfs.
Boot the Beagleboard and issue the following commands as root user.
root:~# echo “/usr/local/lib” >> /etc/ld.so.conf
root:~# ldconfig
You can either edit the Makefile and change the paths or delete it and reconfigure a new one. I think it still needs to be edited even after a reconfigure iirc.
root:~# cd codelite
root:~/codelite# ./configure
root:~/codelite# make install
Codelite should now be up and running on the Beagleboard.
Links:
http://narcissus.angstrom-distribution.org/
http://prdownloads.sourceforge.net/wxwindows/wxWidgets-2.8.12.tar.gz
http://www.wxwidgets.org/downloads/