Ubuntu 14.04 compiled Android 4.2.2 for Tiny4412

Source: Internet
Author: User

.

.

.

.

.

In the school is using Redhat 6.4 compiled Android 4.2.2 very smooth, the source package copied to the notebook on Ubuntu 14.04 and then the compilation encountered a variety of pits, so there is this blog record to solve every pit process. Fortunately, these pits are not complicated enough to solve, a little Google to find a solution.

1. The first is to install the JDK and the ARM-LINUX-GCC tool chain, these two steps only after the decompression configuration environment variables, so here is not to repeat.
Note that the JDK must be in version 1.6, which is said to require the Android 4.x to be compiled using standard JDK 1.6, which means that OpenJDK is not possible and must be used with Sun's JDK, which I have not tested.

2. Install Gperf, I use the 3.0.4 here, using the source code compiled installation.

[Email protected] android]$TarXvzf gperf-3.0.4.Tar. Gz[[email protected] android]$ CD Gperf-3.0.4/[email protected] gperf-3.0.4]$ ./Configure[[email protected] Gperf-3.0.4]$ Make-J4[[email protected] Gperf-3.0.4]$ Make Install[email protected] android]$MansGperf

OK, if there is no error, then congratulations on your second step success.

3. The next step is to get to the point and start compiling Android source code, version 4.4.2.

Because it is running on the Tiny4412 Development Board, the code package may have been modified, whether it has been modified or not, I do not know, because the Android transplant has not been studied, temporarily first to record the steps.

tar xvf android-4.2. 2_r1-fs-20140526. Tar . Gz[[email protected] android]$ CD Android-4.2. 2_r1/

Setting environment variables

[Email protected] android-4.2. 2_r1]$ Source Setenv

Choose which platform to compile for

[Email protected] android-4.22_r1]$ Lunch

A string of "unable to find the Bison command" error message appears, so install Bison

[Email protected] android-4.2sudoinstall bison

note do not hand bison++ also installed, or compile the time will appear a double free error!

Next to start compiling: = = = Ahead of the high-energy warning, please do not need to evacuate immediately, close all non-essential operating procedures, and ensure that the radiator is working properly!!! ====

[Email protected] android-4.2 make-j4

SWITCH.PM error occurred in the process, the specific error message is not recorded, if you have encountered the same error, make will automatically stop, so just write a solution.

In fact, you just need to install the Perl switch Library:

sudo Install libswitch-perl

After installing the switch library, re-make-j4 to continue compiling.

After a while there was a mistake like this:

Byteswap.h:22:3: Error: #error "never use <bits/byteswap.h> directly; Include <byteswap.h> instead.

The workaround is to install the GCC multilib Library and then make-j4 to continue compiling.

sudo Install gcc-multilib

OK, all the pits have been solved, after nearly 2 hours of high-speed operation finally saw the following tips:

Creating filesystem with parameters:
size:685768704
Block size:4096
Blocks per group:32768
inodes PE R group:6976
Inode size:256
Journal blocks:2616
Label:
blocks:167424
Block groups:6
Reserved Block group size:47
Created filesystem with 1104/41856 inodes and 52043/167424 blocks
+ ' [' 0-ne 0 '] '
Running : Simg2img out/target/product/tiny4412/obj/packaging/systemimage_intermediates/system.img out/target/product/ Tiny4412/obj/packaging/systemimage_intermediates/unsparse_system.img
Running:e2fsck-f-N out/target/product/ Tiny4412/obj/packaging/systemimage_intermediates/unsparse_system.img
E2fsck 1.41.14 (22-dec-2010)

Pass 1:checking inodes, blocks, and sizes
Pass 2:checking directory structure
Pass 3:checking Directory Connectivity
Pass 4:checking Reference counts
Pass 5:checking Group summary Information
out/target/product/tiny4412/obj/packaging/systemimage_intermediates/unsparse_system.img:1104/41856 Files (0% non-contiguous), 52043/167424 blocks
Install System FS Image:out/target/product/tiny4412/system.img
out/target/product/tiny4412/system.img+ maxsize=700123776 blocksize=4224 total=203674048 reserve=7075200

If you also see a similar message, congratulations on your success!

The results of the compilation are in the Out folder.

4. Next create the IMG image file required by the brush machine

But this requires a tool that relies on UBoot: Mkimage, if you've compiled UBoot before, you can find it in the UBoot tools directory, or you can install it via Apt-get:

[Email protected] android-4.2sudoinstall u-boot-tools

With this tool, we can create an IMG image file.

[Email protected] android-4.22_r1]$./gen-img. SH

OK, see if the following files appear in the current directory:

[Email protected] android-4.2lssystem.imguserdata-16g.imguserdata-  4g.imguserdata-8g.imguserdata.imgramdisk-u.img ... Several unrelated files are hidden

If these files appear, then the necessary image of the brush machine is already available, congratulations, and a kernel can be burned on the development Board to write the system.

Now just compile the android itself, the kernel has not been compiled, continue to record the process of compiling the kernel tomorrow.

Ubuntu 14.04 compiled Android 4.2.2 for Tiny4412

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.