blob: f20a551d3acd53b6268fdf5dbce616c38b9c257d [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",
bigbiff673c7ae2020-12-02 19:44:56 -050090 "install/get_args.cpp",
91 "install/install.cpp",
bigbiffc69420e2021-11-21 14:57:27 -050092 "install/spl_check.cpp",
bigbiff673c7ae2020-12-02 19:44:56 -050093 "install/wipe_data.cpp",
94 "install/set_metadata.cpp",
95 "install/ZipUtil.cpp"
96 ],
Tao Bao5fc72a12018-08-07 14:38:51 -070097 shared_libs: [
Tao Bao5fc72a12018-08-07 14:38:51 -070098 "libbase",
99 "libbootloader_message",
100 "libcrypto",
bigbiff673c7ae2020-12-02 19:44:56 -0500101 "libext4_utils",
102 "libfs_mgr",
103 "libfusesideload",
104 "libhidl-gen-utils",
105 "libhidlbase",
Tao Bao5fc72a12018-08-07 14:38:51 -0700106 "liblog",
bigbiff673c7ae2020-12-02 19:44:56 -0500107 "libselinux",
108 "libtinyxml2",
109 "libutils",
110 "libz",
Tao Bao5fc72a12018-08-07 14:38:51 -0700111 "libziparchive",
bigbiff673c7ae2020-12-02 19:44:56 -0500112 "libcutils",
113 "libc++"
Tao Bao5fc72a12018-08-07 14:38:51 -0700114 ],
Tao Bao5fc72a12018-08-07 14:38:51 -0700115 static_libs: [
Tao Bao5fc72a12018-08-07 14:38:51 -0700116 "libotautil",
bigbiff673c7ae2020-12-02 19:44:56 -0500117 "libvintf",
118 "libhidl-gen-utils",
Tao Baoe3f09a72019-10-01 11:55:36 -0700119 "librecovery_utils",
bigbiff42b4ba92021-11-21 13:29:32 -0500120 "libc++fs",
bigbiffc69420e2021-11-21 14:57:27 -0500121 "libprotobuf-cpp-lite",
bigbiffe1981e52021-11-21 14:35:27 -0500122 "ota_metadata_proto_cc",
bigbiff42b4ba92021-11-21 13:29:32 -0500123 "update_metadata-protos"
bigbiff91bd7a72021-01-03 17:33:01 -0500124 ],
125 required: [
126 "init_recovery.rc",
Mohd Farazdc2cf792021-04-17 21:09:22 +0200127 "ueventd.rc.recovery",
bigbiff91bd7a72021-01-03 17:33:01 -0500128 "libdl_android.bootstrap",
bigbiffeaac7622021-02-21 14:21:50 -0500129 "ziptool.recovery"
bigbiff673c7ae2020-12-02 19:44:56 -0500130 ]
Tao Baod2f2ad62018-03-23 23:24:25 -0700131}
132
bigbiff91bd7a72021-01-03 17:33:01 -0500133prebuilt_etc {
134 name: "init_recovery.rc",
135 filename: "init.rc",
136 src: "etc/init.rc",
137 sub_dir: "init/hw",
138 recovery: true,
139}