Skip to content

Instantly share code, notes, and snippets.

@jhorstmann
Created January 8, 2012 10:59
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save jhorstmann/1578001 to your computer and use it in GitHub Desktop.
Save jhorstmann/1578001 to your computer and use it in GitHub Desktop.
Setup an android-x86 build environment on a JiffyBox cloud server by domainFACTORY
Setup a JiffyBox by following the instructions, using Ubuntu 10.04 as the operating system. I created a CloudLevel 4 server with 16GB swap but it seems a smaller one would also be sufficient.
Login as root and create a normal user with sudo rights, as in a normal Ubuntu installation. Working as root should be really discouraged.
$ adduser jh
$ adduser jh adm sudo
Logout and login as the user you created above. Install a nicer editor, vim in my case.
$ sudo apt-get install vim
Disable root login by ssh and lock down the root account. In `/etc/ssh/sshd_config` change the setting "PermitRootLogin" to "no".
$ vim /etc/ssh/sshd_config
$ passwd -dl root
Instructions below are based on <http://source.android.com/source/initializing.html>.
The Sun JDK is no longer in Ubuntu's main package repository. In order to download it, you need to add the appropriate repository and indicate to the system which JDK should be used.
$ sudo vim /etc/apt/sources.list
Insert the following line
deb http://archive.canonical.com/ lucid partner
$ sudo apt-get update
$ sudo apt-get install sun-java6-jdk
Python is installed by default, but not the libxml2 bindings.
$ sudo apt-get install python-libxml2
Installing required packages for 64-bit
$ sudo apt-get install git-core gnupg flex bison gperf build-essential zip curl zlib1g-dev libc6-dev lib32ncurses5-dev ia32-libs x11proto-core-dev libx11-dev lib32readline5-dev lib32z-dev libgl1-mesa-dev g++-multilib mingw32 tofrodos python-markdown libxml2-utils xsltproc
Install the repo wrapper script.
$ mkdir bin
If `bin` exists it will be added to the PATH automatically by `~/.profile` on the next logon, or you can add it manually now:
$ export PATH=~/bin/:$PATH
Download the script and make it executable.
$ curl https://dl-ssl.google.com/dl/googlesource/git-repo/repo > ~/bin/repo
$ chmod +x ~/bin/repo
To build a USB bootable image you need syslinux version >= 4.0 which is newer than the version in Ubuntu 10.04. The easiest solution is to install the package from a newer version of Ubuntu
$ sudo sudo apt-get install genisoimage
$ mkdir ~/Downloads
$ cd ~/Downloads
$ wget http://de.archive.ubuntu.com/ubuntu/pool/main/s/syslinux/syslinux-common_4.04+dfsg-1ubuntu1_all.deb
$ wget http://de.archive.ubuntu.com/ubuntu/pool/main/s/syslinux/syslinux_4.04+dfsg-1ubuntu1_amd64.deb
$ sudo dpkg -i syslinux*
Downloading and building can take a long time, to avoid any problems if your ssh connections gets disconnected use `screen` or `byobu`.
Create a directory for the android source and start the download.
$ mkdir -p ~/Source/android-x86
$ cd ~/Source/android-86
$ repo init -u http://git.android-x86.org/manifest -b ics-x86
$ repo sync
Build the `generic_x86` image.
$ make iso_img TARGET_PRODUCT=generic_x86
From you local pc, download the image via scp and write it to an USB stick (`/dev/sdb` on my machine, better check this first).
$ scp jiffybox:~/home/Source/android-x86/out/target/product/generic_x86/generic_x86.iso .
$ sudo dd if=generic_x86.iso of=/dev/sdb
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment