前言
为什么写这本书,本人一生时间可以说都贡献在嵌入式产品领域,见证了中国嵌入式产品的高速发展时期。你们可以叫我豆芽哥,我憧憬有一个人人知晓的豆芽科技公司,不过目前它还住在我心里,呵呵!我希望通过这本书帮助那些需要的人,同时也希望通过这本书结交志同道合的战友。我将通过编写豆芽系列书籍,带大家从基本技能:软件开发、硬件设计、测试验证、产品管理、公司运营,走向行业领域:智能手机、智能汽车、智能机器人三大产品。
《ASOP 豆芽教程》用于AOSP项目的讲解,掌握如何定制安卓操作系统,作为你设计基于安卓系统的嵌入式产品的基础,比如你自己的手机产品,你自己的汽车智能座舱中控台。
书接上文
ASOP 豆芽教程《二》- 从m准备blueprint开始-优快云博客
此章节我们来讲讲backend
推荐资源
camera 系统的:Android Camera-优快云博客
HIDL 概念: android dcl模式 安卓hid模式_mob6454cc6e8f43的技术博客_51CTO博客
HIDL 使用:AndroidQ 打通应用层到HAL层---(HIDL服务实现) - yooooooo - 博客园
预备知识
$TOP/system 项目清单
- platform/system/acpi/bert_collector
- platform/system/apex
- platform/system/authgraph
- platform/system/bpf
- platform/system/bpfprogs
- platform/system/ca-certificates
- platform/system/chre"
- platform/system/connectivity/wificond
- platform/system/core
- platform/system/cros-codecs
- platform/system/dmesgd
- platform/system/extras
- platform/system/gatekeeper
- platform/system/gsid
- platform/system/hardware/interfaces
- platform/system/hwservicemanager
- platform/system/incremental_delivery
- platform/system/keymaster
- platform/system/keymint
- platform/system/libartpalette
- platform/system/libbase
- platform/system/libcppbor
- platform/system/libfmq
- platform/system/libhidl
- platform/system/libhwbinder
- platform/system/libprocinfo
- platform/system/librustutils
- platform/system/libsysprop
- platform/system/libufdt
- platform/system/libvintf
- platform/system/libziparchive
- platform/system/linkerconfig
- platform/system/logging
- platform/system/media
- platform/system/memory/libion
- platform/system/memory/libdmabufheap
- platform/system/memory/libmeminfo"
- platform/system/memory/libmemtrack
- platform/system/memory/libmemunreachable
- platform/system/memory/lmkd
- platform/system/memory/mmd
- platform/system/netd
- platform/system/nfc
- platform/system/nvram
- platform/system/secretkeeper
- platform/system/security
- platform/system/see/authmgr
- platform/system/sepolicy
- platform/system/server_configurable_flags
- platform/system/teeui
- platform/system/testing/gtest_extras
- platform/system/timezone
- platform/system/tools/aidl
- platform/system/tools/hidl
- platform/system/tools/mkbootimg
- platform/system/tools/sysprop
- platform/system/tools/xsdc"
- platform/system/unwinding
- platform/system/update_engine
- platform/system/usb_info_tools
AndroidXRef 源代码搜索
$TOP/frameworks 项目清单
- platform/frameworks/av
- platform/frameworks/base
- platform/frameworks/compile/libbcc
- platform/frameworks/compile/mclinker
- platform/frameworks/compile/slang
- platform/frameworks/ex
- platform/frameworks/hardware/interfaces
- platform/frameworks/layoutlib
- platform/frameworks/libs/binary_translation
- platform/frameworks/libs/systemui
- platform/frameworks/libs/modules-utils
- platform/frameworks/libs/native_bridge_support
- platform/frameworks/libs/service_entitlement
- platform/frameworks/libs/gsma_services
- platform/frameworks/minikin
- platform/frameworks/multidex
- platform/frameworks/native
- platform/frameworks/opt/bitmap
- platform/frameworks/opt/calendar
- platform/frameworks/opt/car/services
- platform/frameworks/opt/car/setupwizard
- platform/frameworks/opt/chips
- platform/frameworks/opt/colorpicker
- platform/frameworks/opt/localepicker
- platform/frameworks/opt/net/ims
- platform/frameworks/opt/net/voip
- platform/frameworks/opt/net/wifi
- platform/frameworks/opt/photoviewer
- platform/frameworks/opt/setupwizard
- platform/frameworks/opt/telephony
- platform/frameworks/opt/timezonepicker"
- platform/frameworks/opt/tv/tvsystem
- platform/frameworks/opt/vcard
- platform/frameworks/proto_logging
- platform/frameworks/rs
- platform/frameworks/wilhelm
repo sync 可执行位置
AOSP项目下任何位置
$TOP/hardware 项目清单
- platform/hardware/broadcom/libbt
- platform/hardware/broadcom/wlan
- platform/hardware/google/aemu
- platform/hardware/google/apf
- platform/hardware/google/av
- platform/hardware/google/camera
- platform/hardware/google/gchips
- platform/hardware/google/gfxstream
- platform/hardware/google/graphics/common
- platform/hardware/google/graphics/gs101
- platform/hardware/google/graphics/gs201
- platform/hardware/google/graphics/zuma
- platform/hardware/google/graphics/zumapro
- platform/hardware/google/interfaces
- platform/hardware/google/pixel
- platform/hardware/google/pixel-sepolicy
- platform/hardware/interfaces
- platform/hardware/invensense
- platform/hardware/libhardware
- platform/hardware/libhardware_legacy
- platform/hardware/nxp/keymint
- platform/hardware/nxp/nfc
- platform/hardware/nxp/uwb
- platform/hardware/nxp/secure_element
- platform/hardware/nxp/weaver
- platform/hardware/qcom/wlan
- platform/hardware/ril
- platform/hardware/st/nfc
- platform/hardware/st/secure_element
- platform/hardware/st/secure_element2
- platform/hardware/samsung/nfc
- platform/hardware/synaptics/wlan
- platform/hardware/ti/am57x
关于进度日志的含义:
我们执行m后,会有进度[x/x],后面的x代表整个现有工程文件的最大任务数,前面的x代表当前构建进度,紧跟的是这个任务的描述。
安卓内核配置解释:
https://cs.android.com/android/platform/superproject/main/+/main:kernel/configs/
编译时的环境变量列表:
out/soong/soong.environment.available
编译时soong中的内部变量:
out/soong/soong.aosp_cf_x86_64_phone.variables
编译时的ninja目标
out/soong/build.aosp_cf_x86_64_phone.ninja
编译时所有的bp文件:
out/.module_paths/Android.bp.list
Android之Ninja
参考:Android源码编译加速:Ninja工具详解与构建系统解析 - 简书
ninja是一款高效的编译工具
AIDL backend
AIDL
官方说明:AIDL 后端 | Android Open Source Project
AIDL(Android Interface Definition Language)的后端语言支持包括Java、C++和Rust。不同后端语言的特点和应用场景:
- Java:AIDL接口定义文件通常使用Java语言编写。Java是Android开发中最常用的编程语言,适用于大多数Android应用开发场景。
- C++:在需要高性能或与Native代码交互的场景下,可以使用C++作为后端语言。AIDL支持与C++代码的交互,特别是在涉及硬件抽象层(HAL)时,稳定版本的AIDL(Stable AIDL)具有向后兼容性,常用于Native Service与HAL层之间的接口通信2。
- Rust:从Android 11开始,AIDL支持Rust语言。Rust以其内存安全和并发性能著称,适用于需要高并发处理和安全性的场景12。
AIDL支持的数据类型:
AIDL中支持Java所有的原生数据类型,如byte、short、int、long、boolean等,也支持String、List、CharSequence、Map等复合类型。如果我们定义的AIDL接口是跨语言的,此处还需要额外注意数据类型的对齐,具体可参考下表:
Java/AIDL 类型 | C++ 类型 | NDK 类型 | Rust 类型 |
boolean | bool | bool | bool |
byte | int8_t | int8_t | i8 |
char | char16_t | char16_t | u16 |
int | int32_t | int32_t | i32 |
long | int64_t | int64_t | i64 |
float | float | float | f32 |
double | double | double | f64 |
String | android::String16 | std::string | String |
android.os.Parcelable | android::Parcelable | 不适用 | 不适用 |
IBinder | android::IBinder | ndk::SpAIBinder | binder::SpIBinder |
T[] | std::vector<T> | std::vector<T> | In: &[T] Out: Vec<T> |
byte[] | std::vector<uint8_t> | std::vector<int8_t>1 | In: &[u8] Out: Vec<u8> |
List<T> | std::vector<T>2 | std::vector<T>3 | In: &[T]4 Out: Vec<T> |
FileDescriptor | android::base::unique_fd | 不适用 | binder::parcel::ParcelFileDescriptor |
ParcelFileDescriptor | android::os::ParcelFileDescriptor | ndk::ScopedFileDescriptor | binder::parcel::ParcelFileDescriptor |
interface 类型 (T) | android::sp<T> | std::shared_ptr<T> | binder::Strong |
parcelable 类型 (T) | T | T | T |
union 类型 (T)5 | T | T | T |
T[N] 6 | std::array<T, N> | std::array<T, N> | [T; N] |
关键字与常量:
- 在Andrid12之后,可以在aidl中定义联合体,使用union关键字
- 在Android11及更高版本中,支持枚举体定义,使用enum关键字
- 结构体定义使用struct关键字
- 主体部分是定义接口使用关键字interface
- 常量:在AIDL接口中可以直接定义 String与int常量
- 自定义通信数据:在AIDL中,如果需要在我们的接口中传递自定义数据,此时我们使用parcelable关键字
注意的点:
-
定义方法可以带零个或者多个参数、返回值或空值
-
所有非原生参数均需要指示数据走向的方向标记,这类标记可以是in、out或者inout;原生类型、String、IBinder以及AIDL生成的接口默认为in
四种backend
AIDL的目标是生成二进制接口文件,但是这个二进制文件不是直接来的,需要先生成后端文件,也就是我们特定语言的源文件。源文件语言有3种,但是有4种应用场景,不同的场景需要不同的接口来支持源文件编译生成我们想要的二进制文件。
基于不同的应用场景,AIDL支持不同的后端语言,目前包括Java/C++/Rust这三种语言,基于这三种语言细分为四种后端:
Backend | Language | API surface | Build systems |
Java | Java | SDK/SystemApi (stable*) | all |
NDK | C++ | libbinder_ndk (stable*) | aidl_interface |
CPP | C++ | libbinder (unstable) | all |
Rust | Rust | libbinder_rs (unstable) | aidl_interface |
API surface
SDK/SystemApi (stable*)
安卓SystemApi是安卓系统(OS)提供的一组API,用于管理和控制设备硬件,系统功能和服务。
主要分四类,位于sdk/<API Level>/system 和 sdk/<API Level>/system-server
- 系统服务API
- 硬件API
- 系统权限API
- 系统通知API
libbinder_rs (unstable)
libbinder_rs是Rust语言实现的Android Binder框架,它提供了一个灵活和高性能的跨进程通信机制。虽然该库目前被标记为"unstable",但它正在积极开发和改进中,源码地址:
https://github.com/Kernel-SU/binder_rs
因为ndk 中的 libbinder_ndk.so 隐藏了一些 api,所以 libbiner_rs 无法链接 它。但是可以替代,从 aosp-mainline 中预构建的 libbinder_ndk.so 中提取内容到symbol.txt 生成新的libbinder_ndk.so。
libbinder_ndk.so 在 api-29 中引入,要使用指定的目标 api 级别对其进行编译。如果 api 低于 29,编译不会失败。
使用 ndk-build 来构建,因此必须在您的环境中设置 ANDROID_NDK_HOME!
libbinder (unstable)
libbinder是Binder进程间通信(IPC)的Native实现,主要用于Android系统中。Binder是Android系统中实现跨进程通信的核心机制,而libbinder是其具体的实现库,通常以libbinder.so的形式存在。
libbinder的基本概念和功能
libbinder是由C++编写的,具有面向对象的特点。它提供了高效的IPC通信能力,使得Java环境和Native环境可以互相通信。在Java环境中,Binder通过一些Java类进行封装,但实际上最终会调用到libbinder提供的接口。在Native环境中,可以直接使用libbinder提供的编程接口来编写System Service,实现高效的跨进程通信1。
libbinder的架构和实现方式
libbinder通过IPC实现跨进程通信。在Java环境中,Binder对象通过Proxy和Stub进行通信;在Native环境中,则直接使用libbinder提供的接口。Binder服务端和客户端通过Binder驱动进行通信,服务端注册服务后,客户端可以通过服务管理器查询并调用这些服务。
libbinder的使用场景和性能优势
libbinder的主要用途是在Android系统中实现高效的跨进程通信。它适用于需要高性能通信的场景,如系统服务、多媒体服务等。通过优化内存管理和减少缓冲区使用,libbinder提供了比传统IPC机制更高效的通信方式。
解决遗留问题
上章问题
OUT_DIR=out
============================================
[100% 106/106] analyzing Android.bp files and generating ninja file at out/soong/build.aosp_cf_x86_64_phone.ninja
FAILED: out/soong/build.aosp_cf_x86_64_phone.ninja
cd "$(dirname "out/host/linux-x86/bin/soong_build")" && BUILDER="$PWD/$(basename "out/host/linux-x86/bin/soong_build")" && cd / && env -i "$BUILDER" --top "$TOP" --soong_out "out/soong" --out "out" --soong_variables out/soong/soong.aosp_cf_x86_64_phone.variables -o out/soong/build.aosp_cf_x86_64_phone.ninja -l out/.module_paths/Android.bp.list --available_env out/soong/soong.environment.available --used_env out/soong/soong.environment.used.aosp_cf_x86_64_phone.build Android.bp
error: packages/modules/Virtualization/libs/android_display_backend/Android.bp:1:1: unrecognized module type "aidl_interface"
error: packages/modules/Virtualization/libs/authfs_aidl_interface/Android.bp:5:1: unrecognized module type "aidl_interface"
error: packages/modules/Virtualization/tests/aidl/Android.bp:5:1: unrecognized module type "aidl_interface"
error: packages/modules/Virtualization/libs/compos_aidl_interface/Android.bp:5:1: unrecognized module type "aidl_interface"
error: system/core/trusty/stats/aidl/Android.bp:19:1: unrecognized module type "aidl_interface"
error: packages/modules/Virtualization/android/TerminalApp/Android.bp:45:1: unrecognized module type "aidl_interface"
error: packages/modules/Virtualization/android/composd/aidl/Android.bp:5:1: unrecognized module type "aidl_interface"
error: packages/modules/Virtualization/android/virtualizationservice/Android.bp:66:1: unrecognized module type "xsd_config"
error: packages/modules/Virtualization/android/virtmgr/Android.bp:97:1: unrecognized module type "xsd_config"
error: packages/modules/Virtualization/guest/microdroid_manager/aidl/Android.bp:5:1: unrecognized module type "aidl_interface"
error: packages/modules/Virtualization/android/virtualizationservice/aidl/Android.bp:5:1: unrecognized module type "aidl_interface"
error: packages/modules/Virtualization/android/virtualizationservice/aidl/Android.bp:41:1: unrecognized module type "aidl_interface"
error: packages/modules/Virtualization/android/virtualizationservice/aidl/Android.bp:70:1: unrecognized module type "aidl_interface"
error: packages/modules/Virtualization/tests/vm_attestation/aidl/Android.bp:6:1: unrecognized module type "aidl_interface"
error: packages/modules/Virtualization/android/virtualizationservice/aidl/Android.bp:90:1: unrecognized module type "aidl_interface"
error: packages/modules/Virtualization/android/virtualizationservice/aidl/Android.bp:110:1: unrecognized module type "aidl_interface"
error: packages/modules/Virtualization/android/virtualizationservice/aidl/Android.bp:132:1: unrecognized module type "aidl_interface"
11:40:31 soong bootstrap failed with: exit status 1
#### failed to build some targets (15 seconds) ####
分析:
现在的进度是做全局bp文件分析,大部分错误都是依赖关系缺失,先依照安卓架构拉取关键项目再来看变化。
先拉后端的运行环境,后面编译会用到:
拉 platform/prebuilts/sdk
heyang@MSI:~/aosp/main$ repo sync -c platform/prebuilts/sdk
Fetching: 100% (1/1), done in 2.365s
prebuilts/sdk/: leaving master; does not track upstream
Checking out: 100% (1/1), done in 35.725s
repo sync has finished successfully.
拉 platform/prebuilts/ndk
heyang@MSI:~/aosp/main$ repo sync -c platform/prebuilts/ndk
Fetching: 100% (1/1), done in 1.287s
Checking out: 100% (1/1), done in 0.008s
repo sync has finished successfully.
拉 platform/prebuilts/rust
heyang@MSI:~/aosp/main$ repo sync -c platform/prebuilts/rust
Fetching: 100% (1/1), done in 1.004s
prebuilts/rust/: leaving master; does not track upstream
Checking out: 100% (1/1), done in 7m33.816s
repo sync has finished successfully.
m编译继续报错
小结:
- 进度变107
- 近期进度点都是做bp文件分析
- 下面有条system的aidl错误引用了 platform/frameworks/hardware/interfaces 项目的 aidl
- 拉个 platform/frameworks/hardware/interfaces 看看
============================================
[100% 107/107] analyzing Android.bp files and generating ninja file at out/soong/build.aosp_cf_x86_64_phone.ninja
FAILED: out/soong/build.aosp_cf_x86_64_phone.ninja
cd "$(dirname "out/host/linux-x86/bin/soong_build")" && BUILDER="$PWD/$(basename "out/host/linux-x86/bin/soong_build")" && cd / && env -i "$BUILDER" --top "$TOP" --soong_out "out/soong" --out "out" --soong_variables out/soong/soong.aosp_cf_x86_64_phone.variables -o out/soong/build.aosp_cf_x86_64_phone.ninja -l out/.module_paths/Android.bp.list --available_env out/soong/soong.environment.available --used_env out/soong/soong.environment.used.aosp_cf_x86_64_phone.build Android.bp
error: packages/modules/Virtualization/libs/authfs_aidl_interface/Android.bp:5:1: unrecognized module type "aidl_interface"
error: packages/modules/Virtualization/libs/compos_aidl_interface/Android.bp:5:1: unrecognized module type "aidl_interface"
error: system/core/trusty/stats/aidl/Android.bp:19:1: unrecognized module type "aidl_interface"
error: packages/modules/Virtualization/libs/android_display_backend/Android.bp:1:1: unrecognized module type "aidl_interface"
error: packages/modules/Virtualization/tests/aidl/Android.bp:5:1: unrecognized module type "aidl_interface"
error: packages/modules/Virtualization/tests/vm_accessor/aidl/Android.bp:5:1: unrecognized module type "aidl_interface"
error: packages/modules/Virtualization/android/TerminalApp/Android.bp:45:1: unrecognized module type "aidl_interface"
error: packages/modules/Virtualization/android/composd/aidl/Android.bp:5:1: unrecognized module type "aidl_interface"
error: packages/modules/Virtualization/microfuchsia/microfuchsiad/aidl/Android.bp:5:1: unrecognized module type "aidl_interface"
error: packages/modules/Virtualization/android/virtualizationservice/Android.bp:66:1: unrecognized module type "xsd_config"
error: packages/modules/Virtualization/android/virtmgr/Android.bp:97:1: unrecognized module type "xsd_config"
error: packages/modules/Virtualization/guest/microdroid_manager/aidl/Android.bp:5:1: unrecognized module type "aidl_interface"
error: system/apex/apexd/Android.bp:102:1: unrecognized module type "aidl_interface"
error: system/apex/apexd/Android.bp:674:1: unrecognized module type "xsd_config"
error: system/apex/apexd/Android.bp:683:1: unrecognized module type "xsd_config"
22:37:55 soong bootstrap failed with: exit status 1
#### failed to build some targets (15 seconds) ####
heyang@MSI:~/aosp/main$ vi out/soong/build.aosp_cf_x86_64_phone.ninja
heyang@MSI:~/aosp/main$ vi out/soong/soong.aosp_cf_x86_64_phone.variables
heyang@MSI:~/aosp/main$ vi out/soong/soong.environment.available
heyang@MSI:~/aosp/main$ vi out/.module_paths/Android.bp.list
分析错误:
- error: system/core/trusty/stats/aidl/Android.bp:19:1: unrecognized module type "aidl_interface"
aidl_interface {
name: "android.trusty.stats.nw.setter",
unstable: true,
vendor_available: true,
srcs: [
"android/trusty/stats/nw/setter/IStatsSetter.aidl",
],
imports: ["android.frameworks.stats-V1"],
backend: {
cpp: {
enabled: true,
},
java: {
enabled: false,
platform_apis: false,
},
ndk: {
enabled: false,
},
}
- 依赖 V1版本的 aidl 接口:android.frameworks.stats-V1
-
aidl文件中引入; import android.frameworks.stats.IStats
-
后端仅支持CPP模式,即在 用的Binder框架是 libbinder (unstable)
-
来看看引入接口在哪里定义的:
-
- 在framework的hardware接口下的stats定义aidl_api,并且有三个版本的aidl_api,我们这里要用的是版本1
- 所以我们需要先拉入 platform/frameworks/hardware/interfaces
拉 platform/frameworks/hardware/interfaces
heyang@MSI:~/aosp/main$ repo sync -c platform/frameworks/hardware/interfaces
Fetching: 100% (1/1), done in 1m30.382s
Updating files: 100% (376/376), done.
Checking out: 100% (1/1), done in 31.018s
repo sync has finished successfully.
m编译继续报错
============================================
[100% 107/107] analyzing Android.bp files and generating ninja file at out/soong/build.aosp_cf_x86_64_phone.ninja
FAILED: out/soong/build.aosp_cf_x86_64_phone.ninja
cd "$(dirname "out/host/linux-x86/bin/soong_build")" && BUILDER="$PWD/$(basename "out/host/linux-x86/bin/soong_build")" && cd / && env -i "$BUILDER" --top "$TOP" --soong_out "out/soong" --out "out" --soong_variables out/soong/soong.aosp_cf_x86_64_phone.variables -o out/soong/build.aosp_cf_x86_64_phone.ninja -l out/.module_paths/Android.bp.list --available_env out/soong/soong.environment.available --used_env out/soong/soong.environment.used.aosp_cf_x86_64_phone.build Android.bp
error: frameworks/hardware/interfaces/Android.bp:5:1: unrecognized module type "hidl_package_root"
error: frameworks/hardware/interfaces/sensorservice/aidl/Android.bp:5:1: unrecognized module type "aidl_interface"
error: frameworks/hardware/interfaces/location/altitude/aidl/Android.bp:21:1: unrecognized module type "aidl_interface"
error: frameworks/hardware/interfaces/sensorservice/1.0/Android.bp:7:1: unrecognized module type "hidl_interface"
error: frameworks/hardware/interfaces/stats/aidl/Android.bp:20:1: unrecognized module type "aidl_interface"
error: frameworks/hardware/interfaces/cameraservice/device/aidl/Android.bp:5:1: unrecognized module type "aidl_interface"
error: frameworks/hardware/interfaces/schedulerservice/1.0/Android.bp:7:1: unrecognized module type "hidl_interface"
error: frameworks/hardware/interfaces/cameraservice/common/2.0/Android.bp:7:1: unrecognized module type "hidl_interface"
error: frameworks/hardware/interfaces/automotive/powerpolicy/aidl/Android.bp:19:1: unrecognized module type "aidl_interface"
error: frameworks/hardware/interfaces/cameraservice/service/2.2/Android.bp:7:1: unrecognized module type "hidl_interface"
error: frameworks/hardware/interfaces/cameraservice/service/aidl/Android.bp:5:1: unrecognized module type "aidl_interface"
error: frameworks/hardware/interfaces/cameraservice/service/2.1/Android.bp:7:1: unrecognized module type "hidl_interface"
error: frameworks/hardware/interfaces/automotive/display/aidl/Android.bp:19:1: unrecognized module type "aidl_interface"
error: frameworks/hardware/interfaces/automotive/powerpolicy/aidl/Android.bp:59:1: unrecognized module type "aidl_interface"
error: frameworks/hardware/interfaces/cameraservice/service/2.0/Android.bp:7:1: unrecognized module type "hidl_interface"
error: frameworks/hardware/interfaces/cameraservice/common/aidl/Android.bp:5:1: unrecognized module type "aidl_interface"
error: frameworks/hardware/interfaces/vibrator/aidl/Android.bp:22:1: unrecognized module type "aidl_interface"
error: frameworks/hardware/interfaces/automotive/packagemanagerproxy/aidl/Android.bp:23:1: unrecognized module type "aidl_interface"
error: frameworks/hardware/interfaces/automotive/telemetry/aidl/Android.bp:23:1: unrecognized module type "aidl_interface"
error: frameworks/hardware/interfaces/stats/1.0/Android.bp:7:1: unrecognized module type "hidl_interface"
error: frameworks/hardware/interfaces/vr/composer/1.0/Android.bp:7:1: unrecognized module type "hidl_interface"
error: frameworks/hardware/interfaces/vr/composer/2.0/Android.bp:7:1: unrecognized module type "hidl_interface"
15:47:08 soong bootstrap failed with: exit status 1
分析错误:
- 最开始的system错误暂时没有了
- 大部分错误到了framework层级:
- 出现了hidl,所以我们去拉hal的东西
- 拉
拉 platform/hardware/interfaces
heyang@MSI:~/aosp/main$ repo sync -c platform/hardware/interfaces
Fetching: 100% (1/1), done in 32.564s
hardware/interfaces/: leaving master; does not track upstream
Checking out: 100% (1/1), done in 1.542s
repo sync has finished successfully.
m编译继续报错
============================================
PLATFORM_VERSION_CODENAME=Baklava
PLATFORM_VERSION=Baklava
TARGET_PRODUCT=aosp_cf_x86_64_phone
TARGET_BUILD_VARIANT=eng
TARGET_ARCH=x86_64
TARGET_ARCH_VARIANT=silvermont
TARGET_2ND_ARCH=x86
TARGET_2ND_ARCH_VARIANT=silvermont
HOST_OS=linux
HOST_OS_EXTRA=Linux-5.15.167.4-microsoft-standard-WSL2-x86_64-Ubuntu-24.04.1-LTS
HOST_CROSS_OS=windows
BUILD_ID=MAIN
OUT_DIR=out
============================================
[100% 1/1] bootstrap blueprint
FAILED: bootstrap blueprint
error: hardware/interfaces/compatibility_matrices/build/Android.bp:24:1: "vintf-compatibility-matrix-soong-rules" depends on undefined module "kernel-config-soong-rules". Did you mean ["blueprint-bootstrap-bpdoc" "partner-bpfix-extensions"]?
error: hardware/interfaces/compatibility_matrices/build/Android.bp:24:1: "vintf-compatibility-matrix-soong-rules" depends on undefined module "soong-selinux". Did you mean ["soong-elf" "soong-golang" "soong-kernel"]?
21:05:31 bootstrap failed
#### failed to build some targets (4 seconds) ####
拉 kernel/configs
heyang@MSI:~/aosp/main$ repo sync -c kernel/configs
Fetching: 100% (1/1), done in 1.596s
kernel/configs/: leaving master; does not track upstream
Checking out: 100% (1/1), done in 0.673s
repo sync has finished successfully.
m编译继续报错
heyang@MSI:~/aosp/main$ m
============================================
PLATFORM_VERSION_CODENAME=Baklava
PLATFORM_VERSION=Baklava
TARGET_PRODUCT=aosp_cf_x86_64_phone
TARGET_BUILD_VARIANT=eng
TARGET_ARCH=x86_64
TARGET_ARCH_VARIANT=silvermont
TARGET_2ND_ARCH=x86
TARGET_2ND_ARCH_VARIANT=silvermont
HOST_OS=linux
HOST_OS_EXTRA=Linux-5.15.167.4-microsoft-standard-WSL2-x86_64-Ubuntu-24.04.1-LTS
HOST_CROSS_OS=windows
BUILD_ID=MAIN
OUT_DIR=out
============================================
[100% 1/1] bootstrap blueprint
FAILED: bootstrap blueprint
error: hardware/interfaces/compatibility_matrices/build/Android.bp:24:1: "vintf-compatibility-matrix-soong-rules" depends on undefined module "soong-selinux". Did you mean ["soong-elf" "soong-golang" "soong-kernel"]?
21:19:17 bootstrap failed
#### failed to build some targets (4 seconds) ####
拉 platform/system/sepolicy
heyang@MSI:~/aosp/main$ repo sync -c platform/system/sepolicy
Fetching: 100% (1/1), done in 16.815s
Updating files: 100% (3947/3947), done.
Checking out: 100% (1/1), done in 2.031s
repo sync has finished successfully.
m编译继续报错
============================================
[100% 110/110] analyzing Android.bp files and generating ninja file at out/soong/build.aosp_cf_x86_64_phone.ninja
FAILED: out/soong/build.aosp_cf_x86_64_phone.ninja
cd "$(dirname "out/host/linux-x86/bin/soong_build")" && BUILDER="$PWD/$(basename "out/host/linux-x86/bin/soong_build")" && cd / && env -i "$BUILDER" --top "$TOP" --soong_out "out/soong" --out "out" --soong_variables out/soong/soong.aosp_cf_x86_64_phone.variables -o out/soong/build.aosp_cf_x86_64_phone.ninja -l out/.module_paths/Android.bp.list --available_env out/soong/soong.environment.available --used_env out/soong/soong.environment.used.aosp_cf_x86_64_phone.build Android.bp
error: hardware/interfaces/Android.bp:31:1: unrecognized module type "hidl_package_root"
error: frameworks/hardware/interfaces/Android.bp:5:1: unrecognized module type "hidl_package_root"
error: frameworks/hardware/interfaces/displayservice/1.0/Android.bp:7:1: unrecognized module type "hidl_interface"
error: frameworks/hardware/interfaces/sensorservice/1.0/Android.bp:7:1: unrecognized module type "hidl_interface"
error: frameworks/hardware/interfaces/vr/composer/1.0/Android.bp:7:1: unrecognized module type "hidl_interface"
error: frameworks/hardware/interfaces/cameraservice/service/2.0/Android.bp:7:1: unrecognized module type "hidl_interface"
error: kernel/configs/xsd/kernelLifetimes/Android.bp:24:1: unrecognized module type "xsd_config"
error: frameworks/hardware/interfaces/cameraservice/common/aidl/Android.bp:5:1: unrecognized module type "aidl_interface"
error: frameworks/hardware/interfaces/stats/aidl/Android.bp:20:1: unrecognized module type "aidl_interface"
error: frameworks/hardware/interfaces/cameraservice/service/2.1/Android.bp:7:1: unrecognized module type "hidl_interface"
error: frameworks/hardware/interfaces/cameraservice/device/aidl/Android.bp:5:1: unrecognized module type "aidl_interface"
error: frameworks/hardware/interfaces/cameraservice/device/2.1/Android.bp:7:1: unrecognized module type "hidl_interface"
error: frameworks/hardware/interfaces/cameraservice/device/2.0/Android.bp:7:1: unrecognized module type "hidl_interface"
error: frameworks/hardware/interfaces/schedulerservice/1.0/Android.bp:7:1: unrecognized module type "hidl_interface"
error: frameworks/hardware/interfaces/stats/1.0/Android.bp:7:1: unrecognized module type "hidl_interface"
error: frameworks/hardware/interfaces/automotive/powerpolicy/aidl/Android.bp:19:1: unrecognized module type "aidl_interface"
error: frameworks/hardware/interfaces/automotive/display/1.0/Android.bp:7:1: unrecognized module type "hidl_interface"
error: frameworks/hardware/interfaces/automotive/telemetry/aidl/Android.bp:23:1: unrecognized module type "aidl_interface"
error: frameworks/hardware/interfaces/vr/composer/2.0/Android.bp:7:1: unrecognized module type "hidl_interface"
error: frameworks/hardware/interfaces/automotive/packagemanagerproxy/aidl/Android.bp:23:1: unrecognized module type "aidl_interface"
error: frameworks/hardware/interfaces/automotive/display/aidl/Android.bp:19:1: unrecognized module type "aidl_interface"
error: frameworks/hardware/interfaces/vibrator/aidl/Android.bp:22:1: unrecognized module type "aidl_interface"
error: frameworks/hardware/interfaces/automotive/powerpolicy/aidl/Android.bp:59:1: unrecognized module type "aidl_interface"
error: frameworks/hardware/interfaces/cameraservice/service/aidl/Android.bp:5:1: unrecognized module type "aidl_interface"
error: frameworks/hardware/interfaces/cameraservice/service/2.2/Android.bp:7:1: unrecognized module type "hidl_interface"
error: frameworks/hardware/interfaces/cameraservice/common/2.0/Android.bp:7:1: unrecognized module type "hidl_interface"
error: kernel/configs/xsd/approvedBuild/Android.bp:24:1: unrecognized module type "xsd_config"
error: frameworks/hardware/interfaces/location/altitude/aidl/Android.bp:21:1: unrecognized module type "aidl_interface"
error: frameworks/hardware/interfaces/sensorservice/aidl/Android.bp:5:1: unrecognized module type "aidl_interface"
21:23:59 soong bootstrap failed with: exit status 1
ninja: build stopped: subcommand failed.
继续去拉HAL的东西
拉 platform/hardware/google/camera
heyang@MSI:~/aosp/main$ repo sync -c platform/hardware/google/camera
Fetching: 100% (1/1), done in 2.358s
Updating files: 100% (232/232), done.
Checking out: 100% (1/1), done in 1.626s
repo sync has finished successfully.
m编译继续报错
[100% 110/110] analyzing Android.bp files and generating ninja file at out/soong/build.aosp_cf_x86_64_phone.ninja
FAILED: out/soong/build.aosp_cf_x86_64_phone.ninja
cd "$(dirname "out/host/linux-x86/bin/soong_build")" && BUILDER="$PWD/$(basename "out/host/linux-x86/bin/soong_build")" && cd / && env -i "$BUILDER" --top "$TOP" --soong_out "out/soong" --out "out" --soong_variables out/soong/soong.aosp_cf_x86_64_phone.variables -o out/soong/build.aosp_cf_x86_64_phone.ninja -l out/.module_paths/Android.bp.list --available_env out/soong/soong.environment.available --used_env out/soong/soong.environment.used.aosp_cf_x86_64_phone.build Android.bp
error: frameworks/hardware/interfaces/Android.bp:5:1: unrecognized module type "hidl_package_root"
error: packages/modules/Virtualization/libs/android_display_backend/Android.bp:1:1: unrecognized module type "aidl_interface"
error: hardware/interfaces/Android.bp:31:1: unrecognized module type "hidl_package_root"
error: packages/modules/Virtualization/libs/compos_aidl_interface/Android.bp:5:1: unrecognized module type "aidl_interface"
error: packages/modules/Virtualization/libs/authfs_aidl_interface/Android.bp:5:1: unrecognized module type "aidl_interface"
error: packages/modules/Virtualization/tests/aidl/Android.bp:5:1: unrecognized module type "aidl_interface"
error: frameworks/hardware/interfaces/vr/composer/2.0/Android.bp:7:1: unrecognized module type "hidl_interface"
error: frameworks/hardware/interfaces/cameraservice/device/aidl/Android.bp:5:1: unrecognized module type "aidl_interface"
error: frameworks/hardware/interfaces/automotive/packagemanagerproxy/aidl/Android.bp:23:1: unrecognized module type "aidl_interface"
error: frameworks/hardware/interfaces/schedulerservice/1.0/Android.bp:7:1: unrecognized module type "hidl_interface"
error: frameworks/hardware/interfaces/vibrator/aidl/Android.bp:22:1: unrecognized module type "aidl_interface"
error: frameworks/hardware/interfaces/automotive/telemetry/aidl/Android.bp:23:1: unrecognized module type "aidl_interface"
error: frameworks/hardware/interfaces/stats/1.0/Android.bp:7:1: unrecognized module type "hidl_interface"
error: frameworks/hardware/interfaces/cameraservice/service/2.2/Android.bp:7:1: unrecognized module type "hidl_interface"
error: frameworks/hardware/interfaces/sensorservice/1.0/Android.bp:7:1: unrecognized module type "hidl_interface"
error: frameworks/hardware/interfaces/cameraservice/service/2.1/Android.bp:7:1: unrecognized module type "hidl_interface"
error: frameworks/hardware/interfaces/sensorservice/aidl/Android.bp:5:1: unrecognized module type "aidl_interface"
error: frameworks/hardware/interfaces/cameraservice/service/aidl/Android.bp:5:1: unrecognized module type "aidl_interface"
error: frameworks/hardware/interfaces/cameraservice/common/aidl/Android.bp:5:1: unrecognized module type "aidl_interface"
error: frameworks/hardware/interfaces/cameraservice/service/2.0/Android.bp:7:1: unrecognized module type "hidl_interface"
error: frameworks/hardware/interfaces/cameraservice/device/2.1/Android.bp:7:1: unrecognized module type "hidl_interface"
error: frameworks/hardware/interfaces/displayservice/1.0/Android.bp:7:1: unrecognized module type "hidl_interface"
error: frameworks/hardware/interfaces/stats/aidl/Android.bp:20:1: unrecognized module type "aidl_interface"
error: frameworks/hardware/interfaces/automotive/display/aidl/Android.bp:19:1: unrecognized module type "aidl_interface"
error: frameworks/hardware/interfaces/vr/composer/1.0/Android.bp:7:1: unrecognized module type "hidl_interface"
error: frameworks/hardware/interfaces/cameraservice/common/2.0/Android.bp:7:1: unrecognized module type "hidl_interface"
error: frameworks/hardware/interfaces/location/altitude/aidl/Android.bp:21:1: unrecognized module type "aidl_interface"
error: frameworks/hardware/interfaces/automotive/display/1.0/Android.bp:7:1: unrecognized module type "hidl_interface"
error: packages/modules/Virtualization/tests/vm_accessor/aidl/Android.bp:5:1: unrecognized module type "aidl_interface"
error: frameworks/hardware/interfaces/automotive/powerpolicy/aidl/Android.bp:19:1: unrecognized module type "aidl_interface"
error: frameworks/hardware/interfaces/automotive/powerpolicy/aidl/Android.bp:59:1: unrecognized module type "aidl_interface"
error: frameworks/hardware/interfaces/cameraservice/device/2.0/Android.bp:7:1: unrecognized module type "hidl_interface"
error: packages/modules/Virtualization/android/TerminalApp/Android.bp:45:1: unrecognized module type "aidl_interface"
error: packages/modules/Virtualization/android/virtualizationservice/Android.bp:66:1: unrecognized module type "xsd_config"
error: packages/modules/Virtualization/android/virtmgr/Android.bp:97:1: unrecognized module type "xsd_config"
21:38:32 soong bootstrap failed with: exit status 1
在framework的CameraService拉拉
拉 platform/frameworks/base
heyang@MSI:~/aosp/main$ repo sync -c platform/frameworks/base
Fetching: 100% (1/1), done in 8m2.214s
Updating files: 100% (54740/54740), done.
Checking out: 100% (1/1), done in 1m17.620s
repo sync has finished successfully.
m编译继续报错
============================================
[100% 111/111] analyzing Android.bp files and generating ninja file at out/soong/build.aosp_cf_x86_64_phone.ninja
FAILED: out/soong/build.aosp_cf_x86_64_phone.ninja
cd "$(dirname "out/host/linux-x86/bin/soong_build")" && BUILDER="$PWD/$(basename "out/host/linux-x86/bin/soong_build")" && cd / && env -i "$BUILDER" --top "$TOP" --soong_out "out/soong" --out "out" --soong_variables out/soong/soong.aosp_cf_x86_64_phone.variables -o out/soong/build.aosp_cf_x86_64_phone.ninja -l out/.module_paths/Android.bp.list --available_env out/soong/soong.environment.available --used_env out/soong/soong.environment.used.aosp_cf_x86_64_phone.build Android.bp
error: frameworks/hardware/interfaces/Android.bp:5:1: unrecognized module type "hidl_package_root"
error: hardware/interfaces/Android.bp:31:1: unrecognized module type "hidl_package_root"
error: packages/modules/Virtualization/libs/android_display_backend/Android.bp:1:1: unrecognized module type "aidl_interface"
error: frameworks/hardware/interfaces/vr/composer/2.0/Android.bp:7:1: unrecognized module type "hidl_interface"
error: frameworks/hardware/interfaces/automotive/display/aidl/Android.bp:19:1: unrecognized module type "aidl_interface"
error: frameworks/hardware/interfaces/cameraservice/common/2.0/Android.bp:7:1: unrecognized module type "hidl_interface"
error: frameworks/hardware/interfaces/automotive/packagemanagerproxy/aidl/Android.bp:23:1: unrecognized module type "aidl_interface"
error: frameworks/hardware/interfaces/cameraservice/service/2.0/Android.bp:7:1: unrecognized module type "hidl_interface"
error: packages/modules/Virtualization/libs/compos_aidl_interface/Android.bp:5:1: unrecognized module type "aidl_interface"
error: frameworks/hardware/interfaces/cameraservice/device/2.0/Android.bp:7:1: unrecognized module type "hidl_interface"
error: frameworks/hardware/interfaces/vr/composer/1.0/Android.bp:7:1: unrecognized module type "hidl_interface"
error: frameworks/hardware/interfaces/cameraservice/common/aidl/Android.bp:5:1: unrecognized module type "aidl_interface"
error: frameworks/hardware/interfaces/cameraservice/device/aidl/Android.bp:5:1: unrecognized module type "aidl_interface"
error: frameworks/hardware/interfaces/sensorservice/aidl/Android.bp:5:1: unrecognized module type "aidl_interface"
error: frameworks/hardware/interfaces/cameraservice/service/2.2/Android.bp:7:1: unrecognized module type "hidl_interface"
error: frameworks/hardware/interfaces/vibrator/aidl/Android.bp:22:1: unrecognized module type "aidl_interface"
error: packages/modules/Virtualization/libs/authfs_aidl_interface/Android.bp:5:1: unrecognized module type "aidl_interface"
error: frameworks/hardware/interfaces/cameraservice/service/aidl/Android.bp:5:1: unrecognized module type "aidl_interface"
error: packages/modules/Virtualization/tests/aidl/Android.bp:5:1: unrecognized module type "aidl_interface"
error: frameworks/hardware/interfaces/automotive/powerpolicy/aidl/Android.bp:19:1: unrecognized module type "aidl_interface"
error: frameworks/hardware/interfaces/automotive/powerpolicy/aidl/Android.bp:59:1: unrecognized module type "aidl_interface"
error: packages/modules/Virtualization/tests/vm_accessor/aidl/Android.bp:5:1: unrecognized module type "aidl_interface"
error: frameworks/hardware/interfaces/stats/aidl/Android.bp:20:1: unrecognized module type "aidl_interface"
error: packages/modules/Virtualization/android/TerminalApp/Android.bp:45:1: unrecognized module type "aidl_interface"
error: packages/modules/Virtualization/android/virtualizationservice/Android.bp:66:1: unrecognized module type "xsd_config"
error: packages/modules/Virtualization/android/virtmgr/Android.bp:97:1: unrecognized module type "xsd_config"
22:05:14 soong bootstrap failed with: exit status 1
再拉拉av
拉 platform/frameworks/av
heyang@MSI:~/aosp/main$ repo sync -c platform/frameworks/av
Fetching: 100% (1/1), done in 35.126s
Updating files: 100% (5356/5356), done.
Checking out: 100% (1/1), done in 2.018s
repo sync has finished successfully.
m编译继续报错
[100% 111/111] analyzing Android.bp files and generating ninja file at out/soong/build.aosp_cf_x86_64_phone.ninja
FAILED: out/soong/build.aosp_cf_x86_64_phone.ninja
cd "$(dirname "out/host/linux-x86/bin/soong_build")" && BUILDER="$PWD/$(basename "out/host/linux-x86/bin/soong_build")" && cd / && env -i "$BUILDER" --top "$TOP" --soong_out "out/soong" --out "out" --soong_variables out/soong/soong.aosp_cf_x86_64_phone.variables -o out/soong/build.aosp_cf_x86_64_phone.ninja -l out/.module_paths/Android.bp.list --available_env out/soong/soong.environment.available --used_env out/soong/soong.environment.used.aosp_cf_x86_64_phone.build Android.bp
error: frameworks/av/Android.bp:37:1: unrecognized module type "aidl_interface_defaults"
error: frameworks/av/Android.bp:55:1: unrecognized module type "aidl_interface"
error: frameworks/av/Android.bp:92:1: unrecognized module type "aidl_interface"
error: frameworks/hardware/interfaces/Android.bp:5:1: unrecognized module type "hidl_package_root"
error: hardware/interfaces/Android.bp:31:1: unrecognized module type "hidl_package_root"
error: kernel/configs/xsd/approvedBuild/Android.bp:24:1: unrecognized module type "xsd_config"
error: kernel/configs/xsd/kernelLifetimes/Android.bp:24:1: unrecognized module type "xsd_config"
error: frameworks/hardware/interfaces/automotive/powerpolicy/aidl/Android.bp:19:1: unrecognized module type "aidl_interface"
error: frameworks/hardware/interfaces/automotive/powerpolicy/aidl/Android.bp:59:1: unrecognized module type "aidl_interface"
error: packages/modules/Virtualization/libs/compos_aidl_interface/Android.bp:5:1: unrecognized module type "aidl_interface"
error: packages/modules/Virtualization/libs/authfs_aidl_interface/Android.bp:5:1: unrecognized module type "aidl_interface"
error: frameworks/hardware/interfaces/cameraservice/service/2.1/Android.bp:7:1: unrecognized module type "hidl_interface"
error: frameworks/hardware/interfaces/cameraservice/service/2.0/Android.bp:7:1: unrecognized module type "hidl_interface"
error: frameworks/hardware/interfaces/location/altitude/aidl/Android.bp:21:1: unrecognized module type "aidl_interface"
error: frameworks/hardware/interfaces/automotive/telemetry/aidl/Android.bp:23:1: unrecognized module type "aidl_interface"
error: frameworks/hardware/interfaces/automotive/packagemanagerproxy/aidl/Android.bp:23:1: unrecognized module type "aidl_interface"
error: frameworks/hardware/interfaces/automotive/display/1.0/Android.bp:7:1: unrecognized module type "hidl_interface"
error: frameworks/hardware/interfaces/cameraservice/common/aidl/Android.bp:5:1: unrecognized module type "aidl_interface"
error: frameworks/hardware/interfaces/stats/aidl/Android.bp:20:1: unrecognized module type "aidl_interface"
error: frameworks/hardware/interfaces/cameraservice/device/aidl/Android.bp:5:1: unrecognized module type "aidl_interface"
error: frameworks/hardware/interfaces/displayservice/1.0/Android.bp:7:1: unrecognized module type "hidl_interface"
error: frameworks/hardware/interfaces/stats/1.0/Android.bp:7:1: unrecognized module type "hidl_interface"
error: frameworks/hardware/interfaces/vr/composer/2.0/Android.bp:7:1: unrecognized module type "hidl_interface"
error: frameworks/hardware/interfaces/cameraservice/common/2.0/Android.bp:7:1: unrecognized module type "hidl_interface"
error: frameworks/hardware/interfaces/vr/composer/1.0/Android.bp:7:1: unrecognized module type "hidl_interface"
error: frameworks/hardware/interfaces/cameraservice/service/2.2/Android.bp:7:1: unrecognized module type "hidl_interface"
error: frameworks/hardware/interfaces/cameraservice/device/2.0/Android.bp:7:1: unrecognized module type "hidl_interface"
error: frameworks/hardware/interfaces/schedulerservice/1.0/Android.bp:7:1: unrecognized module type "hidl_interface"
error: frameworks/hardware/interfaces/automotive/display/aidl/Android.bp:19:1: unrecognized module type "aidl_interface"
error: frameworks/hardware/interfaces/sensorservice/1.0/Android.bp:7:1: unrecognized module type "hidl_interface"
error: frameworks/hardware/interfaces/cameraservice/service/aidl/Android.bp:5:1: unrecognized module type "aidl_interface"
error: packages/modules/Virtualization/tests/aidl/Android.bp:5:1: unrecognized module type "aidl_interface"
error: frameworks/hardware/interfaces/cameraservice/device/2.1/Android.bp:7:1: unrecognized module type "hidl_interface"
error: frameworks/hardware/interfaces/sensorservice/aidl/Android.bp:5:1: unrecognized module type "aidl_interface"
error: frameworks/hardware/interfaces/vibrator/aidl/Android.bp:22:1: unrecognized module type "aidl_interface"
error: packages/modules/Virtualization/tests/vm_accessor/aidl/Android.bp:5:1: unrecognized module type "aidl_interface"
error: packages/modules/Virtualization/android/virtualizationservice/Android.bp:66:1: unrecognized module type "xsd_config"
error: frameworks/av/Android.bp:136:1: unrecognized module type "aidl_interface"
error: packages/modules/Virtualization/android/virtmgr/Android.bp:97:1: unrecognized module type "xsd_config"
22:14:39 soong bootstrap failed with: exit status 1
在拉拉Camera HAL 的实现
拉 platform/hardware/google/camera
heyang@MSI:~/aosp/main$ repo sync -c platform/hardware/google/camera
Fetching: 100% (1/1), done in 0.894s
Checking out: 100% (1/1), done in 0.001s
repo sync has finished successfully.
m编译继续报错
[100% 111/111] analyzing Android.bp files and generating ninja file at out/soong/build.aosp_cf_x86_64_phone.ninja
FAILED: out/soong/build.aosp_cf_x86_64_phone.ninja
cd "$(dirname "out/host/linux-x86/bin/soong_build")" && BUILDER="$PWD/$(basename "out/host/linux-x86/bin/soong_build")" && cd / && env -i "$BUILDER" --top "$TOP" --soong_out "out/soong" --out "out" --soong_variables out/soong/soong.aosp_cf_x86_64_phone.variables -o out/soong/build.aosp_cf_x86_64_phone.ninja -l out/.module_paths/Android.bp.list --available_env out/soong/soong.environment.available --used_env out/soong/soong.environment.used.aosp_cf_x86_64_phone.build Android.bp
error: frameworks/hardware/interfaces/Android.bp:5:1: unrecognized module type "hidl_package_root"
error: frameworks/av/Android.bp:37:1: unrecognized module type "aidl_interface_defaults"
error: frameworks/av/Android.bp:55:1: unrecognized module type "aidl_interface"
error: frameworks/av/Android.bp:92:1: unrecognized module type "aidl_interface"
error: hardware/interfaces/Android.bp:31:1: unrecognized module type "hidl_package_root"
error: frameworks/hardware/interfaces/sensorservice/aidl/Android.bp:5:1: unrecognized module type "aidl_interface"
error: frameworks/hardware/interfaces/location/altitude/aidl/Android.bp:21:1: unrecognized module type "aidl_interface"
error: frameworks/hardware/interfaces/automotive/display/aidl/Android.bp:19:1: unrecognized module type "aidl_interface"
error: frameworks/hardware/interfaces/vr/composer/1.0/Android.bp:7:1: unrecognized module type "hidl_interface"
error: frameworks/hardware/interfaces/cameraservice/service/2.2/Android.bp:7:1: unrecognized module type "hidl_interface"
error: frameworks/hardware/interfaces/vr/composer/2.0/Android.bp:7:1: unrecognized module type "hidl_interface"
error: frameworks/hardware/interfaces/schedulerservice/1.0/Android.bp:7:1: unrecognized module type "hidl_interface"
error: frameworks/hardware/interfaces/automotive/display/1.0/Android.bp:7:1: unrecognized module type "hidl_interface"
error: frameworks/hardware/interfaces/cameraservice/common/2.0/Android.bp:7:1: unrecognized module type "hidl_interface"
error: frameworks/hardware/interfaces/sensorservice/1.0/Android.bp:7:1: unrecognized module type "hidl_interface"
error: frameworks/hardware/interfaces/vibrator/aidl/Android.bp:22:1: unrecognized module type "aidl_interface"
error: frameworks/hardware/interfaces/automotive/powerpolicy/aidl/Android.bp:19:1: unrecognized module type "aidl_interface"
error: frameworks/hardware/interfaces/cameraservice/device/2.1/Android.bp:7:1: unrecognized module type "hidl_interface"
error: frameworks/hardware/interfaces/automotive/powerpolicy/aidl/Android.bp:59:1: unrecognized module type "aidl_interface"
error: frameworks/hardware/interfaces/cameraservice/device/2.0/Android.bp:7:1: unrecognized module type "hidl_interface"
error: frameworks/hardware/interfaces/cameraservice/device/aidl/Android.bp:5:1: unrecognized module type "aidl_interface"
error: frameworks/hardware/interfaces/stats/1.0/Android.bp:7:1: unrecognized module type "hidl_interface"
error: frameworks/hardware/interfaces/cameraservice/service/aidl/Android.bp:5:1: unrecognized module type "aidl_interface"
error: frameworks/hardware/interfaces/cameraservice/common/aidl/Android.bp:5:1: unrecognized module type "aidl_interface"
error: frameworks/hardware/interfaces/automotive/packagemanagerproxy/aidl/Android.bp:23:1: unrecognized module type "aidl_interface"
error: frameworks/hardware/interfaces/displayservice/1.0/Android.bp:7:1: unrecognized module type "hidl_interface"
error: frameworks/av/Android.bp:136:1: unrecognized module type "aidl_interface"
23:18:43 soong bootstrap failed with: exit status 1
现在主要是 frameworks.hardware.* 和 android.hardware 的 hidl 有问题,先把 hardware 拉完。
拉 platform/hardware/broadcom/libbt
此处拉完错误明显减少
[100% 111/111] analyzing Android.bp files and generating ninja file at out/soong/build.aosp_cf_x86_64_phone.ninja
FAILED: out/soong/build.aosp_cf_x86_64_phone.ninja
cd "$(dirname "out/host/linux-x86/bin/soong_build")" && BUILDER="$PWD/$(basename "out/host/linux-x86/bin/soong_build")" && cd / && env -i "$BUILDER" --top "$TOP" --soong_out "out/soong" --out "out" --soong_variables out/soong/soong.aosp_cf_x86_64_phone.variables -o out/soong/build.aosp_cf_x86_64_phone.ninja -l out/.module_paths/Android.bp.list --available_env out/soong/soong.environment.available --used_env out/soong/soong.environment.used.aosp_cf_x86_64_phone.build Android.bp
error: hardware/interfaces/Android.bp:31:1: unrecognized module type "hidl_package_root"
error: frameworks/hardware/interfaces/Android.bp:5:1: unrecognized module type "hidl_package_root"
error: frameworks/hardware/interfaces/cameraservice/device/2.0/Android.bp:7:1: unrecognized module type "hidl_interface"
error: frameworks/av/Android.bp:37:1: unrecognized module type "aidl_interface_defaults"
error: frameworks/av/Android.bp:55:1: unrecognized module type "aidl_interface"
error: frameworks/av/Android.bp:92:1: unrecognized module type "aidl_interface"
error: kernel/configs/xsd/approvedBuild/Android.bp:24:1: unrecognized module type "xsd_config"
error: kernel/configs/xsd/kernelLifetimes/Android.bp:24:1: unrecognized module type "xsd_config"
error: frameworks/hardware/interfaces/schedulerservice/1.0/Android.bp:7:1: unrecognized module type "hidl_interface"
error: system/core/trusty/stats/aidl/Android.bp:19:1: unrecognized module type "aidl_interface"
error: packages/modules/Virtualization/libs/android_display_backend/Android.bp:1:1: unrecognized module type "aidl_interface"
error: packages/modules/Virtualization/tests/vm_accessor/aidl/Android.bp:5:1: unrecognized module type "aidl_interface"
error: frameworks/av/Android.bp:136:1: unrecognized module type "aidl_interface"
23:46:14 soong bootstrap failed with: exit status 1
不清理out再m试试,结果 hardware hidl_package_root 错误还在,继续拉hardware。
[100% 2/2] analyzing Android.bp files and generating ninja file at out/soong/build.aosp_cf_x86_64_phone.ninja
FAILED: out/soong/build.aosp_cf_x86_64_phone.ninja
cd "$(dirname "out/host/linux-x86/bin/soong_build")" && BUILDER="$PWD/$(basename "out/host/linux-x86/bin/soong_build")" && cd / && env -i "$BUILDER" --top "$TOP" --soong_out "out/soong" --out "out" --soong_variables out/soong/soong.aosp_cf_x86_64_phone.variables -o out/soong/build.aosp_cf_x86_64_phone.ninja -l out/.module_paths/Android.bp.list --available_env out/soong/soong.environment.available --used_env out/soong/soong.environment.used.aosp_cf_x86_64_phone.build Android.bp
error: hardware/interfaces/Android.bp:31:1: unrecognized module type "hidl_package_root"
error: frameworks/hardware/interfaces/Android.bp:5:1: unrecognized module type "hidl_package_root"
error: frameworks/av/Android.bp:37:1: unrecognized module type "aidl_interface_defaults"
error: frameworks/av/Android.bp:55:1: unrecognized module type "aidl_interface"
error: frameworks/av/Android.bp:92:1: unrecognized module type "aidl_interface"
error: packages/modules/Virtualization/libs/android_display_backend/Android.bp:1:1: unrecognized module type "aidl_interface"
error: packages/modules/Virtualization/tests/aidl/Android.bp:5:1: unrecognized module type "aidl_interface"
error: frameworks/hardware/interfaces/stats/aidl/Android.bp:20:1: unrecognized module type "aidl_interface"
error: packages/modules/Virtualization/libs/authfs_aidl_interface/Android.bp:5:1: unrecognized module type "aidl_interface"
error: frameworks/hardware/interfaces/vr/composer/1.0/Android.bp:7:1: unrecognized module type "hidl_interface"
error: frameworks/hardware/interfaces/vibrator/aidl/Android.bp:22:1: unrecognized module type "aidl_interface"
error: frameworks/hardware/interfaces/cameraservice/service/aidl/Android.bp:5:1: unrecognized module type "aidl_interface"
error: packages/modules/Virtualization/tests/vm_accessor/aidl/Android.bp:5:1: unrecognized module type "aidl_interface"
error: frameworks/hardware/interfaces/cameraservice/service/2.1/Android.bp:7:1: unrecognized module type "hidl_interface"
error: frameworks/hardware/interfaces/automotive/telemetry/aidl/Android.bp:23:1: unrecognized module type "aidl_interface"
error: frameworks/hardware/interfaces/cameraservice/device/2.1/Android.bp:7:1: unrecognized module type "hidl_interface"
error: frameworks/hardware/interfaces/vr/composer/2.0/Android.bp:7:1: unrecognized module type "hidl_interface"
error: frameworks/hardware/interfaces/automotive/powerpolicy/aidl/Android.bp:19:1: unrecognized module type "aidl_interface"
error: frameworks/hardware/interfaces/automotive/powerpolicy/aidl/Android.bp:59:1: unrecognized module type "aidl_interface"
error: frameworks/hardware/interfaces/stats/1.0/Android.bp:7:1: unrecognized module type "hidl_interface"
error: frameworks/hardware/interfaces/automotive/display/1.0/Android.bp:7:1: unrecognized module type "hidl_interface"
error: frameworks/hardware/interfaces/automotive/packagemanagerproxy/aidl/Android.bp:23:1: unrecognized module type "aidl_interface"
error: frameworks/hardware/interfaces/sensorservice/aidl/Android.bp:5:1: unrecognized module type "aidl_interface"
error: frameworks/hardware/interfaces/location/altitude/aidl/Android.bp:21:1: unrecognized module type "aidl_interface"
error: frameworks/hardware/interfaces/cameraservice/common/2.0/Android.bp:7:1: unrecognized module type "hidl_interface"
error: frameworks/hardware/interfaces/displayservice/1.0/Android.bp:7:1: unrecognized module type "hidl_interface"
error: frameworks/hardware/interfaces/cameraservice/device/2.0/Android.bp:7:1: unrecognized module type "hidl_interface"
error: frameworks/hardware/interfaces/automotive/display/aidl/Android.bp:19:1: unrecognized module type "aidl_interface"
error: frameworks/hardware/interfaces/cameraservice/device/aidl/Android.bp:5:1: unrecognized module type "aidl_interface"
error: frameworks/hardware/interfaces/sensorservice/1.0/Android.bp:7:1: unrecognized module type "hidl_interface"
error: frameworks/hardware/interfaces/cameraservice/service/2.2/Android.bp:7:1: unrecognized module type "hidl_interface"
error: frameworks/hardware/interfaces/schedulerservice/1.0/Android.bp:7:1: unrecognized module type "hidl_interface"
error: packages/modules/Virtualization/libs/compos_aidl_interface/Android.bp:5:1: unrecognized module type "aidl_interface"
error: packages/modules/Virtualization/android/TerminalApp/Android.bp:45:1: unrecognized module type "aidl_interface"
error: frameworks/av/Android.bp:136:1: unrecognized module type "aidl_interface"
error: packages/modules/Virtualization/android/virtualizationservice/Android.bp:66:1: unrecognized module type "xsd_config"
error: packages/modules/Virtualization/android/virtmgr/Android.bp:97:1: unrecognized module type "xsd_config"
23:48:51 soong bootstrap failed with: exit status 1
#### failed to build some targets (5 seconds) ####
拉后续 hardware, 不明显改善不在录入m日志:
- platform/hardware/broadcom/wlan
- platform/hardware/google/aemu
- platform/hardware/google/apf
- platform/hardware/google/av
- platform/hardware/google/camera
- platform/hardware/google/gchips
- platform/hardware/google/gfxstream
- platform/hardware/google/graphics/common
- platform/hardware/google/graphics/gs101
- platform/hardware/google/graphics/gs201
- platform/hardware/google/graphics/zuma
- platform/hardware/google/graphics/zumapro
- platform/hardware/google/interfaces
- platform/hardware/google/pixel
- platform/hardware/google/pixel-sepolicy
- platform/hardware/interfaces
- platform/hardware/invensense
- platform/hardware/libhardware
- platform/hardware/libhardware_legacy
- platform/hardware/nxp/keymint
- platform/hardware/nxp/nfc
- platform/hardware/nxp/uwb
- platform/hardware/nxp/secure_element
- platform/hardware/nxp/weaver
- platform/hardware/qcom/wlan
- platform/hardware/ril
- platform/hardware/st/nfc
- platform/hardware/st/secure_element
- platform/hardware/st/secure_element2
- platform/hardware/samsung/nfc
- platform/hardware/synaptics/wlan
- platform/hardware/ti/am57x
- 拉完后清除out多次m
-
============================================ [100% 111/111] analyzing Android.bp files and generating ninja file at out/soong/build.aosp_cf_x86_64_phone.ninja FAILED: out/soong/build.aosp_cf_x86_64_phone.ninja cd "$(dirname "out/host/linux-x86/bin/soong_build")" && BUILDER="$PWD/$(basename "out/host/linux-x86/bin/soong_build")" && cd / && env -i "$BUILDER" --top "$TOP" --soong_out "out/soong" --out "out" --soong_variables out/soong/soong.aosp_cf_x86_64_phone.variables -o out/soong/build.aosp_cf_x86_64_phone.ninja -l out/.module_paths/Android.bp.list --available_env out/soong/soong.environment.available --used_env out/soong/soong.environment.used.aosp_cf_x86_64_phone.build Android.bp error: hardware/interfaces/Android.bp:31:1: unrecognized module type "hidl_package_root" error: <input>: failed to open "frameworks/opt/net/wifi/libwifi_hal/Android.bp": open /home/heyang/aosp/main/frameworks/opt/net/wifi/libwifi_hal/Android.bp: no such file or directory error: hardware/broadcom/wlan/bcmdhd/wifi_hal/Android.bp:29:1: unrecognized module type "wifi_cc_defaults" error: frameworks/hardware/interfaces/Android.bp:5:1: unrecognized module type "hidl_package_root" error: hardware/synaptics/wlan/synadhd/wifi_hal/Android.bp:29:1: unrecognized module type "wifi_cc_defaults" error: hardware/nxp/nfc/intf/nxpnfc/Android.bp:10:1: unrecognized module type "hidl_package_root" error: hardware/google/interfaces/Android.bp:8:1: unrecognized module type "hidl_package_root" error: frameworks/av/Android.bp:37:1: unrecognized module type "aidl_interface_defaults" error: frameworks/av/Android.bp:55:1: unrecognized module type "aidl_interface" error: frameworks/av/Android.bp:92:1: unrecognized module type "aidl_interface" error: hardware/google/interfaces/bluetooth/sar/1.2/Android.bp:6:1: unrecognized module type "hidl_interface" error: hardware/google/interfaces/bluetooth/ewp/aidl/Android.bp:6:1: unrecognized module type "aidl_interface" error: frameworks/av/Android.bp:136:1: unrecognized module type "aidl_interface" 00:18:48 soong bootstrap failed with: exit status 1 #### failed to build some targets (15 seconds) #### [100% 2/2] analyzing Android.bp files and generating ninja file at out/soong/build.aosp_cf_x86_64_phone.ninja FAILED: out/soong/build.aosp_cf_x86_64_phone.ninja cd "$(dirname "out/host/linux-x86/bin/soong_build")" && BUILDER="$PWD/$(basename "out/host/linux-x86/bin/soong_build")" && cd / && env -i "$BUILDER" --top "$TOP" --soong_out "out/soong" --out "out" --soong_variables out/soong/soong.aosp_cf_x86_64_phone.variables -o out/soong/build.aosp_cf_x86_64_phone.ninja -l out/.module_paths/Android.bp.list --available_env out/soong/soong.environment.available --used_env out/soong/soong.environment.used.aosp_cf_x86_64_phone.build Android.bp error: hardware/google/av/media/eco/Android.bp:6:1: unrecognized module type "aidl_interface" error: frameworks/av/Android.bp:37:1: unrecognized module type "aidl_interface_defaults" error: frameworks/av/Android.bp:55:1: unrecognized module type "aidl_interface" error: <input>: failed to open "frameworks/opt/net/wifi/libwifi_hal/Android.bp": open /home/heyang/aosp/main/frameworks/opt/net/wifi/libwifi_hal/Android.bp: no such file or directory error: frameworks/av/Android.bp:92:1: unrecognized module type "aidl_interface" error: hardware/synaptics/wlan/synadhd/wifi_hal/Android.bp:29:1: unrecognized module type "wifi_cc_defaults" error: hardware/broadcom/wlan/bcmdhd/wifi_hal/Android.bp:29:1: unrecognized module type "wifi_cc_defaults" error: hardware/interfaces/Android.bp:31:1: unrecognized module type "hidl_package_root" error: hardware/nxp/secure_element/intf/nxpese/Android.bp:10:1: unrecognized module type "hidl_package_root" error: hardware/google/interfaces/Android.bp:8:1: unrecognized module type "hidl_package_root" error: hardware/google/interfaces/image/Android.bp:6:1: unrecognized module type "aidl_interface" error: frameworks/hardware/interfaces/Android.bp:5:1: unrecognized module type "hidl_package_root" error: hardware/nxp/secure_element/intf/nxpese/1.0/Android.bp:12:1: unrecognized module type "hidl_interface" error: frameworks/av/Android.bp:136:1: unrecognized module type "aidl_interface" 00:19:30 soong bootstrap failed with: exit status 1 #### failed to build some targets (4 seconds) #### ============================================ [100% 2/2] analyzing Android.bp files and generating ninja file at out/soong/build.aosp_cf_x86_64_phone.ninja FAILED: out/soong/build.aosp_cf_x86_64_phone.ninja cd "$(dirname "out/host/linux-x86/bin/soong_build")" && BUILDER="$PWD/$(basename "out/host/linux-x86/bin/soong_build")" && cd / && env -i "$BUILDER" --top "$TOP" --soong_out "out/soong" --out "out" --soong_variables out/soong/soong.aosp_cf_x86_64_phone.variables -o out/soong/build.aosp_cf_x86_64_phone.ninja -l out/.module_paths/Android.bp.list --available_env out/soong/soong.environment.available --used_env out/soong/soong.environment.used.aosp_cf_x86_64_phone.build Android.bp error: hardware/google/interfaces/Android.bp:8:1: unrecognized module type "hidl_package_root" error: <input>: failed to open "frameworks/opt/net/wifi/libwifi_hal/Android.bp": open /home/heyang/aosp/main/frameworks/opt/net/wifi/libwifi_hal/Android.bp: no such file or directory error: hardware/synaptics/wlan/synadhd/wifi_hal/Android.bp:29:1: unrecognized module type "wifi_cc_defaults" error: packages/modules/Virtualization/libs/android_display_backend/Android.bp:1:1: unrecognized module type "aidl_interface" error: packages/modules/Virtualization/libs/authfs_aidl_interface/Android.bp:5:1: unrecognized module type "aidl_interface" error: packages/modules/Virtualization/tests/vm_accessor/aidl/Android.bp:5:1: unrecognized module type "aidl_interface" error: hardware/google/interfaces/bluetooth/bt_channel_avoidance/aidl/Android.bp:6:1: unrecognized module type "aidl_interface" error: frameworks/hardware/interfaces/Android.bp:5:1: unrecognized module type "hidl_package_root" error: frameworks/av/Android.bp:37:1: unrecognized module type "aidl_interface_defaults" error: hardware/broadcom/wlan/bcmdhd/wifi_hal/Android.bp:29:1: unrecognized module type "wifi_cc_defaults" error: packages/modules/Virtualization/libs/compos_aidl_interface/Android.bp:5:1: unrecognized module type "aidl_interface" error: frameworks/av/Android.bp:55:1: unrecognized module type "aidl_interface" error: packages/modules/Virtualization/tests/aidl/Android.bp:5:1: unrecognized module type "aidl_interface" error: frameworks/av/Android.bp:92:1: unrecognized module type "aidl_interface" error: hardware/interfaces/Android.bp:31:1: unrecognized module type "hidl_package_root" error: packages/modules/Virtualization/android/TerminalApp/Android.bp:45:1: unrecognized module type "aidl_interface" error: hardware/nxp/nfc/intf/nxpnfc/Android.bp:10:1: unrecognized module type "hidl_package_root" error: packages/modules/Virtualization/android/virtualizationservice/Android.bp:66:1: unrecognized module type "xsd_config" error: frameworks/av/Android.bp:136:1: unrecognized module type "aidl_interface" error: packages/modules/Virtualization/android/virtmgr/Android.bp:97:1: unrecognized module type "xsd_config" 00:19:36 soong bootstrap failed with: exit status 1 #### failed to build some targets (4 seconds) #### ============================================ [100% 2/2] analyzing Android.bp files and generating ninja file at out/soong/build.aosp_cf_x86_64_phone.ninja FAILED: out/soong/build.aosp_cf_x86_64_phone.ninja cd "$(dirname "out/host/linux-x86/bin/soong_build")" && BUILDER="$PWD/$(basename "out/host/linux-x86/bin/soong_build")" && cd / && env -i "$BUILDER" --top "$TOP" --soong_out "out/soong" --out "out" --soong_variables out/soong/soong.aosp_cf_x86_64_phone.variables -o out/soong/build.aosp_cf_x86_64_phone.ninja -l out/.module_paths/Android.bp.list --available_env out/soong/soong.environment.available --used_env out/soong/soong.environment.used.aosp_cf_x86_64_phone.build Android.bp error: frameworks/hardware/interfaces/Android.bp:5:1: unrecognized module type "hidl_package_root" error: <input>: failed to open "frameworks/opt/net/wifi/libwifi_hal/Android.bp": open /home/heyang/aosp/main/frameworks/opt/net/wifi/libwifi_hal/Android.bp: no such file or directory error: hardware/broadcom/wlan/bcmdhd/wifi_hal/Android.bp:29:1: unrecognized module type "wifi_cc_defaults" error: hardware/synaptics/wlan/synadhd/wifi_hal/Android.bp:29:1: unrecognized module type "wifi_cc_defaults" error: hardware/interfaces/Android.bp:31:1: unrecognized module type "hidl_package_root" error: hardware/google/av/media/eco/Android.bp:6:1: unrecognized module type "aidl_interface" error: hardware/google/interfaces/Android.bp:8:1: unrecognized module type "hidl_package_root" error: hardware/google/interfaces/bluetooth/ccc/1.1/Android.bp:6:1: unrecognized module type "hidl_interface" error: hardware/nxp/nfc/intf/nxpnfc/Android.bp:10:1: unrecognized module type "hidl_package_root" error: hardware/nxp/nfc/intf/nxpnfc/1.0/Android.bp:12:1: unrecognized module type "hidl_interface" error: hardware/nxp/nfc/intf/nxpnfc/2.0/Android.bp:12:1: unrecognized module type "hidl_interface" error: frameworks/av/Android.bp:37:1: unrecognized module type "aidl_interface_defaults" error: frameworks/av/Android.bp:55:1: unrecognized module type "aidl_interface" error: frameworks/av/Android.bp:92:1: unrecognized module type "aidl_interface" error: frameworks/av/Android.bp:136:1: unrecognized module type "aidl_interface" 00:19:42 soong bootstrap failed with: exit status 1 #### failed to build some targets (4 seconds) ####
分析:
- error: hardware/broadcom/wlan/bcmdhd/wifi_hal/Android.bp:29:1: unrecognized module type "wifi_cc_defaults"
- 这条错误依赖 framework 的接口
- 再把framework拉完
拉完 framework
- platform/frameworks/av
- platform/frameworks/base
- platform/frameworks/compile/libbcc
- platform/frameworks/compile/mclinker
- platform/frameworks/compile/slang
- platform/frameworks/ex
- platform/frameworks/hardware/interfaces
- platform/frameworks/layoutlib
- platform/frameworks/libs/binary_translation
- platform/frameworks/libs/systemui
- platform/frameworks/libs/modules-utils
- platform/frameworks/libs/native_bridge_support
- platform/frameworks/libs/service_entitlement
- platform/frameworks/libs/gsma_services
- platform/frameworks/minikin
- platform/frameworks/multidex
- platform/frameworks/native
- platform/frameworks/opt/bitmap
- platform/frameworks/opt/calendar
- platform/frameworks/opt/car/services
- platform/frameworks/opt/car/setupwizard
- platform/frameworks/opt/chips
- platform/frameworks/opt/colorpicker
- platform/frameworks/opt/localepicker
- platform/frameworks/opt/net/ims
- platform/frameworks/opt/net/voip
- platform/frameworks/opt/net/wifi
- platform/frameworks/opt/photoviewer
- platform/frameworks/opt/setupwizard
- platform/frameworks/opt/telephony
- platform/frameworks/opt/timezonepicker
- platform/frameworks/opt/tv/tvsystem
- platform/frameworks/opt/vcard
- platform/frameworks/proto_logging
- platform/frameworks/rs
- platform/frameworks/wilhelm
- 拉完后清除out多次m
-
error: frameworks/hardware/interfaces/Android.bp:5:1: unrecognized module type "hidl_package_root" error: packages/modules/Virtualization/libs/android_display_backend/Android.bp:1:1: unrecognized module type "aidl_interface" error: hardware/interfaces/Android.bp:31:1: unrecognized module type "hidl_package_root" error: packages/modules/Virtualization/tests/aidl/Android.bp:5:1: unrecognized module type "aidl_interface" error: packages/modules/Virtualization/libs/compos_aidl_interface/Android.bp:5:1: unrecognized module type "aidl_interface" error: packages/modules/Virtualization/libs/authfs_aidl_interface/Android.bp:5:1: unrecognized module type "aidl_interface" error: hardware/google/interfaces/Android.bp:8:1: unrecognized module type "hidl_package_root" error: frameworks/av/Android.bp:37:1: unrecognized module type "aidl_interface_defaults" error: frameworks/av/Android.bp:55:1: unrecognized module type "aidl_interface" error: frameworks/av/Android.bp:92:1: unrecognized module type "aidl_interface" error: hardware/nxp/nfc/intf/nxpnfc/Android.bp:10:1: unrecognized module type "hidl_package_root" error: frameworks/hardware/interfaces/automotive/display/1.0/Android.bp:7:1: unrecognized module type "hidl_interface" error: hardware/google/av/media/eco/Android.bp:6:1: unrecognized module type "aidl_interface" error: packages/modules/Virtualization/android/TerminalApp/Android.bp:45:1: unrecognized module type "aidl_interface" error: hardware/google/interfaces/bluetooth/ccc/1.0/Android.bp:6:1: unrecognized module type "hidl_interface" error: hardware/google/interfaces/image/Android.bp:6:1: unrecognized module type "aidl_interface" error: hardware/google/interfaces/media/c2/1.0/Android.bp:8:1: unrecognized module type "hidl_interface" error: packages/modules/Virtualization/android/virtualizationservice/Android.bp:66:1: unrecognized module type "xsd_config" error: frameworks/av/Android.bp:136:1: unrecognized module type "aidl_interface" error: frameworks/compile/slang/Android.bp:157:1: unrecognized module type "llvm_tblgen" 09:20:56 soong bootstrap failed with: exit status 1 #### failed to build some targets (15 seconds) #### error: frameworks/hardware/interfaces/Android.bp:5:1: unrecognized module type "hidl_package_root" error: hardware/interfaces/Android.bp:31:1: unrecognized module type "hidl_package_root" error: hardware/nxp/secure_element/intf/nxpese/Android.bp:10:1: unrecognized module type "hidl_package_root" error: hardware/google/interfaces/Android.bp:8:1: unrecognized module type "hidl_package_root" error: hardware/google/interfaces/ril_ext/Android.bp:5:1: unrecognized module type "aidl_interface" error: hardware/google/interfaces/media/c2/1.0/Android.bp:8:1: unrecognized module type "hidl_interface" error: hardware/nxp/nfc/intf/nxpnfc/Android.bp:10:1: unrecognized module type "hidl_package_root" error: hardware/nxp/nfc/intf/nxpnfc/1.0/Android.bp:12:1: unrecognized module type "hidl_interface" error: hardware/nxp/nfc/intf/nxpnfc/aidl/Android.bp:12:1: unrecognized module type "aidl_interface" error: frameworks/av/Android.bp:37:1: unrecognized module type "aidl_interface_defaults" error: frameworks/av/Android.bp:55:1: unrecognized module type "aidl_interface" error: frameworks/av/Android.bp:92:1: unrecognized module type "aidl_interface" error: frameworks/hardware/interfaces/vr/composer/1.0/Android.bp:7:1: unrecognized module type "hidl_interface" error: frameworks/hardware/interfaces/automotive/display/1.0/Android.bp:7:1: unrecognized module type "hidl_interface" error: frameworks/av/Android.bp:136:1: unrecognized module type "aidl_interface" error: frameworks/compile/slang/Android.bp:157:1: unrecognized module type "llvm_tblgen" 09:21:28 soong bootstrap failed with: exit status 1 #### failed to build some targets (4 seconds) #### error: frameworks/av/Android.bp:37:1: unrecognized module type "aidl_interface_defaults" error: frameworks/av/Android.bp:55:1: unrecognized module type "aidl_interface" error: hardware/interfaces/Android.bp:31:1: unrecognized module type "hidl_package_root" error: frameworks/av/Android.bp:92:1: unrecognized module type "aidl_interface" error: hardware/google/av/media/eco/Android.bp:6:1: unrecognized module type "aidl_interface" error: hardware/nxp/nfc/intf/nxpnfc/Android.bp:10:1: unrecognized module type "hidl_package_root" error: hardware/nxp/nfc/intf/nxpnfc/2.0/Android.bp:12:1: unrecognized module type "hidl_interface" error: frameworks/hardware/interfaces/Android.bp:5:1: unrecognized module type "hidl_package_root" error: packages/modules/Virtualization/libs/android_display_backend/Android.bp:1:1: unrecognized module type "aidl_interface" error: hardware/google/interfaces/Android.bp:8:1: unrecognized module type "hidl_package_root" error: hardware/google/interfaces/bluetooth/ext/aidl/Android.bp:6:1: unrecognized module type "aidl_interface" error: hardware/google/interfaces/display/Android.bp:6:1: unrecognized module type "aidl_interface" error: hardware/google/interfaces/light/1.0/Android.bp:8:1: unrecognized module type "hidl_interface" error: hardware/google/interfaces/bluetooth/ccc/aidl/Android.bp:6:1: unrecognized module type "aidl_interface" error: hardware/google/interfaces/light/1.1/Android.bp:8:1: unrecognized module type "hidl_interface" error: hardware/google/interfaces/bluetooth/ewp/aidl/Android.bp:6:1: unrecognized module type "aidl_interface" error: hardware/google/interfaces/bluetooth/ext/1.0/Android.bp:6:1: unrecognized module type "hidl_interface" error: hardware/google/interfaces/media/c2/1.0/Android.bp:8:1: unrecognized module type "hidl_interface" error: hardware/google/interfaces/bluetooth/ccc/1.1/Android.bp:6:1: unrecognized module type "hidl_interface" error: hardware/google/interfaces/bluetooth/ccc/1.0/Android.bp:6:1: unrecognized module type "hidl_interface" error: hardware/google/interfaces/ril_ext/Android.bp:5:1: unrecognized module type "aidl_interface" error: hardware/google/interfaces/bluetooth/ewp/1.0/Android.bp:6:1: unrecognized module type "hidl_interface" error: hardware/google/interfaces/power/Android.bp:6:1: unrecognized module type "aidl_interface" error: hardware/google/interfaces/bluetooth/bt_channel_avoidance/aidl/Android.bp:6:1: unrecognized module type "aidl_interface" error: hardware/google/interfaces/bluetooth/bt_channel_avoidance/1.0/Android.bp:6:1: unrecognized module type "hidl_interface" error: hardware/google/interfaces/bluetooth/sar/1.2/Android.bp:6:1: unrecognized module type "hidl_interface" error: hardware/google/interfaces/thermal/Android.bp:6:1: unrecognized module type "aidl_interface" error: hardware/google/interfaces/image/Android.bp:6:1: unrecognized module type "aidl_interface" error: packages/modules/Virtualization/libs/compos_aidl_interface/Android.bp:5:1: unrecognized module type "aidl_interface" error: hardware/nxp/nfc/intf/nxpnfc/aidl/Android.bp:12:1: unrecognized module type "aidl_interface" error: hardware/nxp/nfc/intf/nxpnfc/1.0/Android.bp:12:1: unrecognized module type "hidl_interface" error: frameworks/av/Android.bp:136:1: unrecognized module type "aidl_interface" error: frameworks/compile/slang/Android.bp:157:1: unrecognized module type "llvm_tblgen" 09:21:43 soong bootstrap failed with: exit status 1 #### failed to build some targets (5 seconds) #### error: frameworks/hardware/interfaces/Android.bp:5:1: unrecognized module type "hidl_package_root" error: frameworks/hardware/interfaces/cameraservice/service/2.0/Android.bp:7:1: unrecognized module type "hidl_interface" error: hardware/interfaces/Android.bp:31:1: unrecognized module type "hidl_package_root" error: system/core/trusty/stats/aidl/Android.bp:19:1: unrecognized module type "aidl_interface" error: frameworks/hardware/interfaces/vr/composer/2.0/Android.bp:7:1: unrecognized module type "hidl_interface" error: frameworks/hardware/interfaces/stats/1.0/Android.bp:7:1: unrecognized module type "hidl_interface" error: frameworks/hardware/interfaces/sensorservice/aidl/Android.bp:5:1: unrecognized module type "aidl_interface" error: frameworks/hardware/interfaces/automotive/powerpolicy/aidl/Android.bp:19:1: unrecognized module type "aidl_interface" error: frameworks/hardware/interfaces/automotive/powerpolicy/aidl/Android.bp:59:1: unrecognized module type "aidl_interface" error: frameworks/hardware/interfaces/cameraservice/service/2.2/Android.bp:7:1: unrecognized module type "hidl_interface" error: frameworks/hardware/interfaces/cameraservice/device/2.1/Android.bp:7:1: unrecognized module type "hidl_interface" error: frameworks/hardware/interfaces/schedulerservice/1.0/Android.bp:7:1: unrecognized module type "hidl_interface" error: frameworks/hardware/interfaces/vr/composer/1.0/Android.bp:7:1: unrecognized module type "hidl_interface" error: frameworks/hardware/interfaces/sensorservice/1.0/Android.bp:7:1: unrecognized module type "hidl_interface" error: frameworks/hardware/interfaces/cameraservice/device/aidl/Android.bp:5:1: unrecognized module type "aidl_interface" error: frameworks/hardware/interfaces/automotive/display/1.0/Android.bp:7:1: unrecognized module type "hidl_interface" error: frameworks/hardware/interfaces/cameraservice/device/2.0/Android.bp:7:1: unrecognized module type "hidl_interface" error: frameworks/hardware/interfaces/vibrator/aidl/Android.bp:22:1: unrecognized module type "aidl_interface" error: frameworks/hardware/interfaces/location/altitude/aidl/Android.bp:21:1: unrecognized module type "aidl_interface" error: frameworks/hardware/interfaces/automotive/telemetry/aidl/Android.bp:23:1: unrecognized module type "aidl_interface" error: frameworks/hardware/interfaces/cameraservice/common/aidl/Android.bp:5:1: unrecognized module type "aidl_interface" error: frameworks/hardware/interfaces/stats/aidl/Android.bp:20:1: unrecognized module type "aidl_interface" error: frameworks/hardware/interfaces/cameraservice/service/aidl/Android.bp:5:1: unrecognized module type "aidl_interface" error: frameworks/hardware/interfaces/automotive/display/aidl/Android.bp:19:1: unrecognized module type "aidl_interface" error: frameworks/hardware/interfaces/cameraservice/service/2.1/Android.bp:7:1: unrecognized module type "hidl_interface" error: frameworks/hardware/interfaces/displayservice/1.0/Android.bp:7:1: unrecognized module type "hidl_interface" error: frameworks/hardware/interfaces/cameraservice/common/2.0/Android.bp:7:1: unrecognized module type "hidl_interface" error: frameworks/hardware/interfaces/automotive/packagemanagerproxy/aidl/Android.bp:23:1: unrecognized module type "aidl_interface" error: packages/modules/Virtualization/tests/aidl/Android.bp:5:1: unrecognized module type "aidl_interface" error: packages/modules/Virtualization/tests/vm_accessor/aidl/Android.bp:5:1: unrecognized module type "aidl_interface" error: packages/modules/Virtualization/libs/authfs_aidl_interface/Android.bp:5:1: unrecognized module type "aidl_interface" error: frameworks/av/Android.bp:37:1: unrecognized module type "aidl_interface_defaults" error: frameworks/av/Android.bp:55:1: unrecognized module type "aidl_interface" error: frameworks/av/Android.bp:92:1: unrecognized module type "aidl_interface" error: hardware/google/av/media/eco/Android.bp:6:1: unrecognized module type "aidl_interface" error: hardware/nxp/secure_element/intf/nxpese/Android.bp:10:1: unrecognized module type "hidl_package_root" error: hardware/nxp/nfc/intf/nxpnfc/Android.bp:10:1: unrecognized module type "hidl_package_root" error: hardware/google/interfaces/Android.bp:8:1: unrecognized module type "hidl_package_root" error: packages/modules/Virtualization/android/TerminalApp/Android.bp:45:1: unrecognized module type "aidl_interface" error: frameworks/av/Android.bp:136:1: unrecognized module type "aidl_interface" error: packages/modules/Virtualization/android/virtualizationservice/Android.bp:66:1: unrecognized module type "xsd_config" error: packages/modules/Virtualization/android/virtmgr/Android.bp:97:1: unrecognized module type "xsd_config" error: frameworks/compile/slang/Android.bp:157:1: unrecognized module type "llvm_tblgen" 09:21:56 soong bootstrap failed with: exit status 1 #### failed to build some targets (4 seconds) #### error: frameworks/hardware/interfaces/Android.bp:5:1: unrecognized module type "hidl_package_root" error: frameworks/hardware/interfaces/cameraservice/common/aidl/Android.bp:5:1: unrecognized module type "aidl_interface" error: frameworks/hardware/interfaces/cameraservice/device/2.0/Android.bp:7:1: unrecognized module type "hidl_interface" error: frameworks/hardware/interfaces/sensorservice/aidl/Android.bp:5:1: unrecognized module type "aidl_interface" error: frameworks/hardware/interfaces/cameraservice/device/2.1/Android.bp:7:1: unrecognized module type "hidl_interface" error: frameworks/hardware/interfaces/automotive/powerpolicy/aidl/Android.bp:19:1: unrecognized module type "aidl_interface" error: frameworks/hardware/interfaces/automotive/powerpolicy/aidl/Android.bp:59:1: unrecognized module type "aidl_interface" error: frameworks/hardware/interfaces/automotive/telemetry/aidl/Android.bp:23:1: unrecognized module type "aidl_interface" error: frameworks/hardware/interfaces/automotive/display/aidl/Android.bp:19:1: unrecognized module type "aidl_interface" error: frameworks/hardware/interfaces/cameraservice/common/2.0/Android.bp:7:1: unrecognized module type "hidl_interface" error: frameworks/hardware/interfaces/stats/aidl/Android.bp:20:1: unrecognized module type "aidl_interface" error: frameworks/hardware/interfaces/automotive/packagemanagerproxy/aidl/Android.bp:23:1: unrecognized module type "aidl_interface" error: hardware/interfaces/Android.bp:31:1: unrecognized module type "hidl_package_root" error: frameworks/hardware/interfaces/sensorservice/1.0/Android.bp:7:1: unrecognized module type "hidl_interface" error: frameworks/hardware/interfaces/cameraservice/service/2.0/Android.bp:7:1: unrecognized module type "hidl_interface" error: frameworks/hardware/interfaces/stats/1.0/Android.bp:7:1: unrecognized module type "hidl_interface" error: frameworks/hardware/interfaces/vr/composer/1.0/Android.bp:7:1: unrecognized module type "hidl_interface" error: frameworks/hardware/interfaces/location/altitude/aidl/Android.bp:21:1: unrecognized module type "aidl_interface" error: hardware/nxp/nfc/intf/nxpnfc/Android.bp:10:1: unrecognized module type "hidl_package_root" error: frameworks/hardware/interfaces/displayservice/1.0/Android.bp:7:1: unrecognized module type "hidl_interface" error: frameworks/hardware/interfaces/schedulerservice/1.0/Android.bp:7:1: unrecognized module type "hidl_interface" error: frameworks/compile/slang/Android.bp:157:1: unrecognized module type "llvm_tblgen" 09:22:10 soong bootstrap failed with: exit status 1 #### failed to build some targets (4 seconds) ####
拉 platform/sdk
heyang@MSI:~/aosp/main$ repo sync platform/sdk
Fetching: 100% (1/1), done in 2.183s
Checking out: 100% (1/1), done in 0.010s
repo sync has finished successfully.
拉完system
- platform/system/acpi/bert_collector
- platform/system/apex
- platform/system/authgraph
- platform/system/bpf
- platform/system/bpfprogs
- platform/system/ca-certificates
- platform/system/chre
- platform/system/connectivity/wificond
- platform/system/core
- platform/system/cros-codecs
- platform/system/dmesgd
- platform/system/extras
- platform/system/gatekeeper
- platform/system/gsid
- platform/system/hardware/interfaces
- platform/system/hwservicemanager
- platform/system/incremental_delivery
- platform/system/keymaster
- platform/system/keymint
- platform/system/libartpalette
- platform/system/libbase
- platform/system/libcppbor
- platform/system/libfmq
- platform/system/libhidl
- platform/system/libhwbinder
- platform/system/libprocinfo
- platform/system/librustutils
- platform/system/libsysprop
- platform/system/libufdt
- platform/system/libvintf
- platform/system/libziparchive
- platform/system/linkerconfig
- platform/system/logging
- platform/system/media
- platform/system/memory/libion
- platform/system/memory/libdmabufheap
- platform/system/memory/libmeminfo
- platform/system/memory/libmemtrack
- platform/system/memory/libmemunreachable
- platform/system/memory/lmkd
- platform/system/memory/mmd
- platform/system/netd
- platform/system/nfc
- platform/system/nvram
- platform/system/secretkeeper
- platform/system/security
- platform/system/see/authmgr
- platform/system/sepolicy
- platform/system/server_configurable_flags
- platform/system/teeui
- platform/system/testing/gtest_extras
- platform/system/timezone
- platform/system/tools/aidl
- platform/system/tools/hidl
- platform/system/tools/mkbootimg
- platform/system/tools/sysprop
- platform/system/tools/xsdc"
- platform/system/unwinding
- platform/system/update_engine
- platform/system/usb_info_tools
m后解决所有 AIDL 和 HIDL 类错误
小结:
关键项目:
- platform/system/tools/aidl
- platform/system/tools/hidl
- platform/system/tools/mkbootimg
- platform/system/tools/sysprop
- platform/system/tools/xsdc"
关键目录:
- frameworks
- system
- hardware
-
heyang@MSI:~/aosp/main$ m ============================================ PLATFORM_VERSION_CODENAME=Baklava PLATFORM_VERSION=Baklava TARGET_PRODUCT=aosp_cf_x86_64_phone TARGET_BUILD_VARIANT=eng TARGET_ARCH=x86_64 TARGET_ARCH_VARIANT=silvermont TARGET_2ND_ARCH=x86 TARGET_2ND_ARCH_VARIANT=silvermont HOST_OS=linux HOST_OS_EXTRA=Linux-5.15.167.4-microsoft-standard-WSL2-x86_64-Ubuntu-24.04.1-LTS HOST_CROSS_OS=windows BUILD_ID=MAIN OUT_DIR=out ============================================ [100% 114/114] analyzing Android.bp files and generating ninja file at out/soong/build.aosp_cf_x86_64_phone.ninja FAILED: out/soong/build.aosp_cf_x86_64_phone.ninja cd "$(dirname "out/host/linux-x86/bin/soong_build")" && BUILDER="$PWD/$(basename "out/host/linux-x86/bin/soong_build")" && cd / && env -i "$BUILDER" --top "$TOP" --soong_out "out/soong" --out "out" --soong_variables out/soong/soong.aosp_cf_x86_64_phone.variables -o out/soong/build.aosp_cf_x86_64_phone.ninja -l out/.module_paths/Android.bp.list --available_env out/soong/soong.environment.available --used_env out/soong/soong.environment.used.aosp_cf_x86_64_phone.build Android.bp error: frameworks/compile/mclinker/tools/mcld/Android.bp:29:1: unrecognized module type "llvm_tblgen" error: frameworks/compile/slang/Android.bp:157:1: unrecognized module type "llvm_tblgen" error: frameworks/base/libs/WindowManager/Shell/tests/flicker/pip/Android.bp:163:1: unrecognized module type "csuite_test" 11:13:53 soong bootstrap failed with: exit status 1 #### failed to build some targets (17 seconds) ####
heyang@MSI:~/aosp/main$ m ============================================ PLATFORM_VERSION_CODENAME=Baklava PLATFORM_VERSION=Baklava TARGET_PRODUCT=aosp_cf_x86_64_phone TARGET_BUILD_VARIANT=eng TARGET_ARCH=x86_64 TARGET_ARCH_VARIANT=silvermont TARGET_2ND_ARCH=x86 TARGET_2ND_ARCH_VARIANT=silvermont HOST_OS=linux HOST_OS_EXTRA=Linux-5.15.167.4-microsoft-standard-WSL2-x86_64-Ubuntu-24.04.1-LTS HOST_CROSS_OS=windows BUILD_ID=MAIN OUT_DIR=out ============================================ [100% 2/2] analyzing Android.bp files and generating ninja file at out/soong/build.aosp_cf_x86_64_phone.ninja FAILED: out/soong/build.aosp_cf_x86_64_phone.ninja cd "$(dirname "out/host/linux-x86/bin/soong_build")" && BUILDER="$PWD/$(basename "out/host/linux-x86/bin/soong_build")" && cd / && env -i "$BUILDER" --top "$TOP" --soong_out "out/soong" --out "out" --soong_variables out/soong/soong.aosp_cf_x86_64_phone.variables -o out/soong/build.aosp_cf_x86_64_phone.ninja -l out/.module_paths/Android.bp.list --available_env out/soong/soong.environment.available --used_env out/soong/soong.environment.used.aosp_cf_x86_64_phone.build Android.bp error: frameworks/compile/mclinker/tools/mcld/Android.bp:29:1: unrecognized module type "llvm_tblgen" error: frameworks/compile/slang/Android.bp:157:1: unrecognized module type "llvm_tblgen" error: frameworks/base/libs/WindowManager/Shell/tests/flicker/pip/Android.bp:163:1: unrecognized module type "csuite_test" 11:14:03 soong bootstrap failed with: exit status 1 ninja: build stopped: subcommand failed. #### failed to build some targets (5 seconds) ####
后续
至此我们看到了AOSP的核心概念,它贯穿了整个AOSP的历史,什么东西呢?应对以下设计思维的解决方案:实现IPC的 AIDL 和 HIDL, 也就是AOSP新增的编程语言:aidl 和 hal,对应.aidl和.hal文件。
- 设计操作系统,提供IPC机制是必须的
- 面对多种编程语言,IPC实现机制是自己来提供还是交给各个编程语言本身
- 如果自己提供IPC机制,如何做到通用性、易用性、高性能、和稳定
后续我们对现有项目进行裁剪,构建一个最小环境。