I bet we have all found the issue that building random BSP versions of Android require old versions of Ubuntu which we long ago upgraded or don’t run at all.
This is easilly fixed with a few tools which are available on most distros these days, I happen to be using Fedora 18(ish) but similar should work on any distro.
Firstly install schroot, debootstrap and dpkg.
yum install schroot debootstrap dpkg
Make somewhere to install our chroots
mkdir /chroot/lucid-64
Now install the lucid 64bit into this, I am running from 64bit and want 64bit so its all easy.
debootstrap lucid /chroot/lucid-64 http://archive.ubuntu.com/ubuntu
Now create the file /etc/schroot/chroot.d/lucid-64.conf
[lucid-64]
type=directory
directory=/chroot/lucid-64
description=”Lucid 64bit for Android”
users=YOUR_USER
root-users=YOUR_USER
aliases=default
Now run shcroot to enter your chroot and use su to get to root user.
Final task is to install a few packages needed for a build, your may need different packages, this is just a list needed for random BSP.
apt-get install git-core flex bison gperf libesd0-dev zip gawk ant zlib1g-dev build-essential tofrodos bc
apt-get install lib32readline5-dev libstdc++6 lib32z1 lib32z1-dev lib32ncurses5 lib32bz2-1.0 lib32asound2 g++-multilib libx11-dev libncurses5-dev uboot-mkimage
One thing to watch out is not mixing repo/git operation inside and outside the chroot as there are likely different versions of git and it gets a little upset.