diff options
-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; |