[Feature][ZXW-88]merge P50 version
Only Configure: No
Affected branch: master
Affected module: unknown
Is it affected on both ZXIC and MTK: only ZXIC
Self-test: Yes
Doc Update: No
Change-Id: I34667719d9e0e7e29e8e4368848601cde0a48408
diff --git a/ap/lib/libupi_ab/inc/upi_fotaflag_partition.h b/ap/lib/libupi_ab/inc/upi_fotaflag_partition.h
index 97c46c7..a97b0e0 100755
--- a/ap/lib/libupi_ab/inc/upi_fotaflag_partition.h
+++ b/ap/lib/libupi_ab/inc/upi_fotaflag_partition.h
@@ -13,7 +13,7 @@
/*******************************************************************************
* Include header files *
******************************************************************************/
-
+#include "pub_flags.h"
/*******************************************************************************
* Macro definitions *
@@ -44,6 +44,7 @@
* Type definitions *
******************************************************************************/
+#if 0
/* ÔÚflags·ÖÇøÀïÆ«ÒÆµØÖ· */
#define FLAGS_MAGIC (0x464C4147UL)
@@ -97,7 +98,7 @@
T_BOOT_FOTA_FLAG boot_flag;
T_BOOT_ENV boot_env;
} T_FOTA_FLAG_INFO;
-
+#endif
/*******************************************************************************
@@ -123,7 +124,7 @@
int upi_get_boot_flag(T_BOOT_FOTA_FLAG *boot_flag);
int init_fotaflag_partition();
-int upi_get_system_info(T_FOTA_FLAG_INFO *p_system_info);
+int upi_get_system_info(T_FLAGS_INFO *p_system_info);
// Éý¼¶ºófota±êÖ¾£¬Ö÷ÒªÓÃÀ´±êÖ¾ÊÇ·ñÐèҪͬ²½NV
int upi_get_system_fota_status();
diff --git a/ap/lib/libupi_ab/inc/upi_log.h b/ap/lib/libupi_ab/inc/upi_log.h
index d089723..218ece1 100755
--- a/ap/lib/libupi_ab/inc/upi_log.h
+++ b/ap/lib/libupi_ab/inc/upi_log.h
@@ -2,26 +2,31 @@
#define UPI_LOG_H
-#define FOTA_UPI_AB_LOG_ROOT "/cache/zte_fota_ab/"
+extern FILE* s_FP_LOG;
+extern long cur_log_size;
-#define FOTA_UPI_AB_LOG_PATH "/cache/zte_fota_ab/upi_ab.log"
+//#define FOTA_UPI_AB_LOG_ROOT "/cache/zte_fota_ab/"
+
+//#define FOTA_UPI_AB_LOG_PATH "/cache/zte_fota_ab/upi_ab.log"
+
+#define FOTA_LOG_PATH "fota_ab_log_path"
#ifdef _IS_MIN
-#define upi_print(ModID,...) do { \
+#define upi_print(...) do { \
printf(__VA_ARGS__); \
} while(0)
#else
-#define upi_print(ModID,...) do { \
+#define upi_print(...) do { \
printf(__VA_ARGS__); \
char buffer_log[512] = {0}; \
snprintf(buffer_log, 510, __VA_ARGS__); \
- upi_fwrite(ModID,buffer_log); \
+ upi_fwrite(buffer_log); \
} while(0)
@@ -30,9 +35,9 @@
#define upi_log(fmt, args...) \
- do {upi_print(FOTA_UPI_AB_LOG_PATH, "[%s][fota_upi] [%s-%d]: " fmt"\n", upi_get_time_us(),__FUNCTION__, __LINE__, ## args);} while (0)
+ do {upi_print("[%s][fota_upi] [%s-%d]: " fmt"\n", upi_get_time_us(),__FUNCTION__, __LINE__, ## args);} while (0)
#define upi_err(fmt, args...) \
- do {upi_print(FOTA_UPI_AB_LOG_PATH, "[%s][fota_upi] [%s-%d]: " fmt"\n", upi_get_time_us(),__FUNCTION__, __LINE__, ## args);} while (0)
+ do {upi_print("[%s][fota_upi] [%s-%d]: " fmt"\n", upi_get_time_us(),__FUNCTION__, __LINE__, ## args);} while (0)
#if 0
#define lib_log(fmt, args...) \
do {upi_print(FOTA_UPI_AB_LOG_PATH, "" fmt"\n", ## args);} while (0)
@@ -43,8 +48,7 @@
#define LOG_FUNC_END upi_log("%s func end!", __func__);
-
-void upi_fwrite(char *filename, char* info);
+void upi_fwrite(char* info);
void upi_close_logfile(void);
char * upi_get_time_us(void);
diff --git a/ap/lib/libupi_ab/inc/zxic_fota_ab_upgrade.h b/ap/lib/libupi_ab/inc/zxic_fota_ab_upgrade.h
index 3757f91..61a0b7e 100755
--- a/ap/lib/libupi_ab/inc/zxic_fota_ab_upgrade.h
+++ b/ap/lib/libupi_ab/inc/zxic_fota_ab_upgrade.h
@@ -380,5 +380,21 @@
int zxic_dual_config_package_path(char *upgrade_package_path, int length);
+/********************************************************************************
+ * º¯ÊýÃû: zxic_dual_config_log_path
+ * ¹¦ÄÜÃèÊö: ÉèÖÃÉý¼¶log·¾¶
+ * ²ÎÊý˵Ã÷£º
+ * ÊäÈë²ÎÊý£º
+ * log_path Éý¼¶log·¾¶
+ * length Éý¼¶log·¾¶³¤¶È
+ * Êä³ö²ÎÊý: ÎÞ
+ * ·µ»ØÖµ£º
+ * Z_FOTA_SUCCESS ÉèÖóɹ¦
+ * Z_FOTA_FAIL ÉèÖÃʧ°Ü
+ * ×¢Òâ:
+ ********************************************************************************/
+int zxic_dual_config_log_path(char *log_path, int length);
+
+
#endif // ZXIC_FOTA_AB_UPGRADE_H
diff --git a/ap/lib/libupi_ab/libupi_ab.a b/ap/lib/libupi_ab/libupi_ab.a
old mode 100644
new mode 100755
index d29cd1b..21e154a
--- a/ap/lib/libupi_ab/libupi_ab.a
+++ b/ap/lib/libupi_ab/libupi_ab.a
Binary files differ
diff --git a/ap/lib/libupi_ab/libupi_ab.so b/ap/lib/libupi_ab/libupi_ab.so
index bccd145..9355831 100755
--- a/ap/lib/libupi_ab/libupi_ab.so
+++ b/ap/lib/libupi_ab/libupi_ab.so
Binary files differ