AI OS compilation
Note: If you don't want to use OpenEmbedded, you can also build separately the kernel with u-boot and x-load, following these instructions.
If you're looking at building your own application rather than the whole AIOS, please follow this tutorial.
Contents |
Setting Up the Build Environment
In order to compile the AI OS, you need to follow those steps on an Ubuntu 10.04 x86 machine:
You need to install the required packages for Openembedded:
sudo -s apt-get install sed wget cvs subversion git-core coreutils unzip texi2html texinfo libsdl1.2-dev \ docbook-utils gawk python-pysqlite2 diffstat help2man make gcc build-essential g++ libxml2-utils \ python-psyco docbook python-gobject-dev python-gtk2-dev m4 git subversion mercurial gtk-doc-tools \ tofrodos comerr-dev bitbake uboot-mkimage chrpath exit
Thre is a bug in Ubuntu 10.04 to unzip some files. You may have to do the following:
git clone git://git.savannah.gnu.org/gzip.git cd gzip ./bootstrap ./configure prefix=/usr make sudo -s make install
And make sure the gzip binary is the default one in the path ("ls -l `which gzip`" - make sure it has todays date). The new one installs to /usr/bin/gzip while many users have a gzip at /bin/gzip earlier in the path search.
Check that /bin/sh (ls -l /bin/sh) is not symbolically linked to dash. "dash" is a POSIX compliant shell that is much smaller than "bash" -- however some broken shell scripts still make use of bash extensions while calling into /bin/sh. To work around this issue call "sudo dpkg-reconfigure dash" and select No when it asks you to install dash as /bin/sh.
You need to clone the ai openembedded tree. It needs to be in a /OE folder as there are a few absolute paths:
sudo -s mkdir /OE chown your_username:your_username /OE exit cd /OE mkdir /OE/TI git clone git://git.alwaysinnovating.com/ai.openembedded.dev mkdir /OE/build cp -a /OE/ai.openembedded.dev/aios/conf/ /OE/ai.openembedded.dev/aios/source-me.txt /OE/build
Private Texas Instruments files
If you build the whole image including the 3D and video accelerators, you need to download from Texas Instruments website a couple of files to be put in /OE/TI.
Download Graphics_SDK_setuplinux_4_00_00_01.bin to /OE/TI from http://software-dl.ti.com/dsps/dsps_public_sw/sdo_sb/targetcontent/gfxsdk/4_00_00_01/index_FDS.html ('recipes powervr-drivers/libgles-omap3_4.00.00.01.bb and powervr-drivers/omap3-sgx-modules_1.4.14.2616.bb).
Download ti_cgt_c6000_7.0.3_setup_linux_x86.bin to /OE/TI from https://www-a.ti.com/downloads/sds_support/TICodegenerationTools/download.htm (recipe ti/ti-cgt6x.inc).
Building Images
You can now launch the compilation (don't run bitbake as root):
cd /OE/build source source-me.txt bitbake -k --verbose ai-dev-image ai-initramfs-image ai-install-image u-boot x-load linux-omap-psp
This will take around 24 hours on a decent computer. Then you need to recompile linux-omap-psp to get the kernel with the correct initramfs:
bitbake -fi compile linux-omap-psp exit bitbake linux-omap-psp
Building the image requires around 30GB of space. The option rm_work is enabled to save space.
Building Packages
Building individual packages for distribution or testing is certainly possible:
cd /OE/build source /OE/build/source-me.txt bitbake ai-daemon
Constructed .ipk files can be found under /OE/build/tmp/deploy/glibc/ipk/armv7a/*.ipk