Androoid Deep Exploration of HAL and Driver development

Source: Internet
Author: User
Tags using git

The first chapter:

With the openness of Android native code, every student who is curious is thinking about developing their own embedded systems. So with the advent of the smart era, Android has become the boss of the current smartphone operating system, the market share is ahead of the iOS operating system.

Android excellent embedded operating system after years of development has been very complete, including the Linux kernel, just C + + code library, Java SDK API, application layer four. Different versions of Android are based on different Linux cores, so drivers for different Android versions may not be universal. The Android SDK API is written in the Java language and can also be used as the Java API layer. The various libraries written in Java are based on the Dalvik virtual machine format. The app is accessible to all Android users. Includes a photo phone SMS browser and games. And this layer relies on the third layer to complete the various functions.

Migration is divided into application porting and system porting. The former application is ported to a specific hardware platform. The latter Android operating system runs on a specific hardware platform. Embedded is a direction based on the combination of hardware and software.

Learn Linux driver programming It's important to understand that Linux drives are only relevant to the Linux kernel, and no matter which Linux system is using the same Linux kernel, the driver can be generic. This is a fundamental stage of embedded development, and also a layout for the entire Linux development.

Chapter II

      build android Bottom development environment , mainly including android Application development environment, Span style= "FONT-FAMILY:CALIBRI;" >android  ndk  development Environment and cross-compilation environment construction. These are android Transplant and linux The foundation of driving development, no environment to build without development. Jdk6 or above, or above; adt  cdt  android sdk; android  Ndk;  kernel source code; android source code ; A serial tool for debugging the Development Board.

Build an Android application development environment, install the Android SDK, install Eclipse,install ADT,configure ADT ; establishment of AVD;

DownloadAndroidThe NDK has one in the installation directoryNDK-build script file, which is used to compileNDKProgram. For your convenience, you canAndroidThe NDK installation directory is added to thePaththe environment variable. ModifyPaththe value of the environment variable. Installing the Cross-compilation environmentx86Architecture ofCPUthe instruction set computer is used, and theArmArchitecture ofCPUis to use a thin set of instructions. Because of these two architectures,CPUis used in different instruction sets, so the schema development can run onArmprograms on the schema must use the spread compiler. Usually the cross compiler and related tools contain many executables and resources such as a large number of shared header files, which are called cross-compilation environments.

Describes the configuration of the Android development environment in Linux environments . The development of the underlying environment has done a lot of basic work for Android development and kernel porting. All work must be developed on the basis of the environment.

Chapter III

The biggest difference between Linux and other systems is open source. Senior Linux users grew up with the company of Open source software. Most of the software under Linux is not provided directly as a binary installation package, but instead is supplied directly to the source code and then compiled and installed. As for source control, the source code is managed using git written by Linus.

Note: The Linux commands executed by this book are done under the root user. If you log in with another user, you must precede the command with the root permission to add sudo. This requires the user to enter a password if the password is correct will switch to root permission to execute these commands. With no password set, use the sudo passwd root command to set the root password and then use the root user to execute the linux command in this book.

Source code submission and acquisition Create repository: GIT init repository different from version management software, have their own version of the management of the cry. The GIT repository also has its own management software and its own management style. Commit the file to the local repository: git commit. Create a local branch: Git branch source code can be done by multiple people, and the person involved in the development creates a branch for each modification, so that the commit does not affect the main branch after the modification.  Create an open source project on GitHub and download the source code get clone from here. The basic use of Git has played a big role in future porting to applications.

Fourth Chapter

Git uses the method to download the source code. Two sets of source code is the focus of learning. Android Source code,Linux kernel source code. Download compile and test the Android source code, the source code contains a lot of things a variety of application of the Halo source code,SDK Various tools of the source and the ndk the source code, Hal the source code.

      first android Source code Download Environment   First step:  create a directory to hold the download script file   Second step: Download script file.   Step three: Create a directory to hold android source code. Download android Two ways to code   use repo  sync command    Use the

    Compile android Every project in the source code has android mk android . Mk to compile the current project. Initialize the compilation environment   select target   compile android source code. With android same as source code linux

Android porting is primarily a Migration of the Linux kernel. The migration of the Linux kernel is primarily a Linux - powered migration. Linux - driven porting is particularly important in the development and testing process. In fact, the first four chapters are doing a series of preparations for Android transplants. Includes simple narrative environment to build git starter source code for download and compilation. These are the simplest basic pre-work, and it is a solid foundation to complete the complex process behind some of the columns.

Androoid Deep Exploration of HAL and Driver development

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.