2 * flash-manager - Tizen kernel-level image flashing solution
4 * Licensed under the Apache License, Version 2.0 (the License);
5 * you may not use this file except in compliance with the License.
6 * You may obtain a copy of the License at
8 * http://www.apache.org/licenses/LICENSE-2.0
10 * Unless required by applicable law or agreed to in writing, software
11 * distributed under the License is distributed on an "AS IS" BASIS,
12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 * See the License for the specific language governing permissions and
14 * limitations under the License.
20 #include <sys/queue.h>
23 #define DFU_DELIMITER " :,\t\n"
24 #define DFU_INFO_NUM 100
25 #define DFU_MOUNT_PATH "/mnt/tfm-temp"
35 enum dfu_thread_state {
36 DFU_THREAD_STATE_ERROR = -1,
37 DFU_THREAD_STATE_IDLE,
38 DFU_THREAD_STATE_FLASHING,
44 TAILQ_ENTRY(dfu_frame) entry;
47 void *dfu_get_buffer(unsigned long size);
48 void dfu_put_buffer(void *ptr);
49 int dfu_init(struct tfm_context *ctx, const char *dfu_info_file);
50 void dfu_exit(struct tfm_context *ctx);
51 int dfu_start(struct tfm_context *ctx, const char *entity);
52 int dfu_request_io(struct tfm_context *ctx, unsigned long len);
53 void dfu_sync(struct tfm_context *ctx);