To build SiX from source, you'll need to be familiar with Git and Repo.
To initialize your local repository, use this command:
repo init -u https://github.com/SiX-ROM/manifest.git -b n-mr2.1
Then to sync source, use this command:
repo sync
After syncing is done, use these commands to build:
1.) . build/envsetup.sh
2.) brunch xxxx yyyy
xxxx= device name aka shamu
yyyy= build type (user,userdebug,eng)*
*if no build type is specified "user" is default
Setup to build Android from source
Instructions:
sudo apt-get remove openjdk-* icedtea-* icedtea6-*
sudo add-apt-repository ppa:openjdk-r/ppa && sudo apt-get update
#3) Install all available updates:
sudo apt-get upgrade && sudo apt-get dist-upgrade
#4) Install OpenJDK7 and Android dependencies:
sudo apt-get install adb
sudo apt-get install fastboot
sudo apt-get install openjdk-7-jdk
sudo apt-get install git
sudo apt-get install ccache
sudo apt-get install automake
sudo apt-get install lzop
sudo apt-get install bison
sudo apt-get install gperf
sudo apt-get install build-essential
sudo apt-get install zip
sudo apt-get install curl
sudo apt-get install zlib1g-dev
sudo apt-get install zlib1g-dev:i386
sudo apt-get install g++-multilib
sudo apt-get install python-networkx
sudo apt-get install libxml2-utils
sudo apt-get install bzip2
sudo apt-get install libbz2-dev
sudo apt-get install libbz2-1.0
sudo apt-get install libghc-bzlib-dev
sudo apt-get install squashfs-tools
sudo apt-get install pngcrush
sudo apt-get install schedtool
sudo apt-get install dpkg-dev
sudo apt-get install liblz4-tool
sudo apt-get install make
sudo apt-get install optipng
sudo apt-get install maven
sudo apt-get install python-mako
sudo apt-get install python3-mako
sudo apt-get install python
sudo apt-get install python3
sudo apt-get install syslinux-utils
sudo apt-get install flex
sudo apt-get install lib32ncurses5-dev
sudo apt-get install libxml2-utils
sudo apt-get install xsltproc
sudo apt-get install google-android-build-tools-installer
sudo apt-get autoremove
mkdir /bin && echo "export PATH=/bin:$PATH" >> ~/.bashrc
echo "export USE_CCACHE=1" >> ~/.bashrc
source ~/.bashrc
git config --global user.name "username"
git config --global user.email [email protected]
curl http://commondatastorage.googleapis.com/git-repo-downloads/repo > ~/bin/repo && chmod a+x ~/bin/repo
mkdir ~/SiXROM
next
cd ~/SiXROM
now
repo init -u https://github.com/SiX-ROM/manifest.git -b n-mr2.1
repo sync
if you need to force sync
repo sync --force-sync
prebuilts/misc/linux-x86/ccache/ccache -M 50G
. build/envsetup.sh && brunch shamu userdebug
or the long way
. build/envsetup.sh
lunch
pick your device number from menu
make -j4 otapackage
out/target/product/ >> /romname.zip
Flash ROM & Enjoy
to cleanup before build
make installclean
to delete output and more
make clean
to delete output and all cache (simillar to make clean)
make clobber
Having jack issues (ran out of memory), follow steps below.
open a terminal on your desktop and put this into your terminal,
substituting the # with how many GBs of RAM you have:
$ export JACK_SERVER_VM_ARGUMENTS="-Dfile.encoding=UTF-8 -XX:+TieredCompilation -Xmx#g"
now go into the root of the source folder and type the following:
./prebuilts/sdk/tools/jack-admin kill-server
then
./prebuilts/sdk/tools/jack-admin start-server
now go back and do step 13) time mka nougat
JAVA 1.8 INSTALL
Add the repository and update apt-get:
sudo add-apt-repository ppa:webupd8team/java
sudo apt-get update
Install Java8 and set it as default:
sudo apt-get install oracle-java8-set-default
Check version:
java -version
JAVA 8 REMOVE TO USE 7 FOR MM
sudo apt-get purge oracle-java8-installer
Then type:
javac -version
The output must be:
javac: command not found
and to install java 7 in Ubuntu I use this code in terminal:
sudo add-apt-repository ppa:webupd8team/java
sudo apt-get update
sudo apt-get install oracle-java7-installer
After that type the following to see if there is java installed:
java -version
The output must be:
java version "1.7.0_80"
INLINE KERNEL*
go to build/core/tasks
open kernel file
hash this one
#KERNEL_OUT := $(TARGET_OUT_INTERMEDIATES)/KERNEL_OBJ
add this one
KERNEL_OUT :=
make sure this one is like this
KERNEL_CONFIG := $(KERNEL_OUT)/.config
now go to device/moto/shamu
open BoardConfig.mk
TARGET_KERNEL_CONFIG := six_defconfig < your config
TARGET_KERNEL_SOURCE := kernel/moto/shamu
BOARD_KERNEL_IMAGE_NAME := zImage-dtb
KERNEL_TOOLCHAIN_PREFIX := arm-eabi-
KERNEL_TOOLCHAIN :=
now grab the tool chain from source or uber
https://bitbucket.org/UBERTC/arm-eabi-4.8
now add the toolchain here
prebuilts/gcc/linux-x86/arm/arm-eabi-4.8
now add your kernel source here
kernel/moto/shamu/
to build just the kernel
make clean
then
make -j4 bootimage