ss_engine/SS_MultiProcessUpdate.h
ss_engine/SS_Nand.h
ss_engine/SS_UPI.h
+ ss_engine/ua_types.h
)
#SET(EXEC_PREFIX "\${prefix}")
SET(PREFIX ${CMAKE_INSTALL_PREFIX})
%{_includedir}/SS_MultiProcessUpdate.h
%{_includedir}/SS_Nand.h
%{_includedir}/SS_UPI.h
+%{_includedir}/ua_types.h
%files -n tota-bsdiff
%{_bindir}/ss_bsdiff
#include "SS_Engine_Errors.h"
#include "SS_Common.h"
-#include "ua.h"
+#include "ua_types.h"
#include "fota_tar.h"
#include "fota_common.h"
#include "SS_Engine_Errors.h"
#include "SS_Engine_Update.h"
-#include "ua.h"
+#include "ua_types.h"
#define MAX_PATH 256
#include "SS_Common.h"
#include "fota_common.h"
-#include "ua.h"
+#include "ua_types.h"
static int feature_support_capability;
#include "SS_ImageUpdate.h"
#include "SS_Engine_Errors.h"
#include "SS_Common.h"
-#include "ua.h"
+#include "ua_types.h"
#include "fota_common.h"
static int local_pid;
#include <sys/types.h>
#include <fcntl.h>
#include <unistd.h>
-#include "ua.h"
+#include "ua_types.h"
#include "sha1.h"
#include "SS_PatchDelta.h"
#include "fota_common.h"
#include <unistd.h>
#include <sys/statfs.h>
#include <mntent.h>
-#include "ua.h"
+#include "ua_types.h"
#include "SS_Common.h"
#include "fota_common.h"
#include "SS_UPI.h"
SS_GetPartition_LocDetails(ua_dataSS);
LOGL(LOG_SSENGINE, "FS Verification Start PartIndex:[%d]\n", part_idx);
if (ua_dataSS->ua_operation == UI_OP_SCOUT)
- gvalid_session = TRUE; // (shd b true if called during verification)
+ gvalid_session = 1; // (shd b true if called during verification)
headptr_list[part_idx] = SS_FSBuildNodes(ua_dataSS);
#ifdef TIME_PROFILING
LOGL(LOG_SSENGINE, "fast_tar_get_item_size_time :[%lf]\n", fast_tar_get_item_size_time);
#include "SS_FSUpdate.h"
#include "fota_common.h"
#include "fota_tar.h"
-#include "ua.h"
+#include "ua_types.h"
/* tar Header Block, from POSIX 1003.1-1990. for reference */
#if 0
+++ /dev/null
-/*
- * libtota
- *
- * Copyright (c) 2017 Samsung Electronics Co., Ltd.
- *
- * Licensed under the Apache License, Version 2.0 (the License);
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-#ifndef __UA_H__
-#define __UA_H__
-
-#include <stdio.h>
-
-#define MAX_FILE_PATH 512
-#define MAX_PART_NAME 32
-
-/*
- * FOTA Adaptaion header
- */
-
-#define ERROR -1 // 0XFFFFFFFF
-
-#define INVALID 0
-#define VALID 1
-#define TRUE 1
-#define FALSE 0
-#define OK 0
-#define SUCCESS 0
-#define FAIL 1
-#define RESTORING 2
-#define UA_PARTI_MAX 20 //currently supporting max 20 partitions
-#define DEFAULT_DELTA_NAME "delta.tar"
-#define UPDATTE_CFG_FILE "update.cfg"
-
-#define UI_OP_SCOUT_UPDATE 0
-#define UI_OP_SCOUT 1
-#define UI_OP_UPDATE 3
-//SS_ENGINE && BSDIFF
-#define SS_RECOVERYRAMDISK
-
-
-typedef enum {
- FULL_IMG,
- DELTA_IMG,
- DELTA_FS,
- EXTRA
-} UA_DATA_FORMAT;
-
-typedef enum {
- UA_MODE_SCOUT_UPDATE,
- UA_MODE_SCOUT,
- UA_MODE_VERIFYTARGET,
- UA_MODE_UPDATE,
- UA_MODE_SUPPLYIMFOM = 200
-} UA_OPERATION_MODE;
-
-typedef struct _ua_update_data_t {
- unsigned int exist_check;
- unsigned int verify_check;
- unsigned int update_check;
- unsigned int weight; // the sum of weight should be 100
- unsigned int weight_offset; // start offset
- unsigned int data_size; // byte
- char *ua_delta_path; // it will be allocated to copy delta file path, need to free memory
- char *ua_temp_path; // it will be allocated to copy delta file path, need to free memory
-} ua_update_data_t;
-
-typedef struct _ua_update_cfg_t {
- unsigned int update_type;
- int skip_verify;
- int skip_update;
- int soure_img_size; //TOTA
- int target_img_size;
- char *soure_sha1;
- char *target_sha1;
-} ua_update_cfg_t;
-
-typedef struct _ua_part_info_t {
- char *ua_parti_name;
- char *ua_subject_name;
- char *ua_blk_name;
- int ua_blk_offset;
-} ua_part_info_t;
-
-// User data structure
-typedef struct _ua_data_t { // partition operations
- ua_part_info_t *parti_info;
- ua_update_cfg_t *update_cfg;
- ua_update_data_t *update_data;
- unsigned long ua_operation;
-
- int (*ua_op_read_block) (void *, unsigned char *, unsigned long, unsigned long);
- int (*ua_op_write_block) (void *, unsigned char *, unsigned long);
- void (*ui_progress) (void *, unsigned long);
-} ua_data_t;
-
-typedef struct _ua_delta_info_t {
- char ua_patch_path[MAX_FILE_PATH];
- char ua_patch_info[MAX_FILE_PATH];
- char ua_delta_path[MAX_FILE_PATH];
- char ua_attrib_path[MAX_FILE_PATH];
-} ua_delta_info_t;
-
-typedef struct _ua_dataSS_t { // partition operations
- ua_part_info_t *parti_info;
- ua_update_cfg_t *update_cfg;
- ua_update_data_t *update_data;
- ua_delta_info_t *update_delta;
- unsigned long ua_operation;
- void (*ui_progress) (void *, unsigned long);
- int (*write_data_to_blkdev) (char *, int, int, char *);
-} ua_dataSS_t;
-
-#endif
--- /dev/null
+/*
+ * libtota
+ *
+ * Copyright (c) 2017 Samsung Electronics Co., Ltd.
+ *
+ * Licensed under the Apache License, Version 2.0 (the License);
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+#ifndef __UA_TYPES_H__
+#define __UA_TYPES_H__
+
+#include <stdio.h>
+
+#define MAX_FILE_PATH 512
+
+/*
+ * FOTA Adaptaion header
+ */
+
+#define UA_PARTI_MAX 20 //currently supporting max 20 partitions
+
+#define UI_OP_SCOUT_UPDATE 0
+#define UI_OP_SCOUT 1
+#define UI_OP_UPDATE 3
+
+typedef enum {
+ FULL_IMG,
+ DELTA_IMG,
+ DELTA_FS,
+ EXTRA
+} UA_DATA_FORMAT;
+
+typedef enum {
+ UA_MODE_SCOUT_UPDATE,
+ UA_MODE_SCOUT,
+ UA_MODE_VERIFYTARGET,
+ UA_MODE_UPDATE,
+ UA_MODE_SUPPLYIMFOM = 200
+} UA_OPERATION_MODE;
+
+typedef struct _ua_update_data_t {
+ unsigned int exist_check;
+ unsigned int verify_check;
+ unsigned int update_check;
+ unsigned int weight; // the sum of weight should be 100
+ unsigned int weight_offset; // start offset
+ unsigned int data_size; // byte
+ char *ua_delta_path; // it will be allocated to copy delta file path, need to free memory
+ char *ua_temp_path; // it will be allocated to copy delta file path, need to free memory
+} ua_update_data_t;
+
+typedef struct _ua_update_cfg_t {
+ unsigned int update_type;
+ int skip_verify;
+ int skip_update;
+ int soure_img_size; //TOTA
+ int target_img_size;
+ char *soure_sha1;
+ char *target_sha1;
+} ua_update_cfg_t;
+
+typedef struct _ua_part_info_t {
+ char *ua_parti_name;
+ char *ua_subject_name;
+ char *ua_blk_name;
+ int ua_blk_offset;
+} ua_part_info_t;
+
+// User data structure
+typedef struct _ua_data_t { // partition operations
+ ua_part_info_t *parti_info;
+ ua_update_cfg_t *update_cfg;
+ ua_update_data_t *update_data;
+ unsigned long ua_operation;
+
+ int (*ua_op_read_block)(void *, unsigned char *, unsigned long, unsigned long);
+ int (*ua_op_write_block)(void *, unsigned char *, unsigned long);
+ void (*ui_progress)(void *, unsigned long);
+} ua_data_t;
+
+typedef struct _ua_delta_info_t {
+ char ua_patch_path[MAX_FILE_PATH];
+ char ua_patch_info[MAX_FILE_PATH];
+ char ua_delta_path[MAX_FILE_PATH];
+ char ua_attrib_path[MAX_FILE_PATH];
+} ua_delta_info_t;
+
+typedef struct _ua_dataSS_t { // partition operations
+ ua_part_info_t *parti_info;
+ ua_update_cfg_t *update_cfg;
+ ua_update_data_t *update_data;
+ ua_delta_info_t *update_delta;
+ unsigned long ua_operation;
+ void (*ui_progress)(void *, unsigned long);
+ int (*write_data_to_blkdev)(char *, int, int, char *);
+} ua_dataSS_t;
+
+#endif