Difference between revisions of "IoTGateway/BSP/Android/Android BSP User Guide 6.0.1 2.1.0"
Line 1: | Line 1: | ||
− | == Setup host computer == | + | == <span style="font-family:times new roman,times,serif;"><span style="font-size:larger;">Setup host computer</span></span> == |
− | === Setup Ubuntu host computer === | + | === <span style="font-family:times new roman,times,serif;"><span style="font-size:medium;">Setup Ubuntu host computer</span></span> === |
<span style="font-family:times new roman,times,serif;"><span style="font-size:small;">Install Ubuntu 14.04 LTS 64bit. You should have about 80 Gbytes of free disk space for building images.</span></span> | <span style="font-family:times new roman,times,serif;"><span style="font-size:small;">Install Ubuntu 14.04 LTS 64bit. You should have about 80 Gbytes of free disk space for building images.</span></span> | ||
Line 7: | Line 7: | ||
<span style="font-family:times new roman,times,serif;"><span style="font-size:small;">Go to [http://releases.ubuntu.com/14.04/ http://releases.ubuntu.com/14.04/] and download 64-bit PC (AMD64) desktop image: [http://releases.ubuntu.com/14.04/ubuntu-14.04.3-desktop-amd64.iso http://releases.ubuntu.com/14.04/ubuntu-14.04.3-desktop-amd64.iso] for the installation.</span></span> | <span style="font-family:times new roman,times,serif;"><span style="font-size:small;">Go to [http://releases.ubuntu.com/14.04/ http://releases.ubuntu.com/14.04/] and download 64-bit PC (AMD64) desktop image: [http://releases.ubuntu.com/14.04/ubuntu-14.04.3-desktop-amd64.iso http://releases.ubuntu.com/14.04/ubuntu-14.04.3-desktop-amd64.iso] for the installation.</span></span> | ||
− | <span style="font-family:times new roman,times,serif;"><span style="font-size: | + | === <span style="font-family:times new roman,times,serif;"><span style="font-size:medium;">Install docker and Use docker</span></span> === |
<span style="font-family:times new roman,times,serif;"><span style="font-size:small;">Please use docker environment to compiler Android 6.0.1_2.1.0</span></span> | <span style="font-family:times new roman,times,serif;"><span style="font-size:small;">Please use docker environment to compiler Android 6.0.1_2.1.0</span></span> | ||
Line 19: | Line 19: | ||
<span style="font-family:times new roman,times,serif;"><span style="font-size:small;">Reference: <small>[http://ess-wiki.advantech.com.tw/view/IoTGateway/Docker http://ess-wiki.advantech.com.tw/view/IoTGateway/Docker]</small></span></span> | <span style="font-family:times new roman,times,serif;"><span style="font-size:small;">Reference: <small>[http://ess-wiki.advantech.com.tw/view/IoTGateway/Docker http://ess-wiki.advantech.com.tw/view/IoTGateway/Docker]</small></span></span> | ||
− | === Getting Android source code (Android 6.0.1_2.1.0/kernel Yocto-2.0 /U-Boot Yocto-2.0) === | + | === <span style="font-family:times new roman,times,serif;"><span style="font-size:medium;">Getting Android source code (Android 6.0.1_2.1.0/kernel Yocto-2.0 /U-Boot Yocto-2.0)</span></span> === |
− | <pre>$ mkdir myandroid | + | <pre><span style="font-family:times new roman,times,serif;"><span style="font-size:medium;">$ mkdir myandroid |
$ mkdir bin | $ mkdir bin | ||
$ cd myandroid/ | $ cd myandroid/ | ||
Line 26: | Line 26: | ||
$ chmod a+x ../bin/repo | $ chmod a+x ../bin/repo | ||
$ ../bin/repo init -u https://github.com/ADVANTECH-Corp/android-manifest.git -b m6.0.1_2.1.0-ga | $ ../bin/repo init -u https://github.com/ADVANTECH-Corp/android-manifest.git -b m6.0.1_2.1.0-ga | ||
− | $ ../bin/repo sync</pre> | + | $ ../bin/repo sync</span></span></pre> |
− | == | + | <span style="font-family:times new roman,times,serif;"><span style="font-size:small;">Remove the .repo and .git file</span></span> |
− | <pre>$ find . -name .repo | xargs rm -rf | + | <pre><span style="font-family:times new roman,times,serif;"><span style="font-size:medium;">$ find . -name .repo | xargs rm -rf |
− | $ find . -name .git | xargs rm -rf </pre> | + | $ find . -name .git | xargs rm -rf </span></span></pre> |
− | === Patch to Android M6.0.1_2.1.0 === | + | === <span style="font-family:times new roman,times,serif;">Patch to Android M6.0.1_2.1.0</span> === |
− | <pre>$ cd myandroid/bootable/bootloader/uboot-imx/ | + | <pre><span style="font-size:medium;"><span style="font-family:times new roman,times,serif;">$ cd myandroid/bootable/bootloader/uboot-imx/ |
$ patch -p1 <../../../patches_android_6.0.1/6001-Uboot_Yocto_4.1.15_1.2.0-to-Android_M6.0.1_2.1.0.patch | $ patch -p1 <../../../patches_android_6.0.1/6001-Uboot_Yocto_4.1.15_1.2.0-to-Android_M6.0.1_2.1.0.patch | ||
$ cd myandroid/kernel_imx/ | $ cd myandroid/kernel_imx/ | ||
$ patch -p1 <../patches_android_6.0.1/6001-Linux_Yocto_4.1.15_1.2.0-to-Android_M6.0.1_2.1.0.patch | $ patch -p1 <../patches_android_6.0.1/6001-Linux_Yocto_4.1.15_1.2.0-to-Android_M6.0.1_2.1.0.patch | ||
$ cd myandroid/ | $ cd myandroid/ | ||
− | </pre> | + | </span></span></pre> |
− | === Building Android 6.0.1_2.1.0 image for SD card === | + | === <span style="font-family:times new roman,times,serif;">Building Android 6.0.1_2.1.0 image for SD card</span> === |
− | === Naming Rule === | + | === <span style="font-family:times new roman,times,serif;">Naming Rule</span> === |
− | It is consist of the model name followed by "AB" plus version number, for example, 4410ABV2080 which "4410" stands for RSB-4410, "AB" is acronym of Android BSP, "V2080" stands for Version 2.080; other model names list below: | + | <span style="font-family:times new roman,times,serif;">It is consist of the model name followed by "AB" plus version number, for example, 4410ABV2080 which "4410" stands for RSB-4410, "AB" is acronym of Android BSP, "V2080" stands for Version 2.080; other model names list below:</span> |
− | <small> "3420" stands for ROM-3420 | + | <span style="font-size:medium;"><small> "3420" stands for ROM-3420 |
"5420" stands for ROM-5420 | "5420" stands for ROM-5420 | ||
"7420" stands for ROM-7420 | "7420" stands for ROM-7420 | ||
"DS31" stands for UBC-DS31 | "DS31" stands for UBC-DS31 | ||
"U220" stands for UBC-220</small> | "U220" stands for UBC-220</small> | ||
+ | </span> | ||
− | === Build Instructions === | + | === <span style="font-family:times new roman,times,serif;">Build Instructions</span> === |
− | === To build boot loader === | + | === <span style="font-family:times new roman,times,serif;">To build boot loader</span> === |
− | :Perform the following command in terminal console<br/> | + | :<span style="font-family:times new roman,times,serif;">Perform the following command in terminal console<br/></span> |
− | :<pre><span style=" | + | :<pre><span style="font-size:medium;"><span style="font-family:times new roman,times,serif;">$ make -j4 bootloader</span></span></pre> |
− | :The two files, u-boot_crc.bin & u-boot_crc.bin.crc, will be located in directory, ./out/target/product/product_name | + | :<span style="font-family:times new roman,times,serif;">The two files, u-boot_crc.bin & u-boot_crc.bin.crc, will be located in directory, ./out/target/product/product_name</span> |
− | === To build boot image === | + | === <span style="font-family:times new roman,times,serif;">To build boot image</span> === |
− | :Perform the following command in terminal console | + | :<span style="font-family:times new roman,times,serif;">Perform the following command in terminal console</span> |
− | :to do build bootimage<br/> | + | :<span style="font-family:times new roman,times,serif;">to do build bootimage<br/></span> |
− | :<pre>$ make -j4 bootimage</pre> | + | :<pre><span style="font-size:medium;"><span style="font-family:times new roman,times,serif;">$ make -j4 bootimage</span></span></pre> |
− | === To build boot image === | + | === <span style="font-family:times new roman,times,serif;">To build boot image</span> === |
− | :Perform the following command in terminal console | + | :<span style="font-family:times new roman,times,serif;">Perform the following command in terminal console</span> |
− | :to do build systemimage<br/> | + | :<span style="font-family:times new roman,times,serif;">to do build systemimage<br/></span> |
− | :<pre>$ make -j4 systemimage</pre> | + | :<pre><span style="font-size:medium;"><span style="font-family:times new roman,times,serif;">$ make -j4 systemimage</span></span></pre> |
− | :<pre>$ out/host/linux-x86/bin/simg2img out/target/product/$PRODUCT/system.img out/target/product/$PRODUCT/system_raw.img</pre> | + | :<pre><span style="font-size:medium;"><span style="font-family:times new roman,times,serif;">$ out/host/linux-x86/bin/simg2img out/target/product/$PRODUCT/system.img out/target/product/$PRODUCT/system_raw.img</span></span></pre> |
− | :<pre>$ mv out/target/product/$PRODUCT/system_raw.img out/target/product/$PRODUCT/system.img</pre> | + | :<pre><span style="font-size:medium;"><span style="font-family:times new roman,times,serif;">$ mv out/target/product/$PRODUCT/system_raw.img out/target/product/$PRODUCT/system.img</span></span></pre> |
− | <span style="color:#B22222;">simg2img is a tool that converts a sparse system image to a raw system image on a Linux host PC and is located in myandroid/out/host/linux-x86/bin/simg2img.</span> | + | <span style="font-size:medium;"><span style="font-family:times new roman,times,serif;"><span style="color:#B22222;">simg2img is a tool that converts a sparse system image to a raw system image on a Linux host PC and is located in myandroid/out/host/linux-x86/bin/simg2img.</span></span></span> |
Revision as of 08:18, 8 December 2016
Contents
- 1 Setup host computer
- 1.1 Setup Ubuntu host computer
- 1.2 Install docker and Use docker
- 1.3 Getting Android source code (Android 6.0.1_2.1.0/kernel Yocto-2.0 /U-Boot Yocto-2.0)
- 1.4 Patch to Android M6.0.1_2.1.0
- 1.5 Building Android 6.0.1_2.1.0 image for SD card
- 1.6 Naming Rule
- 1.7 Build Instructions
- 1.8 To build boot loader
- 1.9 To build boot image
- 1.10 To build boot image
Setup host computer
Setup Ubuntu host computer
Install Ubuntu 14.04 LTS 64bit. You should have about 80 Gbytes of free disk space for building images.
Go to http://releases.ubuntu.com/14.04/ and download 64-bit PC (AMD64) desktop image: http://releases.ubuntu.com/14.04/ubuntu-14.04.3-desktop-amd64.iso for the installation.
Install docker and Use docker
Please use docker environment to compiler Android 6.0.1_2.1.0
Android 6.0.1_2.1.0 Docker
Image Repository : advrisc/u14.04-imx6abv4
Image Tag : 20160825
Reference: http://ess-wiki.advantech.com.tw/view/IoTGateway/Docker
Getting Android source code (Android 6.0.1_2.1.0/kernel Yocto-2.0 /U-Boot Yocto-2.0)
<span style="font-family:times new roman,times,serif;"><span style="font-size:medium;">$ mkdir myandroid $ mkdir bin $ cd myandroid/ $ curl [https://storage.googleapis.com/git-repo-downloads/repo https://storage.googleapis.com/git-repo-downloads/repo] > ../bin/repo $ chmod a+x ../bin/repo $ ../bin/repo init -u https://github.com/ADVANTECH-Corp/android-manifest.git -b m6.0.1_2.1.0-ga $ ../bin/repo sync</span></span>
Remove the .repo and .git file
<span style="font-family:times new roman,times,serif;"><span style="font-size:medium;">$ find . -name .repo | xargs rm -rf $ find . -name .git | xargs rm -rf </span></span>
Patch to Android M6.0.1_2.1.0
<span style="font-size:medium;"><span style="font-family:times new roman,times,serif;">$ cd myandroid/bootable/bootloader/uboot-imx/ $ patch -p1 <../../../patches_android_6.0.1/6001-Uboot_Yocto_4.1.15_1.2.0-to-Android_M6.0.1_2.1.0.patch $ cd myandroid/kernel_imx/ $ patch -p1 <../patches_android_6.0.1/6001-Linux_Yocto_4.1.15_1.2.0-to-Android_M6.0.1_2.1.0.patch $ cd myandroid/ </span></span>
Building Android 6.0.1_2.1.0 image for SD card
Naming Rule
It is consist of the model name followed by "AB" plus version number, for example, 4410ABV2080 which "4410" stands for RSB-4410, "AB" is acronym of Android BSP, "V2080" stands for Version 2.080; other model names list below:
"3420" stands for ROM-3420
"5420" stands for ROM-5420
"7420" stands for ROM-7420
"DS31" stands for UBC-DS31
"U220" stands for UBC-220
Build Instructions
To build boot loader
- Perform the following command in terminal console
<span style="font-size:medium;"><span style="font-family:times new roman,times,serif;">$ make -j4 bootloader</span></span>
- The two files, u-boot_crc.bin & u-boot_crc.bin.crc, will be located in directory, ./out/target/product/product_name
To build boot image
- Perform the following command in terminal console
- to do build bootimage
<span style="font-size:medium;"><span style="font-family:times new roman,times,serif;">$ make -j4 bootimage</span></span>
To build boot image
- Perform the following command in terminal console
- to do build systemimage
<span style="font-size:medium;"><span style="font-family:times new roman,times,serif;">$ make -j4 systemimage</span></span>
<span style="font-size:medium;"><span style="font-family:times new roman,times,serif;">$ out/host/linux-x86/bin/simg2img out/target/product/$PRODUCT/system.img out/target/product/$PRODUCT/system_raw.img</span></span>
<span style="font-size:medium;"><span style="font-family:times new roman,times,serif;">$ mv out/target/product/$PRODUCT/system_raw.img out/target/product/$PRODUCT/system.img</span></span>
simg2img is a tool that converts a sparse system image to a raw system image on a Linux host PC and is located in myandroid/out/host/linux-x86/bin/simg2img.