Difference between revisions of "IoTGateway/BSP/Android/Android BSP User Guide 6.0.1 2.1.0"
Line 42: | Line 42: | ||
=== <span style="font-family:times new roman,times,serif;">Building Android 6.0.1_2.1.0 image for SD card</span> === | === <span style="font-family:times new roman,times,serif;">Building Android 6.0.1_2.1.0 image for SD card</span> === | ||
− | + | If your product is RSB-4410A1, the product name is rsb_4410_a1 | |
− | <span style="color:#FF0000 | + | <span style="color:#FF0000;">$PRODUCT = rsb_4410_a1</span> |
− | + | If your product is ROM3420, the product name is rom3420_a1 | |
− | <span style="color:#FF0000 | + | <span style="color:#FF0000;">$PRODUCT = rom_3420_a1</span> |
− | + | If your product is ROM-5420B1, the product name is rom_5420_b1 | |
− | <span style="color:#FF0000 | + | <span style="color:#FF0000;">$PRODUCT = rom_5420_b1</span> |
<span style="font-family:times new roman,times,serif;">Build Instructions</span> | <span style="font-family:times new roman,times,serif;">Build Instructions</span> | ||
Line 80: | Line 80: | ||
$ mv out/target/product/$PRODUCT/system_raw.img out/target/product/$PRODUCT/system.img</small> | $ mv out/target/product/$PRODUCT/system_raw.img out/target/product/$PRODUCT/system.img</small> | ||
− | + | 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. |
Revision as of 04:06, 9 December 2016
Contents
Android 6.0.1_2.1.0
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)
$ 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
Remove the .repo and .git file
$ find . -name .repo | xargs rm -rf
$ find . -name .git | xargs rm -rf
Patch to Android M6.0.1_2.1.0
$ 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/
Building Android 6.0.1_2.1.0 image for SD card
If your product is RSB-4410A1, the product name is rsb_4410_a1
$PRODUCT = rsb_4410_a1
If your product is ROM3420, the product name is rom3420_a1
$PRODUCT = rom_3420_a1
If your product is ROM-5420B1, the product name is rom_5420_b1
$PRODUCT = rom_5420_b1
Build Instructions
To build boot loader
Perform the following command in terminal console
$ make -j4 bootloader
- 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
$ make -j4 bootimage
To build system image
- Perform the following command in terminal console
- to do build systemimage
$ make -j4 systemimage $ out/host/linux-x86/bin/simg2img out/target/product/$PRODUCT/system.img out/target/product/$PRODUCT/system_raw.img $ mv out/target/product/$PRODUCT/system_raw.img out/target/product/$PRODUCT/system.img
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.