[HTC One S] atrus5:
This is a step by step guide to compiling Rootbox on your computer.

Requirements:

willingness to learn as you go

Ubuntu 12.04 64bit, dual-booted or virtual machine

some space on your Ubuntu partition, I'd say about 50GB to be very safe

an internet connection

You will need to setup the android environment on your computer first. The next step will depend on what version of ubuntu you use. The steps are laid out for version 12.10 of Ubuntu. If you have 12.04 you will have to search to make sure the files you are installing are the same version. I use a program called synaptic package manager to check to make sure the correct files are being installed. Most Ubuntu OS do not install it by default. To install it type this into a terminal:

sudo apt-get install synaptic

enter this command into the terminal.

sudo apt-get install git-core gnupg flex bison gperf libsdl1.2-dev libesd0-dev libwxgtk2.8-dev squashfs-tools build-essential zip curl libncurses5-dev zlib1g-dev pngcrush schedtool g++-multilib lib32z1-dev lib32ncurses5-dev lib32readline6-dev gcc-4.7-multilib g++-4.7-multilib libxml2-utils libxml2 xsltproc

After that is all installed you will need to get rid of any java installed on your system.

to get rid of it type this into the terminal

sudo apt-get remove openjdk* icedtea* default-jre

This should remove all instances of java. Now to get the java that you want.

to get java add this ppa.

sudo add-apt-repository ppa:webupd8team/java
sudo apt-get update
sudo apt-get install oracle-java6-installer

Now to start building the rom.

in terminal type

mkdir ~/android/rootbox/

then type

cd ~/android/rootbox

in terminal type

repo init -u git://github.com/Root-Box/platform_manifest.git -b jb-mr1

in terminal type

gedit .repo/local_manifest.xml

place this inside file and save file

<?xml version="1.0" encoding="UTF-8"?>
<manifest>

<project path="device/htc/ville" name="atrus5/device_htc_ville" remote="gh" revision="master" />
<project name="android_kernel_htc_msm8960" path="kernel/htc/msm8960" remote="cm" revision="cm-10.1" />
<project path="device/htc/msm8960-common" name="android_device_htc_msm8960-common" remote="cm" revision="cm-10.1" />
<project path="vendor/htc/ville" name="atrus5/vendor_htc_ville" remote="gh" revision="master" />

</manifest>

in terminal type

repo sync

Go have some food, maybe watch a movie, go golfing, whatever you want to do cause this will take quite awhile. When that is done in terminal type

gedit vendor/rootbox/vendorsetup.sh

add this to end of file and save

add_lunch_combo rootbox_ville-userdebug

in terminal type

gedit vendor/rootbox/products/ville.mk

add this to file and save

# Specify phone tech before including full_phone
$(call inherit-product, vendor/rootbox/configs/gsm.mk)

PRODUCT_RELEASE_NAME := ville

# Boot animation
TARGET_SCREEN_HEIGHT := 960
TARGET_SCREEN_WIDTH := 540

# Inherit some common CM stuff.
$(call inherit-product, vendor/rootbox/configs/common.mk)

# Inherit device configuration
$(call inherit-product, device/htc/ville/device_ville.mk)

# Ville Overlay
PRODUCT_PACKAGE_OVERLAYS += vendor/rootbox/overlay/common

# PA OVERLAY_TARGET
OVERLAY_TARGET := pa_hdpi

# Setup device specific product configuration.
PRODUCT_DEVICE := ville
PRODUCT_NAME := rootbox_ville
PRODUCT_BRAND := HTC
PRODUCT_MODEL := HTC One S
PRODUCT_MANUFACTURER := HTC

# Copy Bootanimation
PRODUCT_COPY_FILES += \
vendor/rootbox/prebuilt/hdpi/bootanimation.zip:system/media/bootanimation.zip

in terminal type

gedit vendor/rootbox/products/AndroidProducts.mk

add this to end of file and save. (note: you will need to add a ' \' to the line before it, without the quotations. that is a space before the \). For example here is what my last two lines look like. $(LOCAL_DIR)/t0lte.mk \

$(LOCAL_DIR)/ville.mk

$(LOCAL_DIR)/ville.mk

This part is optional. I do these steps just to make sure that I have all the necessary files to compile the rom.

plug in your phone

in terminal type

cd device/htc/ville

and

./extract-files.sh

Ok now back to building the rom. You don't have to do the above steps, it's just to make sure.

in terminal type

cd ~/android/rootbox

or wherever you have placed your rootbox build. This is where I store mine.

in terminal type

./build_rootbox.sh ville

This should compile the rom and you can flash the nightly build onto your phone. The file is in the out/target/product/ville directory.

I hope this helps.