First of all, this is an experiment tutorial explaining how i complete compilation of Android source on a gentoo. The purpose of this serie of article is to provide a step-by-step way to create your own custom ROM for android.
I own a HTC Magic 32B (Google branded) so the tests i will perform is intended to work on this specific platform.
As you know, it can be risky to modify your Android ROM with a custom one. You’re warn ! I am not responsible of possible deterioration of your terminal !
So, let’s begin !
Part 1 – The Prerequisites (for Gentoo)
You may read the Official documentation located here : http://source.android.com/download.
Let’s start with dependencies installation,
emerge git gnupg emerge "<dev-java/sun-jdk-1.6" emerge flex bison gperf libsdl esound wxGTK emerge zip unzip curl zlib readline
Android does not compile with JDK-1.6 so we have merged a JDK-1.5, let’s configure your system to use it.
eselect java-vm list [1] sun-jdk-1.5 [2] sun-jdk-1.6 system-vm eselect java-vm set user sun-jdk-1.5
or
eselect java-vm set user 1
Now you need to refresh your environment :
sudo env-update && source /etc/profile
Environment is now ready let’s try to compile android system : How To make your custom Android ROM – Compiling the system (part 2)














I had to add x11-libs/libX11 as a dependency. I am currently building on a headless Gentoo VM.
Thanks for your comment !
Where have you added
x11-libs/libX11dependency ? In /etc/make.conf USE variable ?My box is used to build ffmpeg based softwares usually maybe I missed something !
I would just include it as step 5 after you do your first emerges
I added the -xcb USE variable inside /etc/make.conf since I don’t think I might need xcb