Peer Chen | 8d782ee | 2011-01-18 21:34:18 -0500 | [diff] [blame] | 1 | /** |
| 2 | * Copyright (c) 2011 NVIDIA Corporation. All rights reserved. |
| 3 | * |
| 4 | * See file CREDITS for list of people who contributed to this |
| 5 | * project. |
| 6 | * |
| 7 | * This program is free software; you can redistribute it and/or |
| 8 | * modify it under the terms of the GNU General Public License as |
| 9 | * published by the Free Software Foundation; either version 2 of |
| 10 | * the License, or (at your option) any later version. |
| 11 | * |
| 12 | * This program is distributed in the hope that it will be useful, |
| 13 | * but WITHOUT ANY WARRANTY; without even the implied warranty of |
| 14 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
| 15 | * GNU General Public License for more details. |
| 16 | * |
| 17 | * You should have received a copy of the GNU General Public License |
| 18 | * along with this program; if not, write to the Free Software |
| 19 | * Foundation, Inc., 59 Temple Place, Suite 330, Boston, |
| 20 | * MA 02111-1307 USA |
| 21 | */ |
| 22 | |
| 23 | /* |
| 24 | * set.h - Definitions for the cbootimage state setting code. |
| 25 | */ |
| 26 | |
| 27 | #ifndef INCLUDED_SET_H |
| 28 | #define INCLUDED_SET_H |
| 29 | |
| 30 | #include "cbootimage.h" |
| 31 | #include "parse.h" |
| 32 | #include "string.h" |
| 33 | #include "sys/stat.h" |
| 34 | |
| 35 | int |
| 36 | context_set_array(build_image_context *context, |
| 37 | u_int32_t index, |
| 38 | parse_token token, |
| 39 | u_int32_t value); |
| 40 | |
| 41 | int |
| 42 | set_bootloader(build_image_context *context, |
| 43 | char *filename, |
| 44 | u_int32_t load_addr, |
| 45 | u_int32_t entry_point); |
| 46 | |
| 47 | int |
| 48 | context_set_value(build_image_context *context, |
| 49 | parse_token token, |
| 50 | u_int32_t value); |
| 51 | |
| 52 | int |
| 53 | set_addon_filename(build_image_context *context, |
| 54 | char *filename, |
| 55 | int index); |
| 56 | |
| 57 | int |
| 58 | set_addon_attr(build_image_context *context, |
| 59 | u_int32_t file_attr, |
| 60 | int index); |
| 61 | |
| 62 | int |
| 63 | set_unique_name(build_image_context *context, |
| 64 | char *uname, |
| 65 | int index); |
| 66 | |
| 67 | int |
| 68 | set_other_field(build_image_context *context, |
| 69 | char *other_str, |
| 70 | int other, |
| 71 | int index); |
| 72 | |
| 73 | int |
Peer Chen | 053d578 | 2011-03-03 10:12:58 -0800 | [diff] [blame] | 74 | set_nand_param(build_image_context *context, |
| 75 | u_int32_t index, |
| 76 | parse_token token, |
| 77 | u_int32_t value); |
| 78 | |
| 79 | int |
Peer Chen | 7557d9b | 2011-02-24 09:29:23 -0800 | [diff] [blame] | 80 | set_sdmmc_param(build_image_context *context, |
| 81 | u_int32_t index, |
| 82 | parse_token token, |
| 83 | u_int32_t value); |
| 84 | |
| 85 | int |
| 86 | set_spiflash_param(build_image_context *context, |
| 87 | u_int32_t index, |
| 88 | parse_token token, |
| 89 | u_int32_t value); |
| 90 | |
| 91 | int |
Peer Chen | 3a834ed | 2011-03-04 09:30:05 -0800 | [diff] [blame] | 92 | set_sdram_param(build_image_context *context, |
| 93 | u_int32_t index, |
| 94 | parse_token token, |
| 95 | u_int32_t value); |
| 96 | |
| 97 | int |
Peer Chen | 8d782ee | 2011-01-18 21:34:18 -0500 | [diff] [blame] | 98 | read_from_image(char *filename, |
| 99 | u_int32_t page_size, |
| 100 | u_int8_t **Image, |
| 101 | u_int32_t *storage_size, |
| 102 | u_int32_t *actual_size, |
| 103 | file_type f_type); |
| 104 | |
| 105 | #endif /* #ifndef INCLUDED_SET_H */ |