Basic knowledge of Linux and compiling is required to be able to build a kernel. You need a modern Linux box (preferably) with git and linaro toolchain installed (


First, you need to setup the directory that within you will clone the kernel and initramfs repository. In this guide we will setup them in ~/semaphore but you can do it in any directory you want.


1. Setup build environment

In your home directory (~/) create the directories:

mkdir -p semaphore/output/galaxys
mkdir -p semaphore/output/captivate
mkdir -p semaphore/output/vibrant


The above will be the output directories for galaxy s, captivate and vibrant versions.

Build script also needs a symbolic link to your toolchain bin directory:

cd semaphore
ln -s gcc-linaro-arm-linux-gnueabihf-2012.09-20120921_linux/bin/ toolchain


The directory structure is complete. Now, you are ready to clone Semaphore code.


2. Setting up repositories

While you are still in ~/semaphore directory do the following.

Clone the main kernel repository branch jellybean:

git clone -b jellybean git://


Clone the initramfs:

git clone git://


Due to the fact that github does not preserve file permissions, I also included initramfs for each SGS variant as a tarball. You need to do the following only the first time you clone the ics-ramdisk repo. Of course, you can safely do this every time you fetch new code.

cd ics-ramdisk
tar zxvf jb_combo.tar.gz
tar zxvf jb_combo_c.tar.gz
tar zxvf jb_combo_v.tar.gz


3. Kernel configuration

I use 3 files to keep kernel's configuration for each variant. The files are placed in arch/arm/configs directory and they are named:



When, you will run the build script, the proper configuration will be used according to the selected variant (please see next section).

If you need any change kernel configuration, you have to edit these files before the building procedure. 

Leave these files unchanged, if you want Semaphore's default settings.

You are ready to build! 


4. Building the kernel

I create a script that automates the building procedure. The script can accept 2 arguments: 

a) Kernel variant: galaxys, captivate, vibrant 

b) s argument to build the kernel for hugemem compatible ROMs

If you run the script without arguments, it will build the normal version for galaxys.

To build the kernel for galaxys:

cd ~/semaphore/samsung-kernel-aries
./sbuild galaxys

and for 's' version:

./sbuild galaxys s


Wait few minutes (time depends on the machine - on my laptop 15-20) and hopefully the compilation will end. Watch the output for possible errors. A successful compilation must NOT have any error. It may have some warnings, but you can safely ignore them. If everything was OK, you must have the zImage file in 

~/semaphore/samsung-kernel-aries/arch/arm/boot directory.

Also the script will automatically prepare the CWM flashable zip and the ODIN/Heimdall flashable in ~/semaphore/output directory (in respective variant)


Now, you are ready to flash the kernel!


Footej Camera

Footej Camera

The most simple yet powerful camera app to capture your best moments!

Get it on Google Play 

Drive Syncrypt app

Semaphore Manager

Use Drive Syncrypt to keep in sync your phone files with Google Drive.

Get it on Google Play 

Semaphore Manager app

Semaphore Manager

Semaphore Manager app helps you to easily full control all Semaphore kernel features.

Get it on Google Play