diff options
author | Chungjui Fan <chungjuifan@google.com> | 2020-09-25 11:05:59 +0800 |
---|---|---|
committer | Jing-yan, Jang <josephjang@google.com> | 2020-09-25 07:58:11 +0000 |
commit | 5b433a5e691ee0d49d31d057a12a58df6215a14c (patch) | |
tree | 362bca7e4605659c29dff7872ce2c95fa36f6e09 | |
parent | 39509261cef31e1c769801c2a26beb235eb72ead (diff) | |
parent | 97eddacd15a2d45e6392d0386f4c0cf705d3b343 (diff) | |
download | generic-android-11.0.0_r30.tar.gz |
Merge remote-tracking branch 'goog/upstream-master_branch' into rvc-qpr-devandroid-11.0.0_r30android11-qpr1-c-release
* goog/upstream-master_branch:
Define the upgrade state
Add APP_ERROR_NOT_READY to enum app_status
To support fastboot hal
Bug: 160740038
Test: Succed to report upgrade_state
Change-Id: Ifdca193e1b8c85e26861030c31acaea5b8235163
Change-Id: I1a28373647f55f38469870166d5f3c75a3be5d73
-rw-r--r-- | Android.bp | 44 | ||||
-rw-r--r-- | nugget/include/application.h | 1 | ||||
-rw-r--r-- | nugget/include/citadel_events.h | 11 |
3 files changed, 56 insertions, 0 deletions
@@ -83,6 +83,32 @@ cc_library_static { ], } +// 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 @@ cc_library_static { ], } +// 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", diff --git a/nugget/include/application.h b/nugget/include/application.h index ef70754..de771f0 100644 --- a/nugget/include/application.h +++ b/nugget/include/application.h @@ -314,6 +314,7 @@ enum app_status { APP_ERROR_CHECKSUM, /* checksum failed, only used within protocol */ APP_ERROR_BUSY, /* the app is already working on a commnad */ APP_ERROR_TIMEOUT, /* the app took too long to respond */ + APP_ERROR_NOT_READY, /* some required condition is not satisfied */ /* more? */ /* diff --git a/nugget/include/citadel_events.h b/nugget/include/citadel_events.h index 02653b0..314ca41 100644 --- a/nugget/include/citadel_events.h +++ b/nugget/include/citadel_events.h @@ -66,6 +66,14 @@ enum event_id { EVENT_ALERT_V2 = 4, // Globalsec Alertv2 fired }; +/* + * Upgrade state definition. + */ +enum upgrade_state_def { + UPGRADE_SUCCESS = 0, + UPGRADE_PW_MISMATCH = 1, +}; + /* Please do not change the size of this struct */ #define EVENT_RECORD_SIZE 64 struct event_record { @@ -85,6 +93,9 @@ struct event_record { uint32_t which1; } rebooted; struct { + uint32_t upgrade_state; + } upgraded; + struct { uint32_t alert_grp[4]; uint16_t camo_breaches[2]; uint16_t temp_min; |