Skip to content

Instantly share code, notes, and snippets.

@myrual
Last active August 29, 2015 14:05
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 myrual/cbe860a5708d62794350 to your computer and use it in GitHub Desktop.
Save myrual/cbe860a5708d62794350 to your computer and use it in GitHub Desktop.
freescale i.mx 4.4.2
the lastest android build on google site is not for 4.4.2 freescale i.mx
so follow me to build correct android
build machine must be: ubuntu linux 12.04 lts 64bit, over 200G free disk space
----install jdk6------
#yes, jdk6, 4.4.2 need jdk6 instead of jdk7
sudo add-apt-repository ppa:webupd8team/java
sudo apt-get update
sudo apt-get install oracle-java6-installer
----install other tools -------
----xubuntu 12.04 works with
$ sudo apt-get install git gnupg flex bison gperf build-essential \
zip 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 \
python-markdown libxml2-utils xsltproc zlib1g-dev:i386
$ sudo ln -s /usr/lib/i386-linux-gnu/mesa/libGL.so.1 /usr/lib/i386-linux-gnu/libGL.s
----but ubuntu14 need --------
sudo apt-get install git gnupg flex bison gperf build-essential \
zip curl libc6-dev libncurses5-dev:i386 x11proto-core-dev \
libx11-dev:i386 libreadline6-dev:i386 \
libgl1-mesa-dev g++-multilib mingw32 tofrodos \
python-markdown libxml2-utils xsltproc zlib1g-dev:i386
sudo apt-get install libglapi-mesa-lts-saucy:i386
sudo ln -s /usr/lib/i386-linux-gnu/mesa/libGL.so.1 /usr/lib/i386-linux-gnu/libGL.so
-----you need an proxy without data usage limit
#fuck gfw, you need an fast proxy to get all source from android,
#paid vpn is not enough, the total data can be 100G
prepare a vps, install shadowsocks server on it, install shadowsocks client on your linux machin.----
Then test the shadowsocks proxy.
Then input the proxy ip in system setting and remember to aplly system wide.
----assuming http and https proxy has been setup and socks5 proxy works on your machine
export HTTPS_PROXY=http://127.0.0.1:7777
export HTTP_PROXY=http://127.0.0.1:7777
git config --global http.proxy 'socks5://127.0.0.1:28936'
----prepare repo
$ mkdir android_src
$ cd android_src
$ mkdir ~/bin
$ PATH=~/bin:$PATH
$ curl https://storage.googleapis.com/git-repo-downloads/repo > ~/bin/repo
$ chmod a+x ~/bin/repo
--download tools required by freescale i.mx6 android
sudo apt-get install uuid uuid-dev
sudo apt-get install zlib1g-dev liblz-dev
sudo apt-get install liblzo2-2 liblzo2-dev
sudo apt-get install uboot-mkimage
repo init -u https://android.googlesource.com/platform/manifest -b android-4.4.2_r1
repo sync -j8
-------patch freescale code-------
cd ~/android_src
git clone git://git.freescale.com/imx/linux-2.6-imx.git kernel_imx
cd kernel_imx
git checkout kk4.4.2_1.0.0-ga
------- -----
------download bootloader------
cd ~/android_src/bootable/bootloader
git clone git://git.freescale.com/imx/uboot-imx.git uboot-imx
cd uboot-imx
git checkout kk4.4.2_1.0.0-ga
------apply patch-----
visit website
http://www.freescale.com/webapp/Download?colCode=KK44_100_ANDROID_SOURCE_BSP&appType=license&location=null&fsrch=1&sr=1&Parent_nodeId=from%20search&Parent_pageType=from%20search&Parent_nodeId=1337699481071706174845&Parent_pageType=product
to get bsp.
--------------------------
and get document for the bsp
http://www.freescale.com/webapp/Download?colCode=IMX6_KK442_100_ANDROID_DOCS&Parent_nodeId=1337699481071706174845&Parent_pageType=product
------follow page 5 to page 7-----
run patch sh
-------on mac os found issue-----
!!!! STOP attempt to compile native on mac os !!!!!
just run virtualbox or vmware or PD 10
Copy android code to linux to compile, instead of share file to linux. Because you will met strange issue.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment