To support fastboot hal
Because fastboot_hal is a share lib and will be included
in recovery image only.
Create two new libnos libraries to support wipe Titan M
userdata oem command.
Bug: 150929955
Test: succeed to wipe Titan M userdata by fastboot erase userdata
Change-Id: I45d6dfca3a5331b573cef04516e041614735e969
Reviewed-on: https://nugget-os-review.googlesource.com/c/host/generic/+/35704
Tested-by: Joseph Jang <josephjang@google.com>
Presubmit-Verified: TreeHugger Robot
Reviewed-by: Joseph Jang <josephjang@google.com>
Reviewed-by: Bill Richardson <wfrichar@google.com>
diff --git a/Android.bp b/Android.bp
index 074b9b5..d7c075e 100644
--- a/Android.bp
+++ b/Android.bp
@@ -83,6 +83,32 @@
],
}
+// A special target to be statically linkeed into fastboot hal.
+cc_library_static {
+ name: "libnos_for_fastboot",
+ recovery: true,
+ cflags: [
+ "-Wall",
+ "-Wextra",
+ "-Werror",
+ "-Wno-zero-length-array",
+ ],
+ export_include_dirs: [
+ "nugget/include",
+ "libnos/include",
+ "libnos_datagram/include",
+ "libnos_transport/include",
+ ],
+ srcs: [
+ "libnos/debug.cpp",
+ "libnos_transport/transport.c",
+ "libnos_transport/crc16.c",
+ ],
+ static_libs: [
+ "libbase",
+ ],
+}
+
// A special target to be statically linkeed into recovery which is a system
// (not vendor) component.
cc_library_static {
@@ -101,6 +127,24 @@
],
}
+// A special target to be statically linkeed into fastboot hal.
+cc_library_static {
+ name: "libnos_citadel_for_fastboot",
+ recovery: true,
+ cflags: [
+ "-Wall",
+ "-Wextra",
+ "-Werror",
+ ],
+ srcs: [
+ ":libnos_client",
+ "libnos_datagram/citadel.c",
+ ],
+ static_libs: [
+ "libnos_for_fastboot",
+ ],
+}
+
// Language and vendor related defaults
cc_defaults {
name: "nos_cc_defaults",