Build an Android development environment

Source: Internet
Author: User

This chapter explains the first step in Android porting, learning how to build an Android-ported environment. Because the android underlying is based on the Linux kernel. So, we start with a cross-compilation environment, including the cross-compilation environment, the installation, configuration, and use of various service programs and applications. Different architectures, different operations, and even different versions of the kernel, all use different cross compilers. Choosing a cross compiler is important, and some cross-compiler often has a partial bug that can cause the last code to not work correctly.

Building a development environment is the foundation of any development work, and for embedded systems with very rich hardware and software, building an efficient and stable environment is one of the important factors that can be done. Android porting is very different from Android app development, with the following process:

(1) Download Android kernel;

(2) familiar with development environment and tools. The cross-development environment is a basic simulation of the Android system porting development. The Linux environment configuration, the gun toolchain, the test tools, and even the integrated development environment are a great tool to transplant Android systems.

(3) familiar with the Linux kernel. It is important to be familiar with kernel configuration, compilation, and porting because Android porting development typically requires a new customization of the Linux kernel.

(4) familiar with the target Board guide mode. The bootloader of the Development Board is responsible for the most basic initialization of the hardware platform and the specific boot function of the Linux kernel. Since the hardware platform is specifically customized, it is generally necessary to modify the compilation bootloader.

The complete installation of cross compilers generally involves the installation of multiple software, including Binutils, GCC, glibc, glibc-linuxthreads software. Among them, binutils is mainly used to generate some auxiliary tools, such as Readelf, Objcopy, Objdump, as, LD and so on; GCC is used to generate cross compilers, the main generation of the ARM-LINUX-GCC cross-compilation tool GLIBC primarily provides some basic library of functions used by user programs, and Glibc-linuxthreads is a library of thread-related functions. In this way, the cross-compilation environment is built up.

Bootloader is a small piece of program that executes before the operating system runs. Through this small program, we can initialize the hardware device, establish the memory space image table, so as to establish the appropriate system hardware and software environment, for the final call to the operating system kernel ready. For embedded systems, Bootloader is implemented on a specific hardware platform. Therefore, it is almost impossible to build a common bootloader for all embedded systems, and different processor architectures have different bootloader. Bootloader not only relies on the CPU's architecture, but also relies on the configuration of the embedded system board-level devices. For two different embedded boards, even if they are using the same processor, the bootloader program running on a board can also run on another board, and it is generally necessary to modify the bootloader source program. Conversely, most bootloader still have a lot in common, and some bootloader can support embedded systems of multiple architectures. For example: U-boot supports PowerPC, ARM, MIPS and X86 architectures, and supports hundreds of boards. Typically, they can automatically boot from storage media, boot the operating system, and most support serial and Ethernet interfaces.

In order to drive the target board, the bootloader, operating system kernel and file system must be done first.

Build an Android development environment

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.