About Android hardware Abstraction Layer added to Android system default compilation problem

Source: Internet
Author: User

Here are the main problems encountered two: the first is that the HAL layer of the source code to add to the Android default compilation, that is, in the root directory to do make, their own HAL source code will be compiled. The second problem is that after the compilation is complete, it is automatically installed under the specified system directory LIB/HW.

At first, you don't know much, you always need to use MMM to compile and install, but it's unrealistic to compile it after packing. This needs to be added to the default.

In general, the HAL layer is located in the Hardware/libhardware/modules directory. If I write an LED HAL layer, then create an LED folder in the modules directory, add code and ANDROID.MK in the LED folder. The solution to the first problem is to modify the Android.mk file in the modules directory and add the name of the LED folder to the Hardware_modules variable. This will automatically compile the LED file in the default.

This can be compiled, but it will not be installed automatically. Then install this to modify where, find a long time finally found, to modify device/samsung/smdkv210/device.mk this file in the Product_packages variable, at the end of the file add Product_packages + = Freg.default this line of code.

With the above two modifications, the default is compiled and installed, and the others are similar.

There is also a jni layer of things, this modification of the added files are compiled by default installed, only need to add code.

About Android hardware Abstraction Layer added to Android system default compilation problem

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.