blob: 17b58f88a40aa55d829a4ec5a954deedee06259c [file] [log] [blame]
Steven Morelandf3ae55a2017-05-09 15:49:36 -07001subdirs = [
Tom Cherry600e8062017-05-12 17:08:20 -07002 "bootloader_message",
Steven Morelandf3ae55a2017-05-09 15:49:36 -07003]
Tao Baod2f2ad62018-03-23 23:24:25 -07004
Bob Badour29be3f62021-02-12 18:00:57 -08005// *** THIS PACKAGE HAS SPECIAL LICENSING CONDITIONS. PLEASE
6// CONSULT THE OWNERS AND opensource-licensing@google.com BEFORE
7// DEPENDING ON IT IN YOUR PROJECT. ***
8package {
9 default_applicable_licenses: ["bootable_recovery_license"],
10}
11
12// Added automatically by a large-scale-change that took the approach of
13// 'apply every license found to every target'. While this makes sure we respect
14// every license restriction, it may not be entirely correct.
15//
16// e.g. GPL in an MIT project might only apply to the contrib/ directory.
17//
18// Please consider splitting the single license below into multiple licenses,
19// taking care not to lose any license_kind information, and overriding the
20// default license using the 'licenses: [...]' property on targets as needed.
21//
22// For unused files, consider creating a 'fileGroup' with "//visibility:private"
23// to attach the license to, and including a comment whether the files may be
24// used in the current project.
25// See: http://go/android-license-faq
26license {
27 name: "bootable_recovery_license",
28 visibility: [":__subpackages__"],
29 license_kinds: [
30 "SPDX-license-identifier-Apache-2.0",
31 "SPDX-license-identifier-MIT",
32 "SPDX-license-identifier-OFL", // by exception only
33 ],
34 license_text: [
35 "NOTICE",
36 ],
37}
38
Tao Baod2f2ad62018-03-23 23:24:25 -070039cc_defaults {
40 name: "recovery_defaults",
Tao Baod2f2ad62018-03-23 23:24:25 -070041 cflags: [
Tao Bao818f9382018-08-06 15:52:24 -070042 "-D_FILE_OFFSET_BITS=64",
Tao Bao818f9382018-08-06 15:52:24 -070043 // Must be the same as RECOVERY_API_VERSION.
44 "-DRECOVERY_API_VERSION=3",
Tao Baod2f2ad62018-03-23 23:24:25 -070045 "-Wall",
46 "-Werror",
47 ],
bigbiffd58ba182020-03-23 10:02:29 -040048 cpp_std: "c++17",
Tao Baod2f2ad62018-03-23 23:24:25 -070049}
50
bigbiff673c7ae2020-12-02 19:44:56 -050051bootstrap_go_package {
52 name: "soong-libaosprecovery_defaults",
53 pkgPath: "bootable/recovery/libaosprecovery",
54 deps: [
55 "soong",
56 "soong-android",
57 "soong-cc"
Hridya Valsaraju20c81b32018-07-27 22:09:12 -070058 ],
Hridya Valsaraju20c81b32018-07-27 22:09:12 -070059 srcs: [
bigbiff6e0ca7d2021-02-06 19:15:16 -050060 "libaosprecovery_defaults.go",
61 "soong/makevars.go"
Hridya Valsaraju20c81b32018-07-27 22:09:12 -070062 ],
bigbiff673c7ae2020-12-02 19:44:56 -050063 pluginFor: ["soong_build"]
Hridya Valsaraju20c81b32018-07-27 22:09:12 -070064}
65
bigbiff673c7ae2020-12-02 19:44:56 -050066libaosprecovery_defaults {
67 name: "libaosprecovery_defaults"
68}
Tao Bao5fc72a12018-08-07 14:38:51 -070069
bigbiff673c7ae2020-12-02 19:44:56 -050070cc_library_shared {
71 name: "libaosprecovery",
72 defaults: ["libaosprecovery_defaults"],
73 cflags: [
74 "-std=gnu++2a",
75 "-DRECOVERY_API_VERSION=3"
Tao Bao5fc72a12018-08-07 14:38:51 -070076 ],
bigbiff673c7ae2020-12-02 19:44:56 -050077 include_dirs: [
78 "bootable/recovery/install/include",
79 "bootable/recovery/recovery_ui/include",
80 "bootable/recovery/recovery_utils/include",
81 "bootable/recovery/otautil/include",
82 "bootable/recovery/minadbd",
83 "bootable/recovery/minadbd/include",
84 "bootable/recovery/minzip",
85 "bootable/recovery/twrpinstall/include",
86 "system/libvintf/include"
87 ],
88 srcs: [
89 "install/adb_install.cpp",
90 "install/asn1_decoder.cpp",
91 "install/get_args.cpp",
92 "install/install.cpp",
93 "install/package.cpp",
bigbiffc69420e2021-11-21 14:57:27 -050094 "install/spl_check.cpp",
bigbiff673c7ae2020-12-02 19:44:56 -050095 "install/verifier.cpp",
96 "install/wipe_data.cpp",
97 "install/set_metadata.cpp",
98 "install/ZipUtil.cpp"
99 ],
Tao Bao5fc72a12018-08-07 14:38:51 -0700100 shared_libs: [
Tao Bao5fc72a12018-08-07 14:38:51 -0700101 "libbase",
102 "libbootloader_message",
103 "libcrypto",
bigbiff673c7ae2020-12-02 19:44:56 -0500104 "libext4_utils",
105 "libfs_mgr",
106 "libfusesideload",
107 "libhidl-gen-utils",
108 "libhidlbase",
Tao Bao5fc72a12018-08-07 14:38:51 -0700109 "liblog",
bigbiff673c7ae2020-12-02 19:44:56 -0500110 "libselinux",
111 "libtinyxml2",
112 "libutils",
113 "libz",
Tao Bao5fc72a12018-08-07 14:38:51 -0700114 "libziparchive",
bigbiff673c7ae2020-12-02 19:44:56 -0500115 "libcutils",
116 "libc++"
Tao Bao5fc72a12018-08-07 14:38:51 -0700117 ],
Tao Bao5fc72a12018-08-07 14:38:51 -0700118 static_libs: [
Tao Bao5fc72a12018-08-07 14:38:51 -0700119 "libotautil",
bigbiff673c7ae2020-12-02 19:44:56 -0500120 "libvintf",
121 "libhidl-gen-utils",
Tao Baoe3f09a72019-10-01 11:55:36 -0700122 "librecovery_utils",
bigbiff42b4ba92021-11-21 13:29:32 -0500123 "libc++fs",
bigbiffc69420e2021-11-21 14:57:27 -0500124 "libprotobuf-cpp-lite",
bigbiffe1981e52021-11-21 14:35:27 -0500125 "ota_metadata_proto_cc",
bigbiff42b4ba92021-11-21 13:29:32 -0500126 "update_metadata-protos"
bigbiff91bd7a72021-01-03 17:33:01 -0500127 ],
128 required: [
129 "init_recovery.rc",
Mohd Farazdc2cf792021-04-17 21:09:22 +0200130 "ueventd.rc.recovery",
bigbiff91bd7a72021-01-03 17:33:01 -0500131 "libdl_android.bootstrap",
bigbiffeaac7622021-02-21 14:21:50 -0500132 "ziptool.recovery"
bigbiff673c7ae2020-12-02 19:44:56 -0500133 ]
Tao Baod2f2ad62018-03-23 23:24:25 -0700134}
135
bigbiff91bd7a72021-01-03 17:33:01 -0500136prebuilt_etc {
137 name: "init_recovery.rc",
138 filename: "init.rc",
139 src: "etc/init.rc",
140 sub_dir: "init/hw",
141 recovery: true,
142}