厂商HAL层库文件 xxx.xxx.so添加到源码中编译到系统镜像中

发布时间:2017-2-20 16:32:27 编辑:www.fx114.net 分享查询网我要评论
本篇文章主要介绍了"厂商HAL层库文件 xxx.xxx.so添加到源码中编译到系统镜像中",主要涉及到厂商HAL层库文件 xxx.xxx.so添加到源码中编译到系统镜像中方面的内容,对于厂商HAL层库文件 xxx.xxx.so添加到源码中编译到系统镜像中感兴趣的同学可以参考一下。

以mini6410 中的背光库文件为例: 首先将库文件放入Android-2.3.4/vendor/friendly-arm/mini6410/prebuilt中, 修改Android-2.3.4/vendor/friendly-arm/mini6410中的AndroidBoard.mk,在其中添加: # ---------------------------------------------------------------------------- # Makefile for FriendlyARM Mini6410 # LOCAL_PATH := $(call my-dir) # ---------------------------------------------------------------------------- # Lets install our own init.rc files :) include $(CLEAR_VARS) target_init_rc_file := $(TARGET_ROOT_OUT)/init.rc $(target_init_rc_file) : $(LOCAL_PATH)/init.rc | $(ACP) $(transform-prebuilt-to-target) ALL_PREBUILT += $(target_init_rc_file) target_hw_init_rc_file := $(TARGET_ROOT_OUT)/init.mini6410.rc $(target_hw_init_rc_file) : $(LOCAL_PATH)/init.mini6410.rc | $(ACP) $(transform-prebuilt-to-target) ALL_PREBUILT += $(target_hw_init_rc_file) target_ueventd_rc_file := $(TARGET_ROOT_OUT)/ueventd.rc $(target_ueventd_rc_file) : $(LOCAL_PATH)/ueventd.rc | $(ACP) $(transform-prebuilt-to-target) ALL_PREBUILT += $(target_ueventd_rc_file) $(INSTALLED_RAMDISK_TARGET): $(target_init_rc_file) \ $(target_hw_init_rc_file) \ $(target_ueventd_rc_file) # Initial script file := $(TARGET_OUT)/etc/init.mini6410.sh $(file) : $(LOCAL_PATH)/init.mini6410.sh | $(ACP) $(transform-prebuilt-to-target) ALL_PREBUILT += $(file) # proprietary files ifeq ($(PREBUILT_SO),y) file := $(TARGET_OUT)/lib/libs3cjpeg.so \ $(TARGET_OUT_INTERMEDIATES)/lib/libs3cjpeg.so $(file) : $(LOCAL_PATH)/proprietary/libs3cjpeg.so | $(ACP) $(transform-prebuilt-to-target) ALL_PREBUILT += $(file) endif file := $(TARGET_OUT)/lib/hw/gps.mini6410.so $(file) : $(LOCAL_PATH)/prebuilt/gps.mini6410.so | $(ACP) $(transform-prebuilt-to-target) ALL_PREBUILT += $(file) file := $(TARGET_OUT)/lib/libaudio.so \ $(TARGET_OUT_INTERMEDIATES)/lib/libaudio.so $(file) : $(LOCAL_PATH)/prebuilt/libaudio.so | $(ACP) $(transform-prebuilt-to-target) ALL_PREBUILT += $(file) file := $(TARGET_OUT)/lib/libaudiopolicy.so \ $(TARGET_OUT_INTERMEDIATES)/lib/libaudiopolicy.so $(file) : $(LOCAL_PATH)/prebuilt/libaudiopolicy.so | $(ACP) $(transform-prebuilt-to-target) ALL_PREBUILT += $(file) file := $(TARGET_OUT)/lib/libwifi.so \ $(TARGET_OUT_INTERMEDIATES)/lib/libwifi.so $(file) : $(LOCAL_PATH)/prebuilt/libwifi.so | $(ACP) $(transform-prebuilt-to-target) ALL_PREBUILT += $(file) file := $(TARGET_OUT)/lib/libcamera.so \ $(TARGET_OUT_INTERMEDIATES)/lib/libcamera.so $(file) : $(LOCAL_PATH)/prebuilt/libcamera.so | $(ACP) $(transform-prebuilt-to-target) ALL_PREBUILT += $(file) file := $(TARGET_OUT)/lib/libfriendlyarm-hardware.so \ $(TARGET_OUT_INTERMEDIATES)/lib/libfriendlyarm-hardware.so $(file) : $(LOCAL_PATH)/prebuilt/libfriendlyarm-hardware.so | $(ACP) $(transform-prebuilt-to-target) ALL_PREBUILT += $(file) file := $(TARGET_OUT)/lib/hw/acoustics.mini6410.so $(file) : $(LOCAL_PATH)/prebuilt/acoustics.mini6410.so | $(ACP) $(transform-prebuilt-to-target) ALL_PREBUILT += $(file) file := $(TARGET_OUT)/lib/hw/alsa.mini6410.so $(file) : $(LOCAL_PATH)/prebuilt/alsa.mini6410.so | $(ACP) $(transform-prebuilt-to-target) ALL_PREBUILT += $(file) file := $(TARGET_OUT)/lib/hw/copybit.mini6410.so $(file) : $(LOCAL_PATH)/prebuilt/copybit.mini6410.so | $(ACP) $(transform-prebuilt-to-target) ALL_PREBUILT += $(file) file := $(TARGET_OUT)/lib/hw/gralloc.mini6410.so $(file) : $(LOCAL_PATH)/prebuilt/gralloc.mini6410.so | $(ACP) $(transform-prebuilt-to-target) ALL_PREBUILT += $(file) file := $(TARGET_OUT)/lib/egl/libGLES_mini6410.so $(file) : $(LOCAL_PATH)/prebuilt/libGLES_mini6410.so | $(ACP) $(transform-prebuilt-to-target) ALL_PREBUILT += $(file) file := $(TARGET_OUT)/lib/hw/lights.mini6410.so $(file) : $(LOCAL_PATH)/prebuilt/lights.mini6410.so | $(ACP) $(transform-prebuilt-to-target) ALL_PREBUILT += $(file) file := $(call intermediates-dir-for,STATIC_LIBRARIES,libCustomWifi)/libCustomWifi.a $(file) : $(LOCAL_PATH)/prebuilt/libCustomWifi.a | $(ACP) $(transform-prebuilt-to-target) ALL_PREBUILT += $(file) file := $(call intermediates-dir-for,STATIC_LIBRARIES,libmfclib)/libmfclib.a $(file) : $(LOCAL_PATH)/prebuilt/libmfclib.a | $(ACP) $(transform-prebuilt-to-target) ALL_PREBUILT += $(file) # ---------------------------------------------------------------------------- # copy base files include $(CLEAR_VARS) PRODUCT_COPY_FILES += \ $(LOCAL_PATH)/wpa_supplicant.conf:system/etc/wifi/wpa_supplicant.conf \ $(LOCAL_PATH)/asound.conf:system/etc/asound.conf \ $(LOCAL_PATH)/wm9714.conf:system/etc/wm9714.conf \ $(LOCAL_PATH)/vold.fstab:system/etc/vold.fstab \ $(LOCAL_PATH)/tsd:root/sbin/tsd \ $(LOCAL_PATH)/friendlyarm-ts-input.conf:system/etc/friendlyarm-ts-input.conf \ $(LOCAL_PATH)/linuxrc:root/linuxrc \ $(LOCAL_PATH)/qwerty.kl:system/usr/keylayout/qwerty.kl # End of file # vim: syntax=make   添加的内容为: file := $(TARGET_OUT)/lib/hw/lights.mini6410.so $(file) : $(LOCAL_PATH)/prebuilt/lights.mini6410.so | $(ACP) $(transform-prebuilt-to-target) ALL_PREBUILT += $(file)  

上一篇:hibernate session不关闭会有什么后果.
下一篇:sqlserver 日期函数

相关文章

相关评论