Header file not found while using Soong build Android.bp

瀏覽次數:138 次
跳到第一則未讀訊息

Hưng Vũ

未讀,
2020年4月14日 晚上9:59:242020/4/14
收件者:android-porting
Hi everyone!
I am trying to build a new HAL implementation and service with Soong build. Even though the build process is successful while using Android.mk makefile, After converting this Android.mk file into Android.bp, the build process is failed with the error described as header file not found:
```
hardware/interfaces/hvuleds/2.0/default/Hvuleds.h:24:10: fatal error: 'linux/msm_mdp.h' file not found
#include <linux/msm_mdp.h>
```
This is content of my Android.mk file with success and performing in device well:
```
#===============================================
# Makefile for compliling service binary
#===============================================
LOCAL_PATH := $(call my-dir)

include $(CLEAR_VARS)
LOCAL_MODULE_RELATIVE_PATH := hw
LOCAL_PROPRIETARY_MODULE := true

LOCAL_MODULE := android.hardware.hvuleds@2.0-service
LOCAL_INIT_RC := android.hardware.hvuleds@2.0-service.rc
LOCAL_SRC_FILES := \
    service.cpp \

LOCAL_SHARED_LIBRARIES := \
    libcutils \
    libdl \
    libbase \
    libutils \
    libhardware \
    libhidlbase \
    libhidltransport \
    android.hardware.hvuleds@2.0 \
    android.hardware.hvuleds@2.0-impl \

include $(BUILD_EXECUTABLE)



#=================================================
# Makefile for compiling implementation shared library
#=================================================
LOCAL_PATH := $(call my-dir)

include $(CLEAR_VARS)
LOCAL_MODULE := android.hardware.hvuleds@2.0-impl
LOCAL_SRC_FILES := Hvuleds.cpp

LOCAL_SHARED_LIBRARIES := \
    libbase \
    liblog \
    libhidlbase \
    libhidltransport \
    libhardware \
    libutils \
    android.hardware.hvuleds@2.0 \

LOCAL_MODULE_TAGS := optional

include $(BUILD_SHARED_LIBRARY)
```
And this is content of Android.bp file with fail. This file is converted automatically form Android.mk with ```androidmk``` tool:
```
//===============================================
// Makefile for compliling service binary
//===============================================

cc_binary {
    relative_install_path: "hw",
    proprietary: true,

    name: "android.hardware.hvuleds@2.0-service",
    init_rc: ["android.hardware.hvuleds@2.0-service.rc"],
    srcs: ["service.cpp"],

    shared_libs: [
        "libcutils",
        "libdl",
        "libbase",
        "libutils",
        "libhardware",
        "libhidlbase",
        "libhidltransport",
        "android.hardware.hvuleds@2.0",
        "android.hardware.hvuleds@2.0-impl",
    ],

}

//=================================================
// Makefile for compiling implementation shared library
//=================================================

cc_library_shared {
    name: "android.hardware.hvuleds@2.0-impl",
    srcs: ["Hvuleds.cpp"],

    shared_libs: [
        "libbase",
        "liblog",
        "libhidlbase",
        "libhidltransport",
        "libhardware",
        "libutils",
        "android.hardware.hvuleds@2.0",
    ],

}
```
Can anyone help and explain to me !
Thank all !
Best regards !

Trần Kha

未讀,
2020年6月10日 晚上7:16:282020/6/10
收件者:android-porting
Hi Hưng,

Your header file include an existing header msm_mdp.h which is a kernel header of qcom device (https://android.googlesource.com/platform/hardware/qcom/msm8960/+/refs/heads/android10-dev/kernel-headers/linux/msm_mdp.h). I guess you are trying to create your HAL based on qcom's HAL. If you don't use msm_mdp.h, please comment it out. If you are using it, please add it to your current kernel-headers folder.

Regards,
Kha Tran

Vào 08:59:24 UTC+7 Thứ Tư, ngày 15 tháng 4 năm 2020, Hưng Vũ đã viết:
回覆所有人
回覆作者
轉寄
0 則新訊息