Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Phablet #1

Open
wants to merge 4 commits into
base: cm-10.1
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
25 changes: 8 additions & 17 deletions README.mkdn
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
Local manifest addon for building CM-10.1 (4.2.1_r1) for Kindle Fires
Local manifest addon for building phablet (CM-10.1 4.2.1_r1) for Kindle Fires

Getting Started
---------------
Expand All @@ -9,33 +9,24 @@ Also get and be familiar with [Git and Repo](http://source.android.com/download/

Make a build directory:

mkdir Andoid (or whatever name you choose)
cd Android (or the name you chose)

mkdir ~/Andoid (or whatever name you choose)

To initialize your local repository using the CyanogenMod manifest, use commands like these:
To initialize your local repository using the phablet, use commands like these (refer to https://wiki.ubuntu.com/Touch/Building):

repo init -u git://github.com/CyanogenMod/android.git -b cm-10.1
phablet-dev-bootstrap ~/Android

curl -L -o .repo/local_manifest.xml -O -L https://raw.github.com/KFire-Android/android_local_manifest/cm-10.1/local_manifest.xml

( or Download: https://github.com/KFire-Android/android_local_manifest/blob/cm-10.1/local_manifest.xml
and place it in ~/Android/.repo/local_manifest.xml (or ~/'name you chose'/.repo)
curl -L -o .repo/local_manifest.xml -O -L https://raw.github.com/JoeyJiao/android_local_manifest/phablet/local_manifest.xml

Then to sync up:

repo sync

Need to pull down the prebuilt add-ons for CM:

vendor/cm/get-prebuilts
repo sync -j4

And finally to build the CM ROM:

. build/envsetup.sh
(for 1st gen Kindle Fire:) brunch otter
(for 2nd gen Kindle Fire:) brunch otter2
(for Kindle Fire HD 8.9:) brunch jem
(for Kindle Fire HD 8.9:) brunch jem -j4

Look for out/target/product/<devicename>/cm-10.1-<date:YYYYMMDD>-UNOFFICIAL-<devicename>.zip
Look for out/target/product/<devicename>/phablet-<date:YYYYMMDD>-.zip

20 changes: 10 additions & 10 deletions local_manifest.xml
Original file line number Diff line number Diff line change
Expand Up @@ -2,19 +2,19 @@
<manifest>

<!-- local projects -->
<project path="kernel/amazon/otter-common" name="KFire-Android/kernel_omap_otter-common" />
<project path="kernel/amazon/bowser-common" name="KFire-Android/kernel_omap_bowser-common" />
<project path="kernel/amazon/otter-common" name="KFire-Android/kernel_omap_otter-common" remote="github" revision="cm-10.1" />
<project path="kernel/amazon/bowser-common" name="KFire-Android/kernel_omap_bowser-common" remote="github" revision="cm-10.1" />

<project path="device/amazon/omap4-common" name="KFire-Android/android_device_amazon_omap4-common" />
<project path="device/amazon/otter-common" name="KFire-Android/android_device_amazon_otter-common" />
<project path="device/amazon/bowser-common" name="KFire-Android/android_device_amazon_bowser-common" />
<project path="device/amazon/omap4-common" name="KFire-Android/android_device_amazon_omap4-common" remote="github" revision="phablet" />
<project path="device/amazon/otter-common" name="KFire-Android/android_device_amazon_otter-common" remote="github" revision="phablet" />
<project path="device/amazon/bowser-common" name="JoeyJiao/android_device_amazon_bowser-common" remote="github" revision="phablet" />

<project path="device/amazon/otter" name="KFire-Android/android_device_amazon_otter" />
<project path="device/amazon/otter2" name="KFire-Android/android_device_amazon_otter2" />
<project path="device/amazon/tate" name="KFire-Android/android_device_amazon_tate" />
<project path="device/amazon/jem" name="KFire-Android/android_device_amazon_jem" />
<project path="device/amazon/otter" name="KFire-Android/android_device_amazon_otter" remote="github" revision="phablet" />
<project path="device/amazon/otter2" name="KFire-Android/android_device_amazon_otter2" remote="github" revision="phablet" />
<project path="device/amazon/tate" name="KFire-Android/android_device_amazon_tate" remote="github" revision="cm-10.1" />
<project path="device/amazon/jem" name="JoeyJiao/android_device_amazon_jem" remote="github" revision="phablet" />

<project path="vendor/amazon" name="KFire-Android/proprietary_vendor_amazon" />
<project path="vendor/amazon" name="KFire-Android/proprietary_vendor_amazon" remote="github" revision="cm-10.1" />

</manifest>

95 changes: 95 additions & 0 deletions ubuntu-touch-android.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,95 @@
#!/bin/bash

usage(){
cat <<EOF
usage: $(basename $0) <-d DEVICE> [-v VENDORS] [-h] [-j JOBS] [-p BUILD_JOBS] [-c] [-r REFERENCE]

Phablet build script

Required arguments:
-d DEVICE Target device to build

Optional arguments:
-v VENDORS Comma separated list of devices to Setup such as
maguro, manta, mako, grouper
-h HELP Show this help message and exit
-j JOBS Amount of sync jobs
-c CONTINUE Continue a previously started sync
-r REFERENCE Use another dev enviroment as reference for git
-l LOCAL_MANIFEST Local manifest address
-p BUILD_JOBS Amount of build jobs

EOF
exit 1
}

JOBS=""
CONTINUE=0
REFERENCE=""
LOCAL_MANIFEST=""
BUILD_JOBS=$(grep processor /proc/cpuinfo | wc -l)

while getopts hd:v:j:cr:l:p: opt; do
case $opt in
h) usage;;
d) DEVICE=$OPTARG;;
v) VENDORS=$OPTARG;;
j) JOBS=$OPTARG;;
c) CONTINUE=1;;
r) REFERENCE=$OPTARG;;
l) LOCAL_MANIFEST=$OPTARG;;
p) BUILD_JOBS=$OPTARG;;
*) usage;;
esac
done

[ "$DEVICE" == "" ] && usage

# check if is root
if [ "$(id -u)" == "0" ]; then
SUDO=""
else
SUDO="sudo"
fi

builddir=phablet-build-$DEVICE

[ "$(dpkg --print-architecture)" == "amd64" ] || exit 1

# set up multiarch
dpkg --print-foreign-architectures | grep -q i386 || dpkg --add-architecture i386
$SUDO apt-get update

# add cross build env including the needed i386 packages
$SUDO apt-get -y install git gnupg flex bison gperf build-essential \
zip bzr curl libc6-dev libncurses5-dev:i386 x11proto-core-dev \
libx11-dev:i386 libreadline6-dev:i386 libgl1-mesa-glx:i386 \
libgl1-mesa-dev g++-multilib mingw32 tofrodos phablet-tools \
python-markdown libxml2-utils xsltproc zlib1g-dev:i386 schedtool \
openjdk-6-jdk

# get the git tree
[ "$VENDORS" == "" ] || ARGS=" -v $VENDORS"
[ "$JOBS" == "" ] || ARGS="$ARGS -j $JOBS"
[ "$CONTINUE" == "0" ] || ARGS="$ARGS -c"
[ "$REFERENCE" == "" ] || ARGS="$ARGS -r $REFERENCE"
phablet-dev-bootstrap $ARGS $builddir

cd $builddir
repo forall -c 'git reset --hard && git clean -xdf'

# get local manifest
[ "$LOCAL_MANIFEST" == "" ] || curl -L -o .repo/local_manifest.xml -O -L $LOCAL_MANIFEST

[ "$JOBS" == "" ] || JOBS=" -j $JOBS"
repo sync $JOBS

. build/envsetup.sh
brunch $DEVICE -j $BUILD_JOBS

cd -
cp $builddir/out/target/product/$DEVICE/*-*$DEVICE.zip ./livecd.ubuntu-touch-$DEVICE.zip
for image in system recovery boot; do
cp $builddir/out/target/product/$DEVICE/$image.img ./livecd.ubuntu-touch-$DEVICE.$image.img
done
#rm -rf $builddir